I have made the repository workable on higher image dimensions.
To use it
- Make 4 folders FRAMES, DEBLUR_FRAMES, PATCHES and deblurPATCHES.
- Put your blurry image in FRAMES and name it as frame1.jpg.
- Run vidpatchipy.py. This will patch the image into patches of size 512 X 512 and saves them in PATCHES.
- Run deblur_image.py. This will deblur the patches in PATCHES and stores the deblurred patches in deblurPATCHES.
- Run vidjoiner.py. This will join the patches to form the final image and saves it in DEBLUR_FRAMES.
The default patch size is 512 X 512. This can be changed easily by making changes in shaper.py, vidpatchipy.py and vidjoiner.py
This repository is a Keras implementation of Deblur GAN. You can find a tutorial on how it works on Medium.
virtualenv venv -p python3
. venv/bin/activate
pip install -r requirements.txt
Get the GOPRO dataset, and extract it in the deblur-gan
directory. The directory name should be GOPRO_Large
.
Use:
python organize_gopro_dataset.py --dir_in=GOPRO_Large --dir_out=images
python train.py --n_images=512 --batch_size=16
Use python train.py --help
for all options
python test.py
Use python test.py --help
for all options