omertov / encoder4editing

Official implementation of "Designing an Encoder for StyleGAN Image Manipulation" (SIGGRAPH 2021) https://arxiv.org/abs/2102.02766
MIT License
945 stars 154 forks source link

How could you get directions for age, smile and pose? #12

Closed koojagyum closed 3 years ago

koojagyum commented 3 years ago

Hi. Thanks for your great work!

Is it possible to obtain other directions(about face)? You said you used StyleFlow. But StyleFlow needs latent codes and facial attributes(MS-API). And it uses W-latents space(18 x 512) other than Z-space. How did you do that? Am I missing about StyleFlow?

omertov commented 3 years ago

Hi @koojagyum! All 4 editing techniques displayed in the paper (InterFaceGAN, GANSpace, SeFa, and StyleFlow) can be used to edit face images after their inversion into a W(k,*) 18x512 latent code (Using the e4e encoder for example).

Other then InterFaceGAN, we did not train GANSpace, SeFa, or StyleFlow for additional editing directions, meaning we used the existing capabilities of each technique.

To train InterFaceGAN, you can use their official repository, but you need to sample many w(,) [1x512 style vector] vectors and obtain matching labels for each of the images produced by the style vector (you can read more about it at their official repository).

Edit: Mabe This Issue can help.

koojagyum commented 3 years ago

Thanks for your clear answer and comment. Actually, I tried gender editing using stylegan2-distillation, and it worked somehow. And even StyleGAN-v1 boundaries from InterFaceGAN also worked.