zsyzzsoft / co-mod-gan

[ICLR 2021, Spotlight] Large Scale Image Completion via Co-Modulated Generative Adversarial Networks
Other
445 stars 67 forks source link

How to control style truncation? #22

Closed windj007 closed 3 years ago

windj007 commented 3 years ago

Hi! Thank you for releasing this! Really amazing results!

I'm trying to evaluate the model on my data and I'm curious, if there is a way to tune truncation trick in run_generator.py? I'd like to buy as much quality as possible and I'm not very interested in diversity.

Should I pass something as input to Gs.run?

zsyzzsoft commented 3 years ago

Yes, pass truncation_psi=xxx to Gs.run. You can try the updated code which adds an option of --truncation.

windj007 commented 3 years ago

Thank you for the quick answer!

Am I right that truncation_psi=0 should give the best possible quality? Or I should grid-search for the best value?

zsyzzsoft commented 3 years ago

I would recommend the default value. Setting it to less than 1 will not likely have positive effect though I haven't tried it.

windj007 commented 3 years ago

I've just tried 0.1 and got approximately same metrics, sometimes a bit better, sometimes a bit worse. The difference in FID was about 0.03, compared to CoModGAN with truncation = 1.

windj007 commented 3 years ago

Thank you for your help!