An implementation of DeblurGAN described in the paper using tensorflow.
Published in CVPR 2018, written by O. Kupyn, V. Budzan, M. Mykhailych, D. Mishkin and J. Matas
1) Download pretrained VGG19 file vgg19.npy
2) Download GOPRO dataset GOPRO dataset
3) Preprocessing GOPRO dataset.
python GOPRO_preprocess.py --GOPRO_path ./GOPRO/data/path --output_path ./data/output/path
4) Train using GOPRO dataset.
python main.py --train_Sharp_path ./GOPRO/path/sharp --train_Blur_path ./GOPRO/path/blur
1) Download pretrained VGG19 file vgg19.npy
2) Preprocess your dataset. Blur image and sharp image pair should have same index when they are sorted by name respectively.
3) Train using GOPRO dataset.
python main.py --train_Sharp_path ./yourData/path/sharp --train_Blur_path ./yourData/path/blur
1) Download pre-trained model. pre_trained_model
2) Unzip the pre-trained model file
tar -cvf DeblurGAN_model.tar
3) Deblur your own images
python main.py --mode test_only --pre_trained_model ./path/to/model --test_Blur_path ./path/to/own/images
4) If you have an out of memory(OOM) error, please use chop_forward option
python main.py --mode test_only --pre_trained_model ./path/to/model --test_Blur_path ./path/to/own/images --in_memory True --chop_forward True
Experimental results on GOPRO dataset
Blur | Result | Ground Truth |
---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If you have any questions or comments on my codes, please email to me. son1113@snu.ac.kr
[1]. https://github.com/KupynOrest/DeblurGAN
[2]. https://github.com/machrisaa/tensorflow-vgg