pbaylies / stylegan-encoder

StyleGAN Encoder - converts real images to latent space
Other
740 stars 182 forks source link

VGG loss alone #32

Closed muxgt closed 4 years ago

muxgt commented 4 years ago

Hi! I have a small question. How to do original VGG-loss-only with your code? I put VGG loss to 1 and all the others to 0 but still some difference with Puzer for example. Below is the results:

         Original                         Puzer                        Pbaylies

Original_1024256Puzer Adam 500it256Pbaylies VGG 100256

The scarf in some reason is not visualized. I don't use face mask. Can you please advice?

AzzerAce commented 4 years ago

Hey, it's probably because @pbaylies changed the original vgg loss from L2 in Puzer's repo (this line) to L1 in https://github.com/pbaylies/stylegan-encoder/blob/18919c2565e3947eafc152e320ba573b3e61ad08/encoder/perceptual_model.py#L22-L23 https://github.com/pbaylies/stylegan-encoder/blob/18919c2565e3947eafc152e320ba573b3e61ad08/encoder/perceptual_model.py#L132

You can try replacing the lines and see if that helps.

muxgt commented 4 years ago

@AzzerAce Thanks man! It seems to work although some small difference left. Pbaylies VGG L2 even200

gsygsy96 commented 4 years ago

@AzzerAce Thanks man! It seems to work although some small differences left. Pbaylies VGG L2 even200

Did you change the perceptual loss using L1 loss on the VGG feature?

I think the main difference is that this repo uses mask but Puzer's repo uses the whole image.