mirror of
https://github.com/hacksider/Deep-Live-Cam.git
synced 2026-07-15 14:37:24 +02:00
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:
@@ -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']:
|
||||
|
||||
Reference in New Issue
Block a user