junyanz / CycleGAN

Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Other
12.23k stars 1.93k forks source link

cyclegan training #72

Open suke27 opened 6 years ago

suke27 commented 6 years ago

Hi, I have a problem for cycle gan training, currently our training dataset need many image(both A and B), can I do art style transfer based just one image. like Gatys do, do art style transfer for any image using any style image do you try it?

junyanz commented 6 years ago

We haven't tried it. It is worth trying. I can imagine there might be overfitting issue as the discriminator only needs to memorize one image.

suke27 commented 6 years ago

i really try, but not good result, another issue, I found GAN result always introduce some abnormal feature, you can check attached file, is it GAN common issue, how do we resolve it. I try filter training images(remove images which include watermark), but useless, @junyanz Thank you!

2b3g9v 2b3g9v_style

junyanz commented 6 years ago

It's hard to train a GAN with only one target image. One thing you can try is to use a smaller patch size. Let's assume that your image is 512x512. You can set loadSize=512, and fineSize=64 or 128 during training, and set loadSize=512, fineSize=512 during test.