Skip to content

PyTorch implementation of Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising (TIP 2017)

Notifications You must be signed in to change notification settings

yjn870/DnCNN-pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DnCNN

This repository is implementation of the "Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising".

Requirements

  • PyTorch
  • Tensorflow
  • tqdm
  • Numpy
  • Pillow

Tensorflow is required for quickly fetching image in training phase.

Results

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

Usages

Train

When training begins, the model weights will be saved every epoch.
If you want to train quickly, you should use --use_fast_loader option.

DnCNN-S

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              

DnCNN-B

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              

DnCNN-3

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              

Test

Output results consist of noisy image and denoised image.

python example --arch "DnCNN-S" \
               --weights_path "" \
               --image_path "" \
               --outputs_dir "" \
               --jpeg_quality 25               

About

PyTorch implementation of Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising (TIP 2017)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages