This repository is implementation of the "Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising".
- PyTorch
- Tensorflow
- tqdm
- Numpy
- Pillow
Tensorflow is required for quickly fetching image in training phase.
The DnCNN-3 is only a single model for three general image denoising tasks, i.e., blind Gaussian denoising, SISR with multiple upscaling factors, and JPEG deblocking with different quality factors.
JPEG Artifacts (Quality 40) | DnCNN-3 |
Gaussian Noise (Level 25) | DnCNN-3 |
Super-Resolution (Scale x3) | DnCNN-3 |
When training begins, the model weights will be saved every epoch.
If you want to train quickly, you should use --use_fast_loader option.
python main.py --arch "DnCNN-S" \
--images_dir "" \
--outputs_dir "" \
--gaussian_noise_level 25 \
--patch_size 50 \
--batch_size 16 \
--num_epochs 20 \
--lr 1e-3 \
--threads 8 \
--seed 123 \
--use_fast_loader
python main.py --arch "DnCNN-B" \
--images_dir "" \
--outputs_dir "" \
--gaussian_noise_level 0,55 \
--patch_size 50 \
--batch_size 16 \
--num_epochs 20 \
--lr 1e-3 \
--threads 8 \
--seed 123 \
--use_fast_loader
python main.py --arch "DnCNN-3" \
--images_dir "" \
--outputs_dir "" \
--gaussian_noise_level 0,55 \
--downsampling_factor 1,4 \
--jpeg_quality 5,99 \
--patch_size 50 \
--batch_size 16 \
--num_epochs 20 \
--lr 1e-3 \
--threads 8 \
--seed 123 \
--use_fast_loader
Output results consist of noisy image and denoised image.
python example --arch "DnCNN-S" \
--weights_path "" \
--image_path "" \
--outputs_dir "" \
--jpeg_quality 25