continue when face not found

This commit is contained in:
Somdev Sangwan 2023-05-31 16:40:19 +05:30 committed by GitHub
parent 7c3f75ae88
commit cb3d045bb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
run.py
View File

@ -97,7 +97,7 @@ def start_processing():
n = len(frame_paths)//(args['cores_count'])
for i in range(n):
if dataset(random.choice(frame_paths)) > 0.7:
quit("[WARNING] Unable to determine location of the face in the target. Please make sure the target isn't wearing clothes matching to their skin.")
return
processes = []
for i in range(0, len(frame_paths), n):
p = pool.apply_async(process_video, args=(args['source_img'], frame_paths[i:i+n],))