Giter VIP home page Giter VIP logo

nrknet's Introduction

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

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

  • 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
  • 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 [email protected]

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}
}

nrknet's People

Contributors

cszcwu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.