Skip to content

Commit

Permalink
Reimplement downloading of face detection model (blakeblackshear#15472)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickM-27 authored and weitheng01 committed Dec 21, 2024
1 parent b465b5c commit 9466b25
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions frigate/embeddings/embeddings.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,17 @@ def __init__(self, config: FrigateConfig, db: SqliteVecQueueDatabase) -> None:
device="GPU" if config.semantic_search.model_size == "large" else "CPU",
)

if self.config.face_recognition.enabled:
self.face_embedding = GenericONNXEmbedding(
model_name="facedet",
model_file="facedet.onnx",
download_urls={
"facedet.onnx": "https://github.com/opencv/opencv_zoo/raw/refs/heads/main/models/face_detection_yunet/face_detection_yunet_2023mar_int8.onnx",
},
model_type=ModelTypeEnum.face,
requestor=self.requestor,
)

self.lpr_detection_model = None
self.lpr_classification_model = None
self.lpr_recognition_model = None
Expand Down

0 comments on commit 9466b25

Please sign in to comment.