mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-05 13:07:44 +03:00
Catch case where returned face box is invalid
This commit is contained in:
parent
d32949017b
commit
b24bb9c153
@ -329,7 +329,11 @@ class FaceRealTimeProcessor(RealTimeProcessorApi):
|
|||||||
max(0, face_box[1]) : min(frame.shape[0], face_box[3]),
|
max(0, face_box[1]) : min(frame.shape[0], face_box[3]),
|
||||||
max(0, face_box[0]) : min(frame.shape[1], face_box[2]),
|
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:
|
else:
|
||||||
# don't run for object without attributes
|
# don't run for object without attributes
|
||||||
if not obj_data.get("current_attributes"):
|
if not obj_data.get("current_attributes"):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user