GitPedia

Deblur gan

Keras implementation of "DeblurGAN: Blind Motion Deblurring Using Conditional Adversarial Networks"

From RaphaelMeudec·Updated May 13, 2026·View on GitHub·

This repository is a Keras implementation of [Deblur GAN](https://arxiv.org/pdf/1711.07064.pdf). You can find a tutorial on how it works on [Medium](https://blog.sicara.com/keras-generative-adversarial-networks-image-deblurring-45e3ab6977b5). Below is a sample result (from left to right: sharp image, blurred image, deblurred image) The project is written primarily in Python, first published in 2018. Key topics include: gan, generative-adversarial-networks, image-deblurring, keras.

What is this repo ?

This repository is a Keras implementation of Deblur GAN. You can find a tutorial on how it works on Medium. Below is a sample result (from left to right: sharp image, blurred image, deblurred image)

Sample results

Installation

virtualenv venv -p python3
. venv/bin/activate
pip install -r requirements/requirements.txt
pip install -e .

Dataset

Get the GOPRO dataset, and extract it in the deblur-gan directory. The directory name should be GOPRO_Large.

Use:

python scripts/organize_gopro_dataset.py --dir_in=GOPRO_Large --dir_out=images

Training

python scripts/train.py --n_images=512 --batch_size=16 --log_dir /path/to/log/dir

Use python scripts/train.py --help for all options

Testing

python scripts/test.py

Use python scripts/test.py --help for all options

Deblur your own image

python scripts/deblur_image.py --weight_path=/path/to/generator.h5 --input_dir=/path/to/image/dir --output_dir=/path/to/deblurred/dir

Contributors

Showing top 5 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from RaphaelMeudec/deblur-gan via the GitHub API.Last fetched: 6/21/2026