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]
:
- 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, laurentdandres@gmail.com), 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
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
- 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
Test with your re-trained models
- 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
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}
}