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.
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).
During the training of text removal model, random number of text units were added.
For more details, check out dataset.py.
- 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.
- 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
To run test on images in /test_images, run command:
python n2n_test.py
The noise type can be edited in n2n_test.py
Gaussian Noise:
Source Image | Denoised Image |
Text Overlay
Source Image | Denoised Image |