YuvalNirkin / fsgan

FSGAN - Official PyTorch Implementation
https://nirkin.com/fsgan
Creative Commons Zero v1.0 Universal
749 stars 147 forks source link

removing frames from output video that has non-swapped faces #133

Closed ItamarKanter closed 3 years ago

ItamarKanter commented 3 years ago

When using the default value for the target selection method flag (longest) the output (verbose=0, --output_crop=False) includes target frames that weren't swapped. However, when setting --output_crop=True the output includes only frames with swapped faces. How can I output a video (when --output_crop=False) that contains only frames with swapped faces?

YuvalNirkin commented 3 years ago

This is not supported at the moment. The logic for this behavior is in video_renderer.py, you can simply comment out the two loops in the initialization and the end of sequence part respectively.

ItamarKanter commented 3 years ago

Thanks, Works. To be more precise, one should comment out only the lines: self._render(frame_bgr) in the aforementioned loops.