Lev1s commited on
Commit
59a1f9b
1 Parent(s): 62ab745

Update face_swapper.py

Browse files
roop/processors/frame/face_swapper.py CHANGED
@@ -72,6 +72,17 @@ def process_frame(source_face: Face, reference_face: Face, temp_frame: Frame) ->
72
  temp_frame = swap_face(source_face, target_face, temp_frame)
73
  return temp_frame
74
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
  def process_frames(source_path: str, temp_frame_paths: List[str], update: Callable[[], None]) -> None:
77
  source_face = get_one_face(cv2.imread(source_path))
 
72
  temp_frame = swap_face(source_face, target_face, temp_frame)
73
  return temp_frame
74
 
75
+ # def process_frame(source_face: Face, temp_frame: Frame) -> Frame:
76
+ # if roop.globals.many_faces:
77
+ # many_faces = get_many_faces(temp_frame)
78
+ # if many_faces:
79
+ # for target_face in many_faces:
80
+ # temp_frame = swap_face(source_face, target_face, temp_frame)
81
+ # else:
82
+ # target_face = get_one_face(temp_frame)
83
+ # if target_face:
84
+ # temp_frame = swap_face(source_face, target_face, temp_frame)
85
+ # return temp_frame
86
 
87
  def process_frames(source_path: str, temp_frame_paths: List[str], update: Callable[[], None]) -> None:
88
  source_face = get_one_face(cv2.imread(source_path))