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
- Python 3.6.5
- Tensorflow 1.10.1
- Pillow 5.0.0
- numpy 1.14.5
- Pretrained VGG19 file : vgg19.npy (for training!)
-
Download pretrained VGG19 file vgg19.npy
-
Download GOPRO dataset GOPRO dataset
-
Preprocessing GOPRO dataset.
python GOPRO_preprocess.py --GOPRO_path ./GOPRO/data/path --output_path ./data/output/path
- Train using GOPRO dataset.
python main.py --train_Sharp_path ./GOPRO/path/sharp --train_Blur_path ./GOPRO/path/blur
-
Download pretrained VGG19 file vgg19.npy
-
Preprocess your dataset. Blur image and sharp image pair should have same index when they are sorted by name respectively.
-
Train using GOPRO dataset.
python main.py --train_Sharp_path ./yourData/path/sharp --train_Blur_path ./yourData/path/blur
-
Download pre-trained model. pre_trained_model
-
Unzip the pre-trained model file
tar -cvf DeblurGAN_model.tar
- Deblur your own images
python main.py --mode test_only --pre_trained_model ./path/to/model --test_Blur_path ./path/to/own/images
- 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
- vgg19.py is fixed for my implementation.