Skip to content
/ GFN Public
forked from jacquelinelala/GFN

Gated Fusion Network for Joint Image Deblurring and Super-Resolution(BMVC2018)

Notifications You must be signed in to change notification settings

zhLawliet/GFN

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GFN

"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).

[arXiv][Slide]

There are more details you can find on Project Website : http://xinyizhang.tech/bmvc2018.

Archi heatmap

Dependencies

  • Python 3.6
  • PyTorch >= 0.4.0
  • torchvision
  • numpy
  • skimage
  • h5py
  • matlab R2017a

How to test:

Test on GOPRO Validation

  1. Git clone this repository.
$git clone https://github.com/jacquelinelala/GFN.git
$cd GFN
  1. Download GOPRO_Large dataset from Google Drive.
  2. Download the trained model GFN_4x.pth from http://xinyizhang.tech/files/, then unzip and move the GFN_4x.pth to GFN/models folder.
  3. 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)
  1. 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.

  1. Calculate the PSNR & SSIM using Matlab on directory of GFN/evaluation/.

Test on your own dataset

How to train

Train on GOPRO dataset

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.

  1. 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)
  1. 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

Citation

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}
}

About

Gated Fusion Network for Joint Image Deblurring and Super-Resolution(BMVC2018)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 52.6%
  • HTML 26.1%
  • C 18.0%
  • Python 3.1%
  • CSS 0.2%