Update facenet model (#14647)

This commit is contained in:
Nicolas Mowen 2024-10-28 17:35:20 -06:00
parent ce3496868f
commit 6d6a07ff2c
3 changed files with 3 additions and 3 deletions

View File

@ -63,6 +63,6 @@ class SqliteVecQueueDatabase(SqliteQueueDatabase):
self.execute_sql("""
CREATE VIRTUAL TABLE IF NOT EXISTS vec_faces USING vec0(
id TEXT PRIMARY KEY,
face_embedding FLOAT[128] distance_metric=cosine
face_embedding FLOAT[512] distance_metric=cosine
);
""")

View File

@ -133,7 +133,7 @@ class Embeddings:
model_name="facenet",
model_file="facenet.onnx",
download_urls={
"facenet.onnx": "https://github.com/NicolasSM-001/faceNet.onnx-/raw/refs/heads/main/faceNet.onnx",
"facenet.onnx": "https://github.com/NickM-27/facenet-onnx/releases/download/v1.0/facenet.onnx",
"facedet.onnx": "https://github.com/opencv/opencv_zoo/raw/refs/heads/main/models/face_detection_yunet/face_detection_yunet_2023mar_int8.onnx",
},
model_size="large",

View File

@ -222,7 +222,7 @@ class GenericONNXEmbedding:
frame[y_center : y_center + og_h, x_center : x_center + og_w] = og
frame = np.expand_dims(frame, axis=0)
return [{"image_input": frame}]
return [{"input_2": frame}]
elif self.model_type == ModelTypeEnum.alpr_detect:
preprocessed = []
for x in raw_inputs: