Simplify all faces
This commit is contained in:
parent
6f38212bfd
commit
2a66c69d9e
@ -29,8 +29,8 @@ def swap_face_in_frame(source_face, target_face, frame):
|
|||||||
return frame
|
return frame
|
||||||
|
|
||||||
|
|
||||||
def process_faces(source_face, frame, progress, all_faces=False):
|
def process_faces(source_face, frame, progress):
|
||||||
if all_faces:
|
if roop.globals.all_faces:
|
||||||
many_faces = get_face_many(frame)
|
many_faces = get_face_many(frame)
|
||||||
if many_faces:
|
if many_faces:
|
||||||
for face in many_faces:
|
for face in many_faces:
|
||||||
@ -56,7 +56,7 @@ def process_video(source_img, frame_paths):
|
|||||||
for frame_path in frame_paths:
|
for frame_path in frame_paths:
|
||||||
frame = cv2.imread(frame_path)
|
frame = cv2.imread(frame_path)
|
||||||
try:
|
try:
|
||||||
result = process_faces(source_face, frame, progress, roop.globals.all_faces)
|
result = process_faces(source_face, frame, progress)
|
||||||
cv2.imwrite(frame_path, result)
|
cv2.imwrite(frame_path, result)
|
||||||
except Exception:
|
except Exception:
|
||||||
progress.set_postfix(status='E', refresh=True)
|
progress.set_postfix(status='E', refresh=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user