by jiangsutx

jiangsutx / SRN-Deblur

Repository for Scale-recurrent Network for Deep Image Deblurring

509 Stars 156 Forks Last release: Not found MIT License 12 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Scale-recurrent Network for Deep Image Deblurring

by Xin Tao, Hongyun Gao, Xiaoyong Shen, Jue Wang, Jiaya Jia. (pdf)

Our results on real data

Real Photo

Results on the testing dataset

Testing Dataset

More cases on real photos from previous papers:

More Cases


  • Python2.7
  • Scipy
  • Scikit-image
  • numpy
  • Tensorflow 1.4 with NVIDIA GPU or CPU (cpu testing is very slow)


Clone this project to your machine.

git clone
cd SRN-Deblur


Download pretrained models through:

To test blur images in a folder, just use arguments

and save the outputs to
. For example:
python --input_path=./testing_set --output_path=./testing_res

If you have a GPU, please include

argument, and add your gpu id to your command. Otherwise, use
for CPU.
python --gpu=0

To test the model, pre-defined height and width of tensorflow placeholder should be assigned. Our network requires the height and width be multiples of

. When the gpu memory is enough, the height and width could be assigned to the maximum to accommodate all the images.

Otherwise, the images will be downsampled by the largest scale factor to be fed into the placeholder. And results will be upsampled to the original size.

According to our experience,

work well on a Gefore GTX 1050 TI with 4GB memory. For example,
python --height=720 --width=1280


The quantitative results of PSNR and SSIM in the paper is calculated using MATLAB built-in function

based on the generated color results.


We trained our model using the dataset from DeepDeblur_release. Please put the dataset into

. And the provided
can be used to train the model.

Hyper parameters such as batch size, learning rate, epoch number can be tuned through command line:

python --phase=train --batch=16 --lr=1e-4 --epoch=4000


We provided 3 models (training settings) for testing: 1.

: This model implements exactly the same structure in our paper. Current released model weights should produce
PSNR=30.19, SSIM=0.9334
on GOPRO testing dataset. 2.
: According to our further experiments after paper acceptance, we are able to get a slightly better model by tuning parameters, even without LSTM. This model should produce visually sharper and quantitatively better results. 3.
: Previous models are trained on gray images, and may produce color ringing artifacts. So we train a model directly based on RGB images. This model keeps better color consistency, but the results are less sharp.

How to choose

If you would like to compare performance against our method, you can use model

. If you want to restore blurry images you can try
. And
is very useful in low-light noisy images.


If you use any part of our code, or SRN-Deblur is useful for your research, please consider citing:

  title={Scale-recurrent Network for Deep Image Deblurring},
  author={Tao, Xin and Gao, Hongyun and Shen, Xiaoyong and Wang, Jue and Jia, Jiaya},
  booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},


We are glad to hear if you have any suggestions and questions.

Please send email to [email protected]



Sun et al.
J. Sun, W. Cao, Z. Xu, and J. Ponce. Learning a convolutional neural network for non-uniform motion blur removal. In CVPR, pages 769–777. IEEE, 2015.


Nah et al.
S. Nah, T. H. Kim, and K. M. Lee. Deep multi-scale convolutional neural network for dynamic scene deblurring. pages 3883–3891, 2017.


Whyte et al.
O. Whyte, J. Sivic, A. Zisserman, and J. Ponce. Nonuniform deblurring for shaken images. International Journal on Computer Vision, 98(2):168–186, 2012.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.