stylegan-encoder icon indicating copy to clipboard operation
stylegan-encoder copied to clipboard

I am trying to obtain the same result with pytorch.

Open nile649 opened this issue 5 years ago • 4 comments

I did the encoding like the author of this github has mentioned. VGG = Perceptual model G = Generator model G.style() is the fully connected encoder in generator which gives dlatent code.

First question After optimizing perceptual loss between G and VGG, do I need to save the weights of G.style(), or pass random vector to G.style() save the output from G.style() which is dlatent.

Second Question If the first approach is right, than I proceed by getting attributes of the face using microsoft cognitive api. I tried on just 860 images to begin with. I do get the result but it is wrong. image

nile649 avatar Mar 24 '19 21:03 nile649

image image

nile649 avatar Mar 28 '19 18:03 nile649

Smile direction. image

image

nile649 avatar Mar 28 '19 18:03 nile649

@nile649 Do you obtain the same result with pytorch? Can you share you code???Thank you.

bayminbx avatar Jan 09 '20 10:01 bayminbx

https://github.com/jacobhallberg/pytorch_stylegan_encoder/blob/master/train_image_to_latent_model.ipynb

drprajapati avatar Jan 20 '20 04:01 drprajapati