Giter Site home page Giter Site logo

yuanyingtao / deblurgan-tf Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dongheehand/deblurgan-tf

0.0 1.0 0.0 23.92 MB

Tensorflow implementation of DeblurGAN(Blind Motion Deblurring Using Conditional Adversarial Networks)

Python 99.74% Shell 0.26%

deblurgan-tf's Introduction

DeblurGAN : Blind Motion Deblurring Using Conditional Adversarial Networks

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

Requirement

  • Python 3.6.5
  • Tensorflow 1.10.1
  • Pillow 5.0.0
  • numpy 1.14.5
  • Pretrained VGG19 file : vgg19.npy (for training!)

Datasets

Pre-trained model

Train using GOPRO dataset

  1. Download pretrained VGG19 file vgg19.npy

  2. Download GOPRO dataset GOPRO dataset

  3. Preprocessing GOPRO dataset.

python GOPRO_preprocess.py --GOPRO_path ./GOPRO/data/path --output_path ./data/output/path
  1. Train using GOPRO dataset.
python main.py --train_Sharp_path ./GOPRO/path/sharp --train_Blur_path ./GOPRO/path/blur

Train using your own dataset

  1. Download pretrained VGG19 file vgg19.npy

  2. Preprocess your dataset. Blur image and sharp image pair should have same index when they are sorted by name respectively.

  3. Train using GOPRO dataset.

python main.py --train_Sharp_path ./yourData/path/sharp --train_Blur_path ./yourData/path/blur

Deblur your own images

  1. Download pre-trained model. pre_trained_model

  2. Unzip the pre-trained model file

tar -cvf DeblurGAN_model.tar
  1. Deblur your own images
python main.py --mode test_only --pre_trained_model ./path/to/model --test_Blur_path ./path/to/own/images
  1. 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

Experimental results on GOPRO dataset

Blur Result Ground Truth

Comments

If you have any questions or comments on my codes, please email to me. [email protected]

Reference

[1]. https://github.com/KupynOrest/DeblurGAN

[2]. https://github.com/machrisaa/tensorflow-vgg

  • vgg19.py is fixed for my implementation.

deblurgan-tf's People

Contributors

dongheehand avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.