XiaoXiao-Woo / derain

A Decoder-free Transformer-like Architecture for High-efficiency Single Image Deraining (DFTL). As a deraining toolbox, it can easily introduce your own methods [Ready to use].

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Derain Methods

A Decoder-free Transformer-like Architecture for High-efficiency Single Image Deraining (IJCAI Long Oral, 3.7%)

Xiao Wu, Ting-Zhu Huang, Liang-Jian Deng, Tian-Jing Zhang

Paper | Video

Abstract: Despite the success of vision Transformers for the image deraining task, they are limited by computation-heavy and slow runtime. In this work, we investigate Transformer decoder is not necessary and has huge computational costs. Therefore, we revisit the standard vision Transformer as well as its successful variants and propose a novel Decoder-Free Transformer-Like (DFTL) architecture for fast and accurate single image deraining. Specifically, we adopt a cheap linear projection to represent visual information with lower computational costs than previous linear projections. Then we replace standard Transformer decoder block with designed Progressive Patch Merging (PPM), which attains comparable performance and efficiency. DFTL could significantly alleviate the computation and GPU memory requirements through proposed modules. Extensive experiments demonstrate the superiority of DFTL compared with competitive Transformer architectures, e.g., ViT, DETR, IPT, Uformer, and Restormer.


Toy Example

image

Training and Evaluation

Training and Testing for Deraining:

Derain Dataset Visual Results
Rain200L Link Download
Rain200H Link Download
DID Link Download
DDN Link Download

Step1.

  • Download datasets and put it with the following format.

  • Verify the dataset path in configs/configs.py.

|-$ROOT/data
├── Rain200H
│   ├── train_c
│   │   ├── norain-1.png
│   │   ├── ...
│   ├── test_c
│   │   │   ├── norain-1.png
│   │   │   ├── ...

Step2. Open codes in your ide, run the following code:

python run_derain.py

  • A training example:

    run_derain.py

    where arch='Restormer', and configs/option_Restormer.py has:

    cfg.eval = False,

    cfg.workflow = [('train', 50)], cfg.dataset = {'train': 'Rain200H'}

  • A test example:

    run_derain_test.py

    cfg.dataset = {'val': 'Rain200H'}

    cfg.eval = True or cfg.workflow = [('val', 1)]

Let's start to run our DFTL.

Currently, you can run run_DFTLW.py or run_DFTLX.py in Link.

Note: [Ready to use] Our project is based on MMCV, but you needn't to install it and master MMCV. More importantly, it can be more easy to introduce more methods.

Benchmark

We provide simple pipelines to train/test/inference models for a quick start.

Derain model zoo:
  • DSC (ICCV'2015)
  • GMM (CVPR'2016)
  • Clear (TIP'2017)
  • DDN (CVPR'2017)
  • RESCAN (ECCV'2018)
  • NLEDN (ACMMM'2018)
  • PReNet (CVPR'2019)
  • FBL (AAAI'2020)
  • RCDNet (CVPR'2020)
  • DualGCN (AAAI'2021)
  • IPT (CVPR'2021)
  • Uformer (CVPR'2022)
  • Restormer (CVPR'2022)

Citation

If it is helpful for you, please kindly cite our paper:

  @inproceedings{DFTL,
    title     = {A Decoder-free Transformer-like Architecture for High-efficiency Single Image Deraining},
    author    = {Wu, Xiao and Huang, Ting-Zhu and Deng, Liang-Jian and Zhang, Tian-Jing},
    booktitle = {Proceedings of the Thirty-First International Joint Conference on
                 Artificial Intelligence (IJCAI-22)},
    pages     = {1474--1480},
    year      = {2022},
    month     = {7},
    doi       = {10.24963/ijcai.2022/205},
  }

Contact

Should you have any question, please contact wxwsx1997@gmail.com;

Acknowledgment: This code is based on the MMCV toolbox and Restormer.

Our Related Works

  • "PanCollection" for Remote Sensing Pansharpening, **图象图形学报 2022. Paper | Code
  • Dynamic Cross Feature Fusion for Remote Sensing Pansharpening, ICCV 2021. Paper | Code

License & Copyright

This project is open sourced under GNU General Public License v3.0.

About

A Decoder-free Transformer-like Architecture for High-efficiency Single Image Deraining (DFTL). As a deraining toolbox, it can easily introduce your own methods [Ready to use].

License:GNU General Public License v3.0


Languages

Language:Python 46.7%Language:Cuda 13.1%Language:C++ 13.0%Language:Jupyter Notebook 12.7%Language:MATLAB 8.3%Language:C 3.5%Language:TeX 1.1%Language:Lua 0.9%Language:Shell 0.6%Language:Makefile 0.1%Language:M 0.0%Language:CSS 0.0%Language:Batchfile 0.0%Language:Objective-C 0.0%Language:JavaScript 0.0%Language:Dockerfile 0.0%Language:HTML 0.0%