From b24bb9c15362cc6b7ae841d80b6b6ce9eddbd40d Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sat, 22 Mar 2025 07:32:03 -0600 Subject: [PATCH] Catch case where returned face box is invalid --- frigate/data_processing/real_time/face.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frigate/data_processing/real_time/face.py b/frigate/data_processing/real_time/face.py index ce2ea85c1..7b49a2f47 100644 --- a/frigate/data_processing/real_time/face.py +++ b/frigate/data_processing/real_time/face.py @@ -329,7 +329,11 @@ class FaceRealTimeProcessor(RealTimeProcessorApi): max(0, face_box[1]) : min(frame.shape[0], face_box[3]), max(0, face_box[0]) : min(frame.shape[1], face_box[2]), ] - face_frame = cv2.cvtColor(face_frame, cv2.COLOR_RGB2BGR) + + try: + face_frame = cv2.cvtColor(face_frame, cv2.COLOR_RGB2BGR) + except Exception: + return else: # don't run for object without attributes if not obj_data.get("current_attributes"):