Skip to content

Commit

Permalink
Update facenet model (blakeblackshear#14647)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored Oct 28, 2024
1 parent a574d7b commit 54c2269
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frigate/db/sqlitevecq.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ def create_embeddings_tables(self, face_recognition: bool) -> None:
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
);
""")
2 changes: 1 addition & 1 deletion frigate/embeddings/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def __init__(self, config: FrigateConfig, db: SqliteVecQueueDatabase) -> None:
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",
Expand Down
2 changes: 1 addition & 1 deletion frigate/embeddings/functions/onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def _preprocess_inputs(self, raw_inputs: any) -> any:
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:
Expand Down

0 comments on commit 54c2269

Please sign in to comment.