junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.72k stars 6.28k forks source link

Images are getting predicted with inverted color #1301

Open souryasengupta opened 3 years ago

souryasengupta commented 3 years ago

I am working on medical imaging data and I am trying to convert one class to image to another, the images are spatially correlated, the main differences lie in color. But the colors are getting predicted inverse, that mean the white part of the images are getting colors like the ROI (in my case the ROIs are cells) and the ROI parts are getting white. Anyone else had similar issues? Please help

junyanz commented 2 years ago

To further preserve the color, you can either increase the cycle-consistency loss or the identity mapping loss. See these flags.

abesmon commented 1 year ago

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

Code is not from this repo, but I had same issue there

Xujingkk commented 2 months ago

I am working on medical imaging data and I am trying to convert one class to image to another, the images are spatially correlated, the main differences lie in color. But the colors are getting predicted inverse, that mean the white part of the images are getting colors like the ROI (in my case the ROIs are cells) and the ROI parts are getting white. Anyone else had similar issues? Please help

Hello, I'm experiencing the same problem. May I ask how you solved it?