Skip to content

sashrika15/noise2noise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Noise2Noise: Learning Image Restoration without Clean Data

Noise2Noise is an image-denoising model which is trained on noisy data only. This implementation is based on the ICML 2018 paper by Jaakko Lehtinen et al.

Some Specific Details

For denoising Gaussian noise

For Gaussian denoising, the model was trained with a mean of 10 and a standard deviation in the range [20, 50] (sampled randomly from an uniform distribution).

For Text Removal

During the training of text removal model, random number of text units were added.

For more details, check out dataset.py.

Summary

  • This model works for additive gaussian noise and text removal only. It does not include poisson noise and Monte Carlo Rendering discussed in the paper.
  • U-Net architecture is followed throughout the model. The original paper used a “RED30” network (Mao et al., 2016) for additive gaussian noise.
  • The weights were made available by Joey Litalien's implementation here.
  • For additive gaussian noise, sigma or the standard deviation is an important hyperparameter. If the noise level is greater than thrice of sigma, the denoiser is unable to present a clear image.
  • The text overlay function works within a random integer range to add a random string to the image. The denoiser works better for small sized strings which cover less pixels.

Usage

  • The model is initialised with the noise type. For 'test' mode, a data_path is required which contains the path to test images. For 'inference' mode, a PIL image or the path to the image is required as input. The show parameter can be set to 'True' to display the images after denoising.
  • The available noise types are: gaussian, text

Test

To run test on images in /test_images, run command:

python n2n_test.py

The noise type can be edited in n2n_test.py

Example

Gaussian Noise:

Source Image Denoised Image

Text Overlay

Source Image Denoised Image

About

Pytorch implementation of Noise2Noise paper.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages