YuvalNirkin / fsgan

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

Multiple faces in source or target video #85

Closed BenjaminChua closed 3 years ago

BenjaminChua commented 3 years ago

My target video (or source for that matter) has 2 persons inside. I have checked that running swap.py would swap on only 1 person's face and in this case, it was the wrong person. May I ask what is the best way to filter out unwanted faces and only swap the chosen person's face?

YuvalNirkin commented 3 years ago

Use the --select_source and --select_target options with the ids of the requested faces. Take a look at the cache directory to see the detected faces.

BenjaminChua commented 3 years ago

Thank you, this solved my issue.