"Gated Fusion Network for Joint Image Deblurring and Super-Resolution" by Xinyi Zhang, Hang Dong, Zhe Hu, Wei-Sheng Lai, Fei Wang, Ming-Hsuan Yang(oral presentation on BMVC2018).
There are more details you can find on Project Website : http://xinyizhang.tech/bmvc2018.
- Python 3.6
- PyTorch >= 0.4.0
- torchvision
- numpy
- skimage
- h5py
- matlab R2017a
- Git clone this repository.
$git clone https://github.com/jacquelinelala/GFN.git
$cd GFN
- Download GOPRO_Large dataset from Google Drive.
- Download the trained model
GFN_4x.pth
from http://xinyizhang.tech/files/, then unzip and move theGFN_4x.pth
toGFN/models
folder. - Generate the validation images: Run matlab function
gopro_val_generator.m
which is in the directory of GFN/h5_generator. The generated test images will be stored in your_downloads_directory/GOPRO_Large/Validation_4x.
>> folder = 'your_downloads_directory/GOPRO_Large'; # You should replace the your_downloads_directory by your GOPRO_Large's directory.
>> gopro_val_generator(folder)
- Run the
GFN/test_GFN_x4.py
with cuda on command line:
GFN/$python test_GFN_x4.py --dataset your_downloads_directory/LR-GOPRO/Validation_4x
Then the deblurring and super-resolution images ending with GFN_4x.png are in the directory of GOPRO_Large/Validation/Results.
- Calculate the PSNR & SSIM using Matlab on directory of GFN/evaluation/.
In order to obtain a more stable training process, now we adopt a three-step training strategy, which differs from our paper.
You should accomplish the first two steps in Test on GOPRO Validation before the following steps.
- Generate the train hdf5 files: Run matlab function
gopro_hdf5_generator.m
which is in the directory of GFN/h5_generator. The generated hdf5 files are stored in the your_downloads_directory/GOPRO_Large/GOPRO_train256_4x_HDF5.
>> folder = 'your_downloads_directory/GOPRO_Large';
>> gopro_hdf5_generator(folder)
- Run the
GFN/train_GFN_4x.py
with cuda on command line:
GFN/$python train_GFN_4x.py --dataset your_downloads_directory/LR-GOPRO/GOPRO_train256_4x_HDF5
If you use these models in your research, please cite:
@conference{Zhang2018,
author = {Xinyi Zhang and Hang Dong and Zhe Hu and Wei-Sheng Lai and Fei Wang and Ming-Hsuan Yang},
title = {Gated Fusion Network for Joint Image Deblurring and Super-Resolution},
booktitle = {BMVC},
year = {2018}
}