cszn / DnCNN

Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising (TIP, 2017)
https://cszn.github.io/
1.47k stars 539 forks source link

Struggle with PyTorch version code #45

Closed onwn closed 6 years ago

onwn commented 6 years ago

I'm afraid I might bother you, but it seems that the PyTorch implementation cannot reproduce the expected result. When I tried to do so, I met following issues......:

1. When I run train/test code(without touching any setting),

2. Is it right to add Gaussian noise and don't clip it? I thought it must be clipped according to [0., 255.] (uint8) or [0., 1.] (float32) because in real case(of course it is not completely 'real' 'cause it's AWGN) the corrupted image would be in [0., 255.] range. How much does the clipping lowers its performance, or is it better? I wanted to test it myself but... like I mentioned in 1., the baseline model isn't working correctly, so... If you have already tried it, could you let me know?

cszn commented 6 years ago
  1. Please make sure you have changed the noise level in the training and testing for noise level 15 and 50.

  2. You may refer to FFDNet. I added a discussion on Un-Clipping vs. Clipping of Noisy Images for Training in Section III. G. I also released the models for the two settings. Their PSNRs are almost the same.

onwn commented 6 years ago

Could you please provide the pretrained models for noise level=15 and level=50? Actually I'm sure that I set the noise level and other settings properly, so if the problem still happens even when I use your pretrained model then I can check that the trouble is from elsewhere.

cszn commented 6 years ago

@onwn https://github.com/Liyong8490/DnCNN-pytorch

onwn commented 6 years ago

It seems working fine and thanks. closing it.

CodeR57 commented 6 years ago

@onwn Can you please help me with reproducing the mentioned PSNR scores. I ran the Main_test.py, but the PSNR scores are much lower(~1dB). PFA screenshot from 2018-10-31 08-01-45