Home

Awesome

Neumann Network with Recursive Kernels for Single Image Defocus Deblurring<br><sub>Official PyTorch Implementation of the CVPR 2023 Paper</sub><br><sub>

This repo contains training and evaluation code for the following paper:

Neumann Network with Recursive Kernels for Single Image Defocus Deblurring.

IEEE Computer Vision and Pattern Recognition (CVPR) 2023

Getting Started

Prerequisites

conda create -n NRKNet python=3.7
conda activate NRKNet
cd ./NRKNet
pip install -r requirements.txt

Datasets

Download and unzip datasets under [DATASET_ROOT]:

[DATASET_ROOT]
 ├── DPDD
 ├── RealDOF
 ├── CUHK
 ├── LFDOF
 └── RTF
 

[DATASET_ROOT] can be modified with [config.data_offset] in ./config.py.

Train the NRKNet

Train the NRKNet with different training datasets (DPDD | LFDOF).

# Trained with DPDD
CUDA_VISIBLE_DEVICES=0 python train_DPDD.py

# Trained with LFDOF
CUDA_VISIBLE_DEVICES=0 python train_LFDOF.py

Test the NRKNet

Download the pre-trained models

Download the pre-trained models and unzip datasets under [NRKNet-main]:

Options

CUDA_VISIBLE_DEVICES=0 python test.py

Test with your re-trained models

# From
train['resume'] = './save/NRKNet_' + train['train_dataset_name'] + '/0'

#To
train['resume'] = './save/NRKNet_' + train['train_dataset_name'] + '/1'

Contact

Open an issue for any inquiries. You may also have contact with zicongwu.scut@gmail.com

Citation

@inproceedings{quan2023neumann,
  title={Neumann Network With Recursive Kernels for Single Image Defocus Deblurring},
  author={Yuhui Quan, Zicong Wu and Hui Ji},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  pages={5754--5763},
  year={2023}
}