Neumann Network with Recursive Kernels for Single Image Defocus Deblurring
Official PyTorch Implementation of the CVPR 2023 Paper
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
conda create -n NRKNet python=3.7
conda activate NRKNet
cd ./NRKNet
pip install -r requirements.txt
Download and unzip datasets under [DATASET_ROOT]
:
- DPDD dataset: Google Drive | Dropbox
- CUHK test set: Google Drive | Dropbox
- RealDOF test set: Google Drive | Dropbox
- LFDOF dataset: Download path
- RTF test set: Please contact the author (Laurent, [email protected]), he will kindly share the dataset and necessary information with you.
[DATASET_ROOT]
├── DPDD
├── RealDOF
├── CUHK
├── LFDOF
└── RTF
[DATASET_ROOT]
can be modified with [config.data_offset
] in./config.py
.
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
Download the pre-trained models and unzip datasets under [NRKNet-main]
:
-
Select the training and testing datasets in config.py.
- 'train['train_dataset_name']': The name of a dataset to train.
DPDD
|LFDOF
. Default:DPDD
- 'test['dataset']': The name of a dataset to evaluate.
DPDD
|LFDOF
|RTF
|RealDOF
. Default:DPDD
- 'train['train_dataset_name']': The name of a dataset to train.
-
Run test.py.
CUDA_VISIBLE_DEVICES=0 python test.py
- Modify the path of a re-trained model in config.py.
# From
train['resume'] = './save/NRKNet_' + train['train_dataset_name'] + '/0'
#To
train['resume'] = './save/NRKNet_' + train['train_dataset_name'] + '/1'
-
Select the training and testing datasets in config.py.
-
Run test.py
Open an issue for any inquiries. You may also have contact with [email protected]
@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}
}