xrenaa / StyleSpace-pytorch

Implementation of StyleSpace Analysis: Disentangled Controls for StyleGAN Image Generation in PyTorch
99 stars 14 forks source link

GANs inversion using encoder4editing #5

Open markduon opened 3 years ago

markduon commented 3 years ago

Hi!

I am implementing GANs inversion using repo encoder4editing. But I saw that they trained the model with stylegan2 generator to be fixed. In your notebook, you also use pretrained model of stylegans2, and then inject it into your encoder, decoder. 1) Is your decoder with conv wrapper is what makes StyleSpace? 2) I asked the author of encoder4editing and they said as follow:

Screenshot from 2021-07-06 18-49-29

But I do not clearly understand the phrase "extracting the StyleSpace representation during a forward pass of the generator". Could you explain me this? Thank you

datduong commented 2 years ago

The S space is made from the W space. The screenshot says to use any optimization method to get the W+ values. Now, you pass the W+ into the affine layer (see the affine layer A in the paper https://arxiv.org/abs/2011.12799 Figure 9). This will let you get the S space from the W+.