Coder Social home page Coder Social logo

dpanet's Introduction

DPANet

The implementation of "Learning Dual-Pixel Alignment for Defocus Deblurring".

Prerequisites

  • The code has been tested with the following environment
    • Ubuntu 18.04
    • Python 3.7.9
    • PyTorch 1.7.0
    • cudatoolkit 10.0.130
    • NVIDIA TITAN RTX GPU

Datasets

Training datasets

Testing datasets

Preparation (for DCNv2)

$ cd DPANet
$ python setup.py build develop

Test

$ cd DPANet
$ python test.py

For more results, you can refer to More results on DPDD.

Train

  • First, crop the images of DPDD train set into 512*512 patches using the same settings as DPDNet. (You can use $ python ./image_to_patch_filter.pyfrom DPDD to get the patches.)
  • After getting the training patches, please organize the training dataset according to our code implementation: $ mkdir dpdd_datasets/dpdd_16bit, then move the train/test folder into the directory just created.

Start training

$ cd DPANet
$ python train.py

During training, we first train DPANet with MSE loss. After that, we choose the checkpoint that gives the best result among all the epochs (about 300 epochs, example ckpt trained with MSE) and finetune it with Charbonnier loss.

Results

Here we give results of different methods on DPDD and PIXEL datasets.

dpanet's People

Contributors

liyucs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

dpanet's Issues

cropping patch for training

In DPANet,the method of getting training image patches is differen with DPDD.
What are the advantages of your processing?

Gets some problems when I run python setup.py build develop

Hello, Dear sir,

Thanks your for you kindly sharing your code.
And I actually meet some error "AssertionError: Torch not compiled with CUDA enabled" when I run the command lines
$ cd DPANet
$ python setup.py build develop.

I think it might be caused by the version of CUDA in my PC (my cudatools or something related to CUDA is much higher than cudatoolkits 10.2). Could please you give me some suggestions about this error? And I would like to ask why do you use the compiled code of DCN2 but not use the code of DCN2 which is no need to compile the CPP?

Best regards

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.