Git Product home page Git Product logo

peterzs / fourier-deconvolution-network Goto Github PK

View Code? Open in Web Editor NEW

This project forked from uschmidt83/fourier-deconvolution-network

0.0 0.0 0.0 22.6 MB

Code for ICCV 2017 paper "Learning to Push the Limits of Efficient FFT-based Image Deconvolution" (Jakob Kruse, Carsten Rother, and Uwe Schmidt)

License: BSD 2-Clause "Simplified" License

IDL 0.22% Jupyter Notebook 99.04% Python 0.74%

fourier-deconvolution-network's Introduction

Fourier Deconvolution Network

The code in this repository implements image deconvolution as described in the paper:

Jakob Kruse, Carsten Rother, and Uwe Schmidt.
Learning to Push the Limits of Efficient FFT-based Image Deconvolution.
IEEE International Conference on Computer Vision (ICCV), Venice, Italy, October 2017.

Please cite the paper if you are using this code in your research.

Dependencies

  • Compatible with Python 2 and 3.
  • Main requirements: Keras 2+ and TensorFlow 1.3+.
    Install via pip install -r requirements.txt.

Usage

You can see a demonstration of how to use fdn_predict.py in the Jupyter notebook demo.ipynb.
Please "watch" this repository if you want to be notified of further updates.

$ python fdn_predict.py -h
Using TensorFlow backend.
usage: fdn_predict.py [-h] --image IMAGE --kernel KERNEL --sigma SIGMA
                      [--flip-kernel [FLIP_KERNEL]] [--model-dir MODEL_DIR]
                      [--n-stages N_STAGES] [--finetuned [FINETUNED]]
                      [--output OUTPUT] [--save-all-stages [SAVE_ALL_STAGES]]
                      [--quiet [QUIET]]

optional arguments:
  -h, --help            show this help message and exit
  --quiet [QUIET]       don't print status messages (default: False)

input:
  --image IMAGE         blurred image (default: None)
  --kernel KERNEL       blur kernel (default: None)
  --sigma SIGMA         standard deviation of Gaussian noise (default: None)
  --flip-kernel [FLIP_KERNEL]
                        rotate blur kernel by 180 degrees (default: False)

model:
  --model-dir MODEL_DIR
                        path to model (default: models/sigma_1.0-3.0)
  --n-stages N_STAGES   number of model stages to use (default: 10)
  --finetuned [FINETUNED]
                        use finetuned model weights (default: True)

output:
  --output OUTPUT       deconvolved result image (default: None)
  --save-all-stages [SAVE_ALL_STAGES]
                        save all intermediate results (if finetuned is false)
                        (default: False)

Note

We currently do not recommend to run our code on the CPU.

  • While our deconvolution method is inherently efficient, the implementation is currently not optimized for speed. In particular, fast Fourier transforms (FFTs) in TensorFlow (TF) are not very fast. Running on the CPU is especially slow, since TF seems to use single-threaded FFTs that are much slower than high-performance implementations like FFTW.
  • Even more problematic than the issue of much increased runtime, we found that the results of our models can be substantially worse when the code is executed on the CPU. For the sake of reproducible research, please note that our results in the paper were obtained with an NVIDIA Titan X GPU.

fourier-deconvolution-network's People

Contributors

uschmidt83 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.