Skip to content

kakaxi314/D3R

Repository files navigation

Introduction

This is the pytorch implementation of our paper.

Dependency

PyTorch 1.8

Setup

Compile functions for PSC layer:

cd exts
python setup.py install

Dataset

Please download MIT, Kodak, and Mcm dataset. The structure of data directory:

└── datas
    └── color
        ├── test
        │   ├── filelist.txt
        │   ├── hdrvdp
        │   ├── kodak
        │   ├── mcm
        │   └── moire
        ├── train
        │   ├── check.py
        │   ├── filelist.txt
        │   ├── hdrvdp
        │   └── moire
        └── val
            ├── hdrvdp
            └── moire

Then pack images into lmdb files.

python create_lmdb.py

Configs

The config of different settings:

  • DB.yaml (Demosaicing for Bayer CFA Pattern)
  • DL.yaml (Demosaicing for 4x4 Learned CFA Pattern)
  • DLN.yaml (Demosaicing for 4x4 Learned CFA Pattern with Noisy Data)

Trained Models

You can directly download the model I trained:

Train

You can also train by yourself:

python train.py

Pay attention to the settings in the config file (e.g. gpu id).

Test

With the trained model, you can test and save demosaiced results.

python test.py

Citation

If you find this work useful in your research, please consider citing:

@article{D3R,
author = {Tang, Jie and Li, Jian and Tan, Ping},
title = {Demosaicing by Differentiable Deep Restoration},
journal = {Applied Sciences},
volume = {11},
year = {2021},
number = {4},
article-number = {1649},
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published