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

Get W projections by real images #80

Open filipelauar opened 3 years ago

filipelauar commented 3 years ago

Hello, I'm trying to invert real images to the W latent space. I already used IDInvert but the output of their W is 14x512, while the style GAN accepts latent codes of size 18x512.

Do you have the invert feature implemented in the repository? Am I doing something wrong to have W latent spaces of different sizes?

ShenYujun commented 3 years ago

The models released in IDInvert are trained under 256 resolution, but the official StyleGAN model is trained under 1024 resolution. You can train your own encoder with this file in the IDInvert repo.