SaoYan / DnCNN-PyTorch

PyTorch implementation of the TIP2017 paper "Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising"
http://ieeexplore.ieee.org/document/7839189/
GNU General Public License v3.0
407 stars 117 forks source link

Implementation may be wrong #11

Closed YouCaiJun98 closed 2 years ago

YouCaiJun98 commented 2 years ago

Hello and thanks for your reproduction! When I went through model.py, I noticed that in the forward method, you returned out instead of x - out, which is corresponding to residual learning in the author's article, I wonder if it's a mistake or I missed something. Thanks!

wind-surfer commented 2 years ago

@YouCaiJun98 I still see the issue with the code or, you were able to spot it somewhere in the code?

YouCaiJun98 commented 2 years ago

It turns out that the authors reproduce the model to predict AGWN instead of the whole image (see issue#4). You can safely employ the model to reconstruct the whole image with minor adjustments as stated above.

wind-surfer commented 2 years ago

Yes, you are right. He is predicting the residual. I found it after you pointed to the source. Thank you. For reference (for other readers), the line implementing residual noise concept is here.