mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-29 23:29:01 +03:00
Add per-camera face and lpr configs (#17235)
* Add per-camera face and lpr configs * Formatting * Cleanup
This commit is contained in:
@@ -288,6 +288,9 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
||||
|
||||
def process_frame(self, obj_data: dict[str, any], frame: np.ndarray):
|
||||
"""Look for faces in image."""
|
||||
if not self.config.cameras[obj_data["camera"]].face_recognition.enabled:
|
||||
return
|
||||
|
||||
start = datetime.datetime.now().timestamp()
|
||||
id = obj_data["id"]
|
||||
|
||||
@@ -348,7 +351,11 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
||||
face_box = face.get("box")
|
||||
|
||||
# check that face is valid
|
||||
if not face_box or area(face_box) < self.config.face_recognition.min_area:
|
||||
if (
|
||||
not face_box
|
||||
or area(face_box)
|
||||
< self.config.cameras[obj_data["camera"]].face_recognition.min_area
|
||||
):
|
||||
logger.debug(f"Invalid face box {face}")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user