fix: skip empty face clusters in default_target_face (#1757)

Skip face clusters when no best face was detected, preventing a NoneType error while preserving normal face-detection behavior.

Closes #1755
This commit is contained in:
Cocoon-Break
2026-07-14 11:51:43 -04:00
committed by GitHub
parent 57c4c32377
commit eba2a958d3
+3
View File
@@ -335,6 +335,9 @@ def default_target_face():
best_frame = frame
break
if best_face is None:
continue # No faces detected in this cluster — skip
for frame in map['target_faces_in_frame']:
for face in frame['faces']:
if face['det_score'] > best_face['det_score']: