zyainfal / One-Shot-Face-Swapping-on-Megapixels

One Shot Face Swapping on Megapixels.
Other
314 stars 40 forks source link

how to use with your own images? #7

Closed molo32 closed 3 years ago

molo32 commented 3 years ago

the tutorial is not entirely clear. it seems that the inference arguments only accept celeb hq.

If I have two photos, how do I exchange their faces? something like inference.py photo1.png photo2.png

zyainfal commented 3 years ago

inference.py only works on CelebA-HQ. For your own images, you need:

  1. align faces according to progressive GAN
  2. segmentation target face by a face parsing net trained on CelebAMask-HQ.
  3. follow the workflow of inference.py to swap your own faces
FlowDownTheRiver commented 3 years ago

inference.py only works on CelebA-HQ. For your own images, you need:

1. align faces according to [progressive GAN](https://arxiv.org/pdf/1710.10196.pdf)

2. segmentation target face by a face parsing net trained on CelebAMask-HQ.

3. follow the workflow of `inference.py` to swap your own faces

Is there any code that you will reveal or working on to do personal photos?

zyainfal commented 3 years ago

Nope