affinelayer / pix2pix-tensorflow

Tensorflow port of Image-to-Image Translation with Conditional Adversarial Nets https://phillipi.github.io/pix2pix/
MIT License
5.07k stars 1.3k forks source link

Noisy/grainy output #74

Open karims opened 7 years ago

karims commented 7 years ago

I am trying to train pix2pix to correct contrast on an image. However, I am getting blurred and grainy images. There is lot of black noise in the image(examples below). Is it because of the loss?

Note: I have made no change to pix2pix-tensorflow and used it as is. The losses I see at the end of my training are:

discriminator loss: around 0.7 generator_loss_GAN: around 2.2 generator_loss_L1: around 0.16

Sample outputs: (Input-Output-Target) screenshot from 2017-10-21 10-49-56 screenshot from 2017-10-21 10-57-11

Loss information from tensorboard: screenshot from 2017-10-21 01-33-43

My questions are:

1) Am I first of all using correctly for my usecase? 2) How can I make sure there is no loss of data in the image at all and only the light amount changes in the target picture? 3) If GAN isn't right way, can you let me know how to achieve this?

KArman-Genera commented 6 years ago

I also have a similar issue... any updates ?

nidetaoge commented 6 years ago

Maybe you could try identity mapping loss to add to your loss function, like cycle gan. Just have a try.

mattchiang-gsp commented 6 years ago

@karims did you end up figuring out your issue? I run into the same grainy/blurry output, even when I ran an experiment training on a single image and evaluating that same image.

Edit: Should add that I am new to machine learning, so training on single image (that is also small in resolution) might not have been the right idea.

karims commented 6 years ago

@mattchiang: No, I haven’t. 🙁