/kernel-prediction-networks-PyTorch

Reimplement of 'Burst Denoising with Kernel Prediction Networks' and 'Multi-Kernel Prediction Networks for Denoising of Image Burst' by using PyTorch

Primary LanguagePython

Kernel Prediction Networks and Multi-Kernel Prediction Networks

Reimplement of Burst Denoising with Kernel Prediction Networks and Multi-Kernel Prediction Networks for Denoising of Image Burst by using PyTorch.

The partial work is following https://github.com/12dmodel/camera_sim.

TODO

Write the documents.

Requirements

  • Python3
  • PyTorch >= 1.0.0
  • Scikit-image
  • Numpy
  • TensorboardX (needed tensorflow support)

How to use this repo?

Firstly, you can clone this repo. including train and test codes. Download pretrained model for grayscale images at https://drive.google.com/open?id=1Xnpllr1dinAU7BIN21L3LkEP5AqMNWso, and for color images at https://drive.google.com/file/d/1Il-n7un_u8wWizjQ5ZKQ5hns7S27b0HW/view?usp=sharing.

The repo. supports multiple GPUs to train and validate, and the default setting is multi-GPUs. In other words, the pretrained model is obtained by training on multi-GPUs.

  • If you want to restart the train process by yourself, the command you should type is that
CUDA_VISIBLE_DEVICES=x,y train_eval_sym.py --cuda --mGPU -nw 4 --config_file ./kpn_specs/kpn_config.conf --restart

If no option of --restart, the train process could be resumed from when it was broken.

  • If you want to evaluate the network by pre-trained model directly, you could use
CUDA_VISIBLE_DEVICES=x,y train_eval_syn.py --cuda --mGPU -nw 4 --eval

If else option -ckpt is choosen, you can select the other models you trained.

  • Anything else.
    • The code for single image is not released now, I will program it in few weeks.

Results

on grayscale images:

The following images and more examples can be found at here.

Ground Truth Noisy Denoised
Ground Truth Noisy Denoised

on color images:

The following images and more examples can be found at here.

Ground Truth Noisy (PSNR: 19.34dB, SSIM: 0.595) Denoised (PSNR: 29.69dB, SSIM: 0.937)
Ground Truth Noisy (PSNR: 18.70dB, SSIM: 0.308) Denoised (PSNR: 34.02dB, SSIM: 0.954)
If you like this repo, Star or Fork to support my work. Thank you.