Puzer / stylegan-encoder

StyleGAN Encoder - converts real images to latent space
Other
1.07k stars 166 forks source link

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

Open WJ-Lai opened 4 years ago

WJ-Lai commented 4 years ago

Hi, thanks for sharing this great work!

I have some question as follow:

  1. The shape of 'donald_trump_01.npy' is (18,512) which has different values of 18 layers. However, your "smile.npy" has the same values of 18 layers. The meaning of 18 layers of 'donald_trump_01.npy' is different because the values are different, why it can edit by the same smile boundary? Do you know why it can also work?

  2. In move_and_show function, new_latent_vector[:8] = (latent_vector + coeff*direction)[:8]. Why just edited the first eight layers?

Thank you!

olivercoad commented 4 years ago
  1. What do you mean by boundary?

  2. For smile direction it makes sense to only alter the coarse layers and leave the fine layers alone. I would've thought other directions such as gender and age would need to change all the layers though. ¯\(ツ)

ChengBinJin commented 4 years ago

@WJ-Lai The smile direction was found in W space, but the Puzer's encoded latent from W+ space.