Reimplement downloading of face detection model (#15472)

This commit is contained in:
Nicolas Mowen 2024-12-12 12:53:48 -06:00 committed by GitHub
parent 5db16c3272
commit 2e51ae2eb7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -123,6 +123,17 @@ class Embeddings:
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