feat(ml): conditionally download .armnn models (#6650)

This commit is contained in:
Mert
2024-01-28 10:31:59 -05:00
committed by GitHub
parent fa0913120d
commit a84b6f5fb1
5 changed files with 127 additions and 38 deletions

View File

@@ -77,11 +77,11 @@ class FaceRecognizer(InferenceModel):
@property
def det_file(self) -> Path:
return self.cache_dir / "detection" / "model.onnx"
return self.cache_dir / "detection" / f"model.{self.preferred_runtime}"
@property
def rec_file(self) -> Path:
return self.cache_dir / "recognition" / "model.onnx"
return self.cache_dir / "recognition" / f"model.{self.preferred_runtime}"
def configure(self, **model_kwargs: Any) -> None:
self.det_model.det_thresh = model_kwargs.pop("minScore", self.det_model.det_thresh)