teboli / CPCR

Repository for ECCV2020 paper "End-to-end Interpretable Learning of Non-blind ImageDeblurring".
MIT License
28 stars 11 forks source link

CPCR

This repository is for the non-blind deblurring method introduced in the following paper

Thomas Eboli, Jian Sun and Jean Ponce, "End-to-end Interpretable Learning of Non-blind Image Deblurring", ECCV 2020, [arXiv].

Installation

Please first run the setup.py file with python setup.py install to compile the custom non-uniform convolution layer. This should work for any GPU. I used in my experiments pytorch 1.4.0 and cuda 9.0 but it should be ok to use more recent versions of these libraries.

Evaluation

One can directly use our pretrained model. We provide five real-world blurry images with kernels estimated with the code of [Pan et al., Blind Image Deblurring Using Dark Channel Prior, CVPR 2016] and the demo code in demo_real.py. We also provide one example of synthetic blurry and noisy (3% Gaussian noise) with uniform blur in demo_uniform.py and one example of synthetic blurry and noisy (1% Gaussian noise) with non-uniform motion blur obtained with the code of [Gong et al., From Motion Blur to Motion Flow: a Deep Learning Solution for Removing Heterogeneous Motion Blur, CVPR 2017] in demo_nonuniform.py.

Training

We provide the training code for both uniform and non-uniform setting in train_lchqs.py and train_nulchqs.ps where the default parameters enables to reproduce the results in the paper:

First line is blind training of the uniform model with Gaussian noises between 0.5 and 12.75 (5%) of magnitude. Second line is non-blind training of the uniform model with Gaussian noises 2.55 (1%) of magnitude. The third and fourth lines are the equivalent training scenarios for non-uniform deblurring.

Troubleshouting

In case of any trouble, please reach me at thomas.eboli@inria.fr or open an issue.

Citation

If you find the code helpful in your resarch or work, please cite the following paper.

@inproceedings{eboli2020end2end,
    title={End-to-end Interpretable Learning of Non-blind Image Deblurring},
    author={Eboli, Thomas and Sun, Jian and Ponce, Jean},
    booktitle={ECCV},
    year={2020}
}