Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Repository for Scale-recurrent Network for Deep Image Deblurring

License

NotificationsYou must be signed in to change notification settings

jiangsutx/SRN-Deblur

Repository files navigation

byXin 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

Prerequisites

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

Installation

Clone this project to your machine.

git clone https://github.com/jiangsutx/SRN-Deblur.gitcd SRN-Deblur

Testing

Download pretrained models through:download_model.sh insidecheckpoints/.

To test blur images in a folder, just use arguments--input_path=<TEST_FOLDER> and save the outputs to--output_path=<OUTPUT_FOLDER>.For example:

python run_model.py --input_path=./testing_set --output_path=./testing_res

If you have a GPU, please include--gpu argument, and add your gpu id to your command.Otherwise, use--gpu=-1 for CPU.

python run_model.py --gpu=0

To test the model, pre-defined height and width of tensorflowplaceholder should be assigned.Our network requires the height and width be multiples of16.When the gpu memory is enough, the height and width could be assigned tothe maximum to accommodate all the images.

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

According to our experience,--height=720 and--width=1280 work wellon a Gefore GTX 1050 TI with 4GB memory. For example,

python run_model.py --height=720 --width=1280

Evaluation

The quantitative results ofPSNR andSSIM in the paper iscalculated using MATLAB built-in functionpsnr() andssim() basedon the generated color results.

Training

We trained our model using the dataset fromDeepDeblur_release.Please put the dataset intotraining_set/. And the provideddatalist_gopro.txtcan be used to train the model.

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

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

Models

We provided 3 models (training settings) for testing:

  1. --model=lstm: This model implements exactly the same structure in our paper.Current released model weights should producePSNR=30.19, SSIM=0.9334 on GOPRO testing dataset.
  2. --model=gray: According to our further experiments after paper acceptance, we are ableto get a slightly better model by tuning parameters, even without LSTM.This model should produce visually sharper and quantitatively better results.
  3. --model=color: Previous models are trained on gray images, and may produce colorringing 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 usemodelgray andlstm.If you want to restore blurry images you can trygray andcolor.Andcolor is very useful in low-light noisy images.

Reference

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

@inproceedings{tao2018srndeblur,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)},year={2018}}

Contact

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

Please send email toxtao@cse.cuhk.edu.hk

Reference

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

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

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

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp