noise2noise icon indicating copy to clipboard operation
noise2noise copied to clipboard

Any image can be denoised?

Open zjz5250 opened this issue 7 years ago • 23 comments

If i had a image,but i don't know the noise type of it, can it be denoised? and which model should i use

zjz5250 avatar Aug 31 '18 06:08 zjz5250

No. Basically, you should know noise models before training because training data should be created through degrading clean images by the noise models. If you train a model using several types of noise models, you might be able to denoise a noise image even if the noise type of the image is unknown, as long as the noise type is one of the noise types used in training.

yu4u avatar Sep 01 '18 13:09 yu4u

think you very much

zjz5250 avatar Sep 02 '18 16:09 zjz5250

Another question,how can i know the type of noise i want to deal with? Actually,the method proposed by the paper can not denoise any image,right?

zjz5250 avatar Sep 03 '18 01:09 zjz5250

I mean that ,i have lots of images,some of them are not very clear,and i want to denoise them。 but i don‘t know how to deal with it,can you give me a suggestion? thanks a lot!

zjz5250 avatar Sep 03 '18 01:09 zjz5250

The answer is the same as the previous comment. You should deeply check the noisy images, group them into several types, implement the noise models to train a denoising model, and then train a model.

yu4u avatar Sep 03 '18 15:09 yu4u

I believe even though you don't know the noise type, you can use the method to denoise if you observer the same scene twice and get two independent noise image.

austingg avatar Sep 04 '18 08:09 austingg

I believe even though you don't know the noise type, you can use the method to denoise if you observer the same scene twice and get two independent noise image.

Theoretically yes. But I'm afraid that it is difficult to get two independent noise images in real applications (e.g. "i have lots of images,some of them are not very clear,and i want to denoise them" as @zjz5250 mentioned).

yu4u avatar Sep 05 '18 00:09 yu4u

@yu4u how about capture twice, if you have the capture device.

austingg avatar Sep 05 '18 01:09 austingg

If there is a capture device, one can create a dataset for training a denoising model dedicated to the device; it's exactly the expected application of the original paper.

yu4u avatar Sep 05 '18 03:09 yu4u

I want to know whether there is model trained.If I have a picture,I can load the model and denoise the picture instead of training by myself.

MichelleYang2017 avatar Oct 22 '18 09:10 MichelleYang2017

You can find it in README.

yu4u avatar Oct 22 '18 12:10 yu4u

You can find it in README.

I read REANME yesterday. Your code can product some nosied images and denosied images but this is a process you made.But I have a picture which there is gaussian noise in true life,I config the command and download your trained weights but I don't have seen results.

MichelleYang2017 avatar Oct 23 '18 02:10 MichelleYang2017

Please clarify what you did in command line level.

yu4u avatar Oct 23 '18 03:10 yu4u

Please clarify what you did in command line level. If I analysis the nosied data's distribution parameters ,when I use your weights to predict a noise images to clean image,is it neccessary to config parameters in command line?

MichelleYang2017 avatar Oct 24 '18 01:10 MichelleYang2017

I guess that my images is gray that it doesn't work.If I want to denois images I need to train weights by myself what do you think?

MichelleYang2017 avatar Oct 24 '18 09:10 MichelleYang2017

I can't give meaningful comments without knowing exactly what you did (commands, error logs ...). What do you mean by it doesn't work? Any script finished with error? Results were strange?

Regarding gray images, it is possible to treat gray images as color images with three channels by changing

image = cv2.imread(str(image_path))

to

image = cv2.imread(str(image_path), 1)

yu4u avatar Oct 24 '18 15:10 yu4u

If I use a clean image, then add noise by your "get_noise_model", it works very well. But if I load a noisy image with Gaussian noise, then set --test_noise_model to clean. It doesn't work at all. It means the Gaussian noise is not reduced at all. It looks like this code treats the noisy image as a clean one. I thought several reasons but it still doesn't work. Could you help me check the reason when you are convenient?

miaomiao6 avatar Jan 05 '19 05:01 miaomiao6

Please describe what is the problem (and what you want to do) and how to reproduce the problem. What did you mean by "doesn't work".

yu4u avatar Jan 05 '19 09:01 yu4u

If input (the test image) is a clean image, then add noise by your "get_noise_model", it works very well. But if input is a noisy image (which is already contaminated with Gaussian noise), so we don't need to add noise by your "get_noise_model" and set "test_noise_model "to" clean". The Gaussian noise of the input noisy image won't be reduced. The output is exactly the same as the input.

miaomiao6 avatar Jan 05 '19 20:01 miaomiao6

Could you provide the test image and the command line you executed?

yu4u avatar Jan 06 '19 12:01 yu4u

My test image is selected from you test dataset, such as bridge. I found that if the input noisy image (which is already contaminated with Gaussian noise) is a gray one, the noise can not be reduced from you test code (even using image = cv2.imread(str(image_path), 1)) . If the input noisy image is a color one, it works well. You can check for that

miaomiao6 avatar Feb 04 '19 18:02 miaomiao6

Could you provide the test image that can not be denoised? I could denoise the bridge image with Gaussian noise.

bridge_denoised

yu4u avatar Feb 05 '19 16:02 yu4u

Hi! @yu4u as you can see below image I add noise to Set5 images with ImageJ and let one of them as a grayscale image. By using ImageJ (Process > Noise > Add Noise) then (Image > Type > 8-bit). I got saved image as the left one.

Then excute denoise process "test_model.py" with weight "weights.056-66.803-30.57923_gauss_clean.hdf5" and argument "--test_noise_model clean"

Compare to the RGB (without converting to 8-bit) image as below image

It seems it can't deal with already noised Grayscale image, in other words, not only the image but even the "noise" is also gray. Do you have any idea whit this issue? Thanks!

kw81634dr avatar Nov 24 '19 15:11 kw81634dr