Home

Awesome

JDRL

The implementation of "Learning Single Image Defocus Deblurring with Misaligned Training Pairs".

Prerequisites

Datasets

Setting A

Setting B

Preparation (for flow estimation)

Download pwc-weight and put it under './pwc' folder.

Test

$ cd JDRL
MPRNet*: MPRNet with JDRL trained on SDD:
$ python test.py --test_path './SDD/test/' --checkpoint_path './checkpoint/mprnet-jdrl-sdd.pth' --model 'MPRNet'
UNet*: UNet with JDRL trained on SDD:
$ python test.py --test_path './SDD/test/' --checkpoint_path './checkpoint/unet-jdrl-sdd.pth' --model 'UNet'
MPRNet*: MPRNet with JDRL trained on DPDD:
$ python test.py --test_path './DPDD/test/' --checkpoint_path './checkpoint/mprnet-jdrl-dpdd.pth' --model 'MPRNet'

ifan-jdrl-dpdd: IFAN with JDRL trained on DPDD dataset. To test this model, please refer to IFAN.

Train

Start training (on SDD, UNet*)

$ cd JDRL
$ python train.py

To apply JDRL to other models trained on DPDD dataset: (i) initialize the reblurring module: keep the pretrained deblurring model weights fixed, and train the reblurring module for several epochs. (ii) decay the learning rate by 0.1~0.01, and jointly train the reblurring module and deblurring module (your model).