kunheek / style-aware-discriminator

CVPR 2022 - Official PyTorch implementation of "A Style-Aware Discriminator for Controllable Image Translation"
https://arxiv.org/abs/2203.15375
MIT License
112 stars 8 forks source link

About Interpolation. #8

Open pww777 opened 10 months ago

pww777 commented 10 months ago

image I use "python -m synthesis interpolation --checkpoint ./checkpoints/afhq-stylegan2-5M.pt --folder ./testphotos/afhq/content ./testphotos/afhq/style“ to synthesize images. But got synthesized images between content image and style image, no style1 images and style2 image. If I want to synthesize images using the style code interpolated between the two style codes obtained from the two reference images,what script should I use? Thank you.

kunheek commented 10 months ago

Hi. Thank you for your interest.

If I understand correctly, you can try adding --lerp-from-src false to your command. For example, you can use the following command:

python -m synthesis interpolation \
--checkpoint ./checkpoints/afhq-stylegan2-5M.pt \
--folder ./testphotos/afhq/content ./testphotos/afhq/style \
--lerp-mode reference \
-- lerp-from-src false

I haven't tested this myself now, but if I remember correctly (I haven't run this code for a long time), this should work. If you have any trouble, please let me know!

pww777 commented 10 months ago

Thank you very much for your assistance! I found that using the prototype yields better results compared to using the reference. Your guidance is invaluable.