Comments (12)
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.
Additionally, the PSNR of these 3 images in original DnCNN model is 33.06, 32.44, 30.12 respectively.
from dncnn-tensorflow.
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.
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.
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.
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.
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.
from dncnn-tensorflow.
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.
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.
你好,想问一下出现这个错误该怎么办呢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.
@lzzlxxlsz 你好请问您解决这个问题了吗,我也遇到相同的问题,谢谢
from dncnn-tensorflow.
Related Issues (20)
- hi, i want to know how do you get your denoisy images in training and testing, can you tell me? thank you very much. HOT 1
- error xrange HOT 2
- error: AttributeError: 'Namespace' object has no attribute 'temporal' HOT 3
- Loss function formula
- Why should I feed the clear image when running the TEST part? HOT 1
- closed
- DnCNN last layer HOT 1
- Different patches for noisy and clean pairs
- Handling the variable image sizes
- About patch disunderstand
- 'float' object cannot be interpreted as an integer HOT 1
- Memory Explode HOT 6
- help HOT 2
- where is the test set?
- Same picture for denoised and noisy HOT 1
- This program will not run at all, the Python version is too old, and there are no test data. In short, it is terrible. HOT 1
- Does the size of each image have to be fixed as 180*180? HOT 1
- How to use this model for my data?
- Got Fetch argument None has invalid type <class 'NoneType'> error HOT 1
- Performance issue in /model.py (by P3) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dncnn-tensorflow.