context_encoder_pytorch icon indicating copy to clipboard operation
context_encoder_pytorch copied to clipboard

images during training are too dark

Open liminn opened this issue 5 years ago • 4 comments

Hi, thanks for sharing your great work! I follow your recommendation that use the The Paris Dataset to train the network. After training, when I check the result/train/real or result/train/cropped or result/train/recon folder, I found that all the images are too dark, such as this: real image: image cropped image: image recon image: recon_center_samples_epoch_199

The result of inpainting is effective, but why all the image are so dark?

ps: I do not change anything of the code except dataset/train folder.

liminn avatar Jun 25 '19 11:06 liminn

I am training now, and I also have encountered this problem. I would like to ask, after you train the model, will the result be so dark too when testing?

silence1114 avatar Jul 11 '19 09:07 silence1114

@silence1114 I didn't test, beacuse I thought the test during training is same as test solely. Do you have other discoveries?

liminn avatar Jul 12 '19 01:07 liminn

@liminn @silence1114 It's because of the normalize operationtransforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5)),doing unnormalization before output should solve the problem.real_cpu = real_cpu/2.0,real_cpu = real_cpu + 0.5,thenvutils.save_image(real_cpu, 'result/train/real/real_samples_epoch_%03d.png' % (epoch))

C-H-D avatar Aug 01 '19 07:08 C-H-D

@silence1114 ,I could you tell me how to run the procedure in windows,please!I don't quite understand .

geniusmissm avatar Apr 25 '21 01:04 geniusmissm