fix(ml): set face detection threshold correctly in locust (#13419)

* set minScore correctly

* cleanup

* remove outdated tag score
This commit is contained in:
Mert 2025-03-04 15:52:07 -05:00 committed by GitHub
parent d740f0283a
commit 61c8237a4d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 14 deletions

View file

@ -20,9 +20,8 @@ class FaceRecognizer(InferenceModel):
depends = [(ModelType.DETECTION, ModelTask.FACIAL_RECOGNITION)]
identity = (ModelType.RECOGNITION, ModelTask.FACIAL_RECOGNITION)
def __init__(self, model_name: str, min_score: float = 0.7, **model_kwargs: Any) -> None:
def __init__(self, model_name: str, **model_kwargs: Any) -> None:
super().__init__(model_name, **model_kwargs)
self.min_score = model_kwargs.pop("minScore", min_score)
max_batch_size = settings.max_batch_size.facial_recognition if settings.max_batch_size else None
self.batch_size = max_batch_size if max_batch_size else self._batch_size_default