genforce / interfacegan

[CVPR 2020] Interpreting the Latent Space of GANs for Semantic Face Editing
https://genforce.github.io/interfacegan/
MIT License
1.51k stars 281 forks source link

How can I input an image to edit? #3

Closed Play2Boy closed 5 years ago

Play2Boy commented 5 years ago

Hi, First many thanks for sharing this great work. I want to ask a question. The input of InterFaceGAN is "Latent code". If I want to input a face image and edit the face, how can I deal with? Need I transform the image as a "Latent code"? And how to do it?

Thank you.

ShenYujun commented 5 years ago

Exactly. This work aims at interpreting the latent space and then achieves face editing with respect to latent code. To manipulate real image, you can try some GAN inversion methods to map the input image back to latent space. We are still working on this part to improve the inversion quality. Basically, you can try directly optimizing the latent code with back-propagation method. This part will be released in the future.

Voyz commented 5 years ago

Hey @Play2Boy I describe a temporary solution here:

https://github.com/ShenYujun/InterFaceGAN/issues/17#issuecomment-535584873