mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-12 16:16:42 +03:00
Add more face debug logs
This commit is contained in:
parent
01a2eb3cbc
commit
a8aef91165
@ -209,6 +209,7 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
|||||||
person_box = obj_data.get("box")
|
person_box = obj_data.get("box")
|
||||||
|
|
||||||
if not person_box:
|
if not person_box:
|
||||||
|
logger.debug(f"No person box available for {id}")
|
||||||
return
|
return
|
||||||
|
|
||||||
rgb = cv2.cvtColor(frame, cv2.COLOR_YUV2RGB_I420)
|
rgb = cv2.cvtColor(frame, cv2.COLOR_YUV2RGB_I420)
|
||||||
@ -234,7 +235,8 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
face_frame = cv2.cvtColor(face_frame, cv2.COLOR_RGB2BGR)
|
face_frame = cv2.cvtColor(face_frame, cv2.COLOR_RGB2BGR)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
logger.debug(f"Failed to convert face frame color for {id}: {e}")
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
# don't run for object without attributes
|
# don't run for object without attributes
|
||||||
@ -252,6 +254,7 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
|||||||
|
|
||||||
# no faces detected in this frame
|
# no faces detected in this frame
|
||||||
if not face:
|
if not face:
|
||||||
|
logger.debug(f"No face attributes found for {id}")
|
||||||
return
|
return
|
||||||
|
|
||||||
face_box = face.get("box")
|
face_box = face.get("box")
|
||||||
@ -275,6 +278,7 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
|||||||
res = self.recognizer.classify(face_frame)
|
res = self.recognizer.classify(face_frame)
|
||||||
|
|
||||||
if not res:
|
if not res:
|
||||||
|
logger.debug(f"Face recognizer returned no result for {id}")
|
||||||
self.__update_metrics(datetime.datetime.now().timestamp() - start)
|
self.__update_metrics(datetime.datetime.now().timestamp() - start)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
@ -158,11 +158,13 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
self.realtime_processors: list[RealTimeProcessorApi] = []
|
self.realtime_processors: list[RealTimeProcessorApi] = []
|
||||||
|
|
||||||
if self.config.face_recognition.enabled:
|
if self.config.face_recognition.enabled:
|
||||||
|
logger.debug("Face recognition enabled, initializing FaceRealTimeProcessor")
|
||||||
self.realtime_processors.append(
|
self.realtime_processors.append(
|
||||||
FaceRealTimeProcessor(
|
FaceRealTimeProcessor(
|
||||||
self.config, self.requestor, self.event_metadata_publisher, metrics
|
self.config, self.requestor, self.event_metadata_publisher, metrics
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
logger.debug("FaceRealTimeProcessor initialized successfully")
|
||||||
|
|
||||||
if self.config.classification.bird.enabled:
|
if self.config.classification.bird.enabled:
|
||||||
self.realtime_processors.append(
|
self.realtime_processors.append(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user