mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-18 17:14:26 +03:00
Always initialize face model on startup
This commit is contained in:
parent
9595777433
commit
0f4cf0fa4f
@ -170,6 +170,7 @@ class FaceClassificationModel:
|
||||
)
|
||||
)
|
||||
self.label_map: dict[int, str] = {}
|
||||
self.__build_classifier()
|
||||
|
||||
def __build_classifier(self) -> None:
|
||||
labels = []
|
||||
@ -248,6 +249,7 @@ class FaceClassificationModel:
|
||||
def clear_classifier(self) -> None:
|
||||
self.classifier = None
|
||||
self.labeler = None
|
||||
self.label_map = {}
|
||||
|
||||
def classify_face(self, face_image: np.ndarray) -> Optional[tuple[str, float]]:
|
||||
if not self.label_map:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user