junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.71k stars 6.27k forks source link

output of style transfer turns out to be all approximately blue/inversed colors #744

Open YvonneTsang16 opened 5 years ago

YvonneTsang16 commented 5 years ago

I am trying to use the pretrained model of style transfer(monet, vangogh etc), but my own data images turn out to be all in a blue tone. Then I try to download and input the test images of style_monet and find out that the ouput images seem to be approximately invered in colors compared to the input images. e.g. a warm-colored background with cold-colored building image are transfered to one with a cold-colored background and warm-colord building. I think it is a little weird, since the examples of style traferring in Github Readme.md are almost perfect, so I guess there must be some issues.

By the way I am using pytorch version with win10 system (the prerequisite asks for ox or linux, but I run it smoothly except for the inversed-color issue).

I'd appreciate any comment or suggestion. Thanks very much.

junyanz commented 5 years ago

Have you tried to run the model on the provided test set? Maybe you need to retrain the models on your own datasets. @taesungp

abesmon commented 1 year ago

can confirm, that using identity loss of 0 can cause "wrong" colors: https://github.com/aladdinpersson/Machine-Learning-Collection/issues/124

Code is not from this repo, but I had same issue there. Setting identity lambda to something above 0 is making results ok ;)