Giter Site home page Giter Site logo

结果的异常现象 about dncnn-tensorflow HOT 12 CLOSED

wbhu avatar wbhu commented on August 25, 2024
结果的异常现象

from dncnn-tensorflow.

Comments (12)

wbhu avatar wbhu commented on August 25, 2024

Hi @baizhengbiao ,

As you say, some results of this model are not as smooth as the original DnCNN model, which confused me too.

I also trained a new model whose parameters are all the same with original model, and the loss converged at about 0.92, which is lower than original model. But these 3 results were still not smooth. Surprisingly, average PSNR of this model on Set12 with 25 noise level is 30.84, while the figure of original DnCNN model is only 30.44. And the PSNR of these 3 images in our new model is 32.74, 32.23, 30.60 respectively.

I will continue to pursue the reasons.

Thanks,
Wenbo

from dncnn-tensorflow.

wbhu avatar wbhu commented on August 25, 2024

Additionally, the PSNR of these 3 images in original DnCNN model is 33.06, 32.44, 30.12 respectively.

from dncnn-tensorflow.

ccqu avatar ccqu commented on August 25, 2024

The cause would probably be that you're using tf.truncated_normal to generated noisy input images in your model.build_model(). If it is replaced with tf.random_normal as in the original MATLAB code, which is more difficult, the result on Set12 will drop to 29.xx.

from dncnn-tensorflow.

wbhu avatar wbhu commented on August 25, 2024

Hi @ccqu ,

Thanks for your reply. You're right that noise generated with tf.truncated_normal is easier than that with tf.random_normal. Now, I am trying to train the model with tf.random_normal noise. We will get the figure soon.

Thanks,
Wenbo

from dncnn-tensorflow.

ccqu avatar ccqu commented on August 25, 2024

Hi Wenbo, thanks for your confirmation! I ran the training with tf.random_normal again and got:
img0 PSNR: 29.62
img1 PSNR: 31.96
img2 PSNR: 30.23
img3 PSNR: 28.92
img4 PSNR: 29.92
img5 PSNR: 28.80
img6 PSNR: 28.99
img7 PSNR: 31.13
img8 PSNR: 29.19
img9 PSNR: 29.61
img10 PSNR: 29.46
img11 PSNR: 29.46
--- Test ---- Average PSNR 29.77 ---

from dncnn-tensorflow.

baizhengbiao avatar baizhengbiao commented on August 25, 2024

Yeah I have try it again with tf.random_normal .
img0 PSNR: 29.33
img1 PSNR: 28.88
img2 PSNR: 29.69
img3 PSNR: 29.88
img4 PSNR: 29.67
img5 PSNR: 29.75
img6 PSNR: 29.60
img7 PSNR: 32.08
img8 PSNR: 28.98
img9 PSNR: 31.32
img10 PSNR: 29.19
img11 PSNR: 30.44
--- Test ---- Average PSNR 29.90 ---

from dncnn-tensorflow.

wbhu avatar wbhu commented on August 25, 2024

Hi @baizhengbiao @ccqu ,

Thanks for all of your contributions.

I have found out the reason of the model's bad performance in these 3 images as @baizhengbiao said. It's a bug in BN layer that causes this problem. I have fixed it, and now this model could achieve average PSNR 30.38 with noise generated with tf.random_normal in Set12, which is quite similar with original DnCNN model.

This is the result:
[] Reading checkpoint...
[
] Load weights SUCCESS...
[*] noise level: 25 start testing...
img0 PSNR: 33.07
img1 PSNR: 30.84
img2 PSNR: 30.03
img3 PSNR: 30.14
img4 PSNR: 29.96
img5 PSNR: 29.07
img6 PSNR: 30.05
img7 PSNR: 29.45
img8 PSNR: 30.01
img9 PSNR: 29.26
img10 PSNR: 32.33
img11 PSNR: 30.35
--- Average PSNR 30.38 ---

For more information, plz refer to the updated README and code.

Thanks,
Wenbo

from dncnn-tensorflow.

wbhu avatar wbhu commented on August 25, 2024

denoised10

denoised8
denoised0

from dncnn-tensorflow.

ccqu avatar ccqu commented on August 25, 2024

Hi @crisb-DUT, thanks for your code update! Just wondering without e.g. the previous clipping code in BN as in the original MATLAB code, the results are much better…

from dncnn-tensorflow.

wbhu avatar wbhu commented on August 25, 2024

Hi @ccqu ,

It's not the clipping when initial the BN weights that caused the poor performance in previous model but the not frizzed moving average of beta and gamma when testing. I think it's not that important how we initial BN weights.

from dncnn-tensorflow.

lzzlxxlsz avatar lzzlxxlsz commented on August 25, 2024

你好,想问一下出现这个错误该怎么办呢File "D:\Anaconda\envs\tensorflow\lib\random.py", line 282, in shuffle
x[i], x[j] = x[j], x[i]
TypeError: 'range' object does not support item assignment

from dncnn-tensorflow.

hujiayu712 avatar hujiayu712 commented on August 25, 2024

@lzzlxxlsz 你好请问您解决这个问题了吗,我也遇到相同的问题,谢谢

from dncnn-tensorflow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.