williamyang1991 / DualStyleGAN

[CVPR 2022] Pastiche Master: Exemplar-Based High-Resolution Portrait Style Transfer
Other
1.64k stars 254 forks source link

Why dose the destylization process work? #74

Closed laolongboy closed 1 year ago

laolongboy commented 1 year ago

The whole process of destylization is clearly shown in the paper, but it does not explain why it works.

  1. Using pretrained encoder of ffhq to inference a styled image, why the encoder could adapt to the styled domain? We should not finetune too many steps in case the two domains are too far apart?
  2. Why iteratively updated latent code in styled domain stylegan can be adapted to ffhq stylegan? We should not update too many steps for the same reason as 1?

Thanks.

williamyang1991 commented 1 year ago

Yes, the limited steps make the two models well aligned, thus the latent code for one domain works for anther domain. See StyleAlign: Analysis and Applications of Aligned StyleGAN Models for details.

laolongboy commented 1 year ago

Thanks! If I want to transfer all the real face to a specific style, and I don't want to refer to any example, can I just set the exstyle code as same as the instyle code? Or is there another way?

williamyang1991 commented 1 year ago

I don't know whether it works. I think you can just sample random exstyle code.

https://github.com/williamyang1991/DualStyleGAN/blob/b3f0cf8e9e07ad002f9df07981e2eecaf0569191/generate.py#L61-L64

https://github.com/williamyang1991/DualStyleGAN/blob/b3f0cf8e9e07ad002f9df07981e2eecaf0569191/generate.py#L72-L75