This repository contains the official PyTorch implementation of the following paper:
Learning to Deblur using Light Field Generated and Real Defocused Images
Lingyan Ruan*, Bin Chen*, Jizhou Li, Miuling Lam (* equal contribution)
IEEE Computer Vision and Pattern Recognition (CVPR Oral) 2022
PROJECT PAGE | INTERACTIVE WEB APP
If you find our code useful, please consider citing our paper:
@inproceedings{ruan2022learning,
title={Learning to Deblur using Light Field Generated and Real Defocus Images},
author={Ruan, Lingyan and Chen, Bin and Li, Jizhou and Lam, Miuling},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={16304--16313},
year={2022}
}
Notes: the code may also work with other library versions that didn't specify here.
Clone this project to your local machine
$ git clone https://github.com/lingyanruan/DRBNet.git
$ cd DRBNet
$ conda create -y --name DRBNet python=3.8.13 && conda activate DRBNet
$ sh install_CUDA11.1.1.sh
# Other version will be checked and updated later.
Download and unzip [pretrained weights] under ./ckpts/
:
$ python download_ckpts.py
# Weights will be placed in ./ckpts/
$ python download_test_set.py --DPDD --RealDOF --CUHK --PixelDP
# You may skip donwload the specific dataset by removing name, e.g., remove --PixelDP with command python download_test_set.py --DPDD --RealDOF --CUHK
The original full datasets could be found here: (LFDOF, DPDD, CUHK and RealDOF):
# Single Image input
$ python run.py --net_mode single --eval_data DPDD --save_images
# eval_data could be RealDOF, CUHK, PixelDP.
# Dual Image Input - DPDD Dataset
python run.py --net_mode dual --eval_data DPDD --save_images
You may go for DPDNet and KPAC-Net for their improved version. Details could be found in [Why LFDOF?] section (Table 4 & Figure 8) in the main paper. Their original version could be found Here: DPDNet-scr and Here: KPAC-Net-scr
- TCI'20 paper: AIFNet: All-in-focus Image Restoration Network using a Light Field-based Dataset [Paper] [Project page] [LFDOF Dataset] [Code]
Should you have any questions, please open an issue or contact me lyruanruan@gmail.com
Acknowledgment: Some of the codes are based on the IFAN
This software is being made available under the terms in the LICENSE file.