fixed - multiple face per frame

This commit is contained in:
seranus 2021-11-19 21:17:00 +01:00
commit 1630152cfe

View file

@ -146,13 +146,26 @@ def main (model_class_name=None,
io.log_info ("Use 'recover original filename' to determine the exact duplicates.") io.log_info ("Use 'recover original filename' to determine the exact duplicates.")
io.log_info ("") io.log_info ("")
frames = [ InteractiveMergerSubprocessor.Frame( frame_info=FrameInfo(filepath=Path(p), # build frames maunally
landmarks_list=[alignments.get(Path(p).stem, None)[0][0]] if alignments.get(Path(p).stem, None) != None else None, frames = []
dfl_images_list=[alignments.get(Path(p).stem, None)[0][1]] if alignments.get(Path(p).stem, None) != None else None for p in input_path_image_paths:
# landmarks_list = alignments_orig.get(Path(p).stem, None) path = Path(p)
) data = alignments.get(path.stem, None)
) if data == None:
for p in input_path_image_paths ] frame = InteractiveMergerSubprocessor.Frame(FrameInfo(frame_info=frame_info))
else:
landmarks_list = [d[0] for d in data]
dfl_images_list = [d[1] for d in data]
frame_info=FrameInfo(filepath=path, landmarks_list=landmarks_list, dfl_images_list=dfl_images_list)
frame = InteractiveMergerSubprocessor.Frame(frame_info=frame_info)
frames.append(frame)
# frames = [ InteractiveMergerSubprocessor.Frame( frame_info=FrameInfo(filepath=Path(p),
# # landmarks_list = alignments_orig.get(Path(p).stem, None)
# )
# )
# for p in input_path_image_paths ]
if multiple_faces_detected: if multiple_faces_detected:
io.log_info ("Warning: multiple faces detected. Motion blur will not be used.") io.log_info ("Warning: multiple faces detected. Motion blur will not be used.")