From e94b24ec399f73f9ebeb32ef6bbba3201349acda Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Fri, 4 Apr 2025 07:03:08 -0600 Subject: [PATCH] Face fixes (#17530) * Catch - in name * Add note about docs --- docs/docs/configuration/face_recognition.md | 4 ++++ frigate/data_processing/real_time/face.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/docs/docs/configuration/face_recognition.md b/docs/docs/configuration/face_recognition.md index 8dc4ac7b2..328fc5fc3 100644 --- a/docs/docs/configuration/face_recognition.md +++ b/docs/docs/configuration/face_recognition.md @@ -125,3 +125,7 @@ This can happen for a few different reasons, but this is usually an indicator th ### I see scores above the threshold in the train tab, but a sub label wasn't assigned? The Frigate considers the recognition scores across all recognition attempts for each person object. The scores are continually weighted based on the area of the face, and a sub label will only be assigned to person if a person is confidently recognized consistently. This avoids cases where a single high confidence recognition would throw off the results. + +### Can I use other face recognition software like DoubleTake at the same time as the built in face recognition? + +No, using another face recognition service will interfere with Frigate's built in face recognition. When using double-take the sub_label feature must be disabled if the built in face recognition is also desired. diff --git a/frigate/data_processing/real_time/face.py b/frigate/data_processing/real_time/face.py index dd18aeffc..fb55bb7d2 100644 --- a/frigate/data_processing/real_time/face.py +++ b/frigate/data_processing/real_time/face.py @@ -393,6 +393,9 @@ class FaceRealTimeProcessor(RealTimeProcessorApi): if score <= self.face_config.unknown_score: sub_label = "unknown" + if "-" in sub_label: + sub_label = sub_label.replace("-", "_") + if self.config.face_recognition.save_attempts: # write face to library folder = os.path.join(FACE_DIR, "train") @@ -460,6 +463,10 @@ class FaceRealTimeProcessor(RealTimeProcessorApi): if self.config.face_recognition.save_attempts: # write face to library folder = os.path.join(FACE_DIR, "train") + + if "-" in sub_label: + sub_label = sub_label.replace("-", "_") + file = os.path.join( folder, f"{event_id}-{timestamp}-{sub_label}-{score}.webp" )