Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blind gaussian denoising #28

Open
Shakarim94 opened this issue Feb 4, 2018 · 13 comments
Open

Blind gaussian denoising #28

Shakarim94 opened this issue Feb 4, 2018 · 13 comments

Comments

@Shakarim94
Copy link

Hello! Thank you for this amazing code!

I want to ask about the DnCNN-B model. How one would implement it using this code?

In the paper they say that the patch size is set to 50x50 and the number of layers increased to 20. They also nearly doubled the number of layers. What about the noise level? Do we just pick random sigma between [0,50] at each batch?

@SaoYan
Copy link

SaoYan commented Feb 28, 2018

My PyTorch implementation maybe helpful.

https://github.com/SaoYan/DnCNN-PyTorch

Please refer to line 70~75 in train.py

@qwbmiao
Copy link

qwbmiao commented Apr 30, 2018

Hello!Your code looks so cool!

I want to ask you that how I do to implement blind guassian noise by using the code.I try to change the sigma by "feed" like learning rate(lr) in the code,but failed.

self.X = self.Y_ + tf.random_normal(shape=tf.shape(self.Y_), stddev=self.sigma)

So can you tell me how to implement it?Thank you very much

@clausmichele
Copy link
Contributor

In my fork I implemented blind denoising with 0-50 levels for RGB images https://github.com/clausmichele/DnCNN-tensorflow

@liting11
Copy link

liting11 commented Jul 2, 2018

hi,your code is very cool that is modified.But I went wrong when I work it.I run the main program directly.I don't know that reason is what.can you tell me why?could you tell your email?i want to learn for you.thank you so much

@clausmichele
Copy link
Contributor

Can you explain more in detail what kind of problem you have? It is impossible to say what went wrong without any details of where you are running the software.

@liting11
Copy link

I am very happy to receive your reply.thank you very much.you are very good man .I can't run the program you modified。When I run main.py,there was an error about 'TypeError: 'range' object does not support item assignment',I think there are questions about my opencv.I installed OpenCV on the software of spyder, but I couldn't use it.I don't why?You can help me analyze it?Thanks for dear.

@clausmichele
Copy link
Contributor

Please post the full error you get, so I can see the line number and try to understand what's the problem. By the way, I am using OpenCV 3.4 compiled from source, because the python version available is older, but this should not be the problem.

@liting11
Copy link

This is result about when runned 'main.py' directly.
runfile('F:/dncnn/DnCNN-tensorflow-master/DnCNN-tensorflow-master/main.py', wdir='F:/dncnn/DnCNN-tensorflow-master/DnCNN-tensorflow-master')
GPU

Traceback (most recent call last):

File "", line 1, in
runfile('F:/dncnn/DnCNN-tensorflow-master/DnCNN-tensorflow-master/main.py', wdir='F:/dncnn/DnCNN-tensorflow-master/DnCNN-tensorflow-master')

File "D:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 866, in runfile
execfile(filename, namespace)

File "D:\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "F:/dncnn/DnCNN-tensorflow-master/DnCNN-tensorflow-master/main.py", line 84, in
tf.app.run()

File "D:\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))

File "F:/dncnn/DnCNN-tensorflow-master/DnCNN-tensorflow-master/main.py", line 56, in main
model = denoiser(sess)

File "F:\dncnn\DnCNN-tensorflow-master\DnCNN-tensorflow-master\model.py", line 41, in init
self.dataset = dataset(sess)

File "F:\dncnn\DnCNN-tensorflow-master\DnCNN-tensorflow-master\model.py", line 204, in init
random.shuffle(ind)

File "D:\Anaconda3\lib\random.py", line 272, in shuffle
x[i], x[j] = x[j], x[i]

TypeError: 'range' object does not support item assignment

@clausmichele
Copy link
Contributor

Running main.py only starts the training, is what you want? Do you have the images in the correct folders? Try main.py --phase=test with some test images in the right folders first.

@liting11
Copy link

yes,I want to run your code to strart the training.I haved the images in the correct folders.Did your code work successful?Result?

@clausmichele
Copy link
Contributor

Check that ind isn't empty or None and try without random.shuffle(ind)

@Pichairen
Copy link

@clausmichele Hi,When I run main.py --phase=test,there is an error happen, AssertionError: No testing data! whether I need download other testing data?

@Shakarim94
Copy link
Author

Hello guys, I recently implemented CDnCNN-B (blind color denoising) based on this repository

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants