Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the latent code from GAN inversion methods can be manipulated by the boundary #43

Closed
WJ-Lai opened this issue Mar 26, 2020 · 1 comment

Comments

@WJ-Lai
Copy link

WJ-Lai commented Mar 26, 2020

Hi, thanks for sharing this great work!

I'm trying to edit a new face. In #30, it is suggested using https://github.com/Puzer/stylegan-encoder firstly to get the new face latent code of W+ space. However, the shape of the latent code is (18, 512) and 18 layers have different values.

What confusing me is :

  1. The shape of "stylegan_ffhq_age_w_boundary.npy" is (1,512), so if using (1, 512) boundary to edit (18,512) latent code, all layers will edit by the same value. But the meaning of different layers of (18,512) latent code is not the same, because the values of 18 layers are different.

Why can we use (1, 512) boundary to edit (18,512) latent code? Why it can also work?

  1. If the (18,512) latent code has different values of its 18 layers, training a (18, 512) boundary (which also has different values of its 18 layers) is more reasonable, isn't it?

  2. In your paper, you also do the experiment of real images. What the latent space did you get from your stylegan encode? Z, W or W+?
    If the shape of your latent code is (18,512), do 18 layers have different values?

Thank you!

@ShenYujun
Copy link
Collaborator

  1. Yes, you are right. You can manipulate all layers with the same boundary. The reason is that during the training of StyleGAN, the $w$ code, which is mapped from $z$ code is repeated 18 times before fed into different layers.

  2. Training 18 different boundaries for various layers is also a feasible solution. However, the training data ($w$ code) for these layers are all the same (as mentioned above, the $w$ code is repeated 18 times by StyleGAN). A more reasonable solution is to partially manipulate these layers (e.g., only manipulate 0-3 layers for pose). Please see HiGAN for more details.

  3. I use W+, which has different $w$ for different layers.

@WJ-Lai WJ-Lai closed this as completed Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants