Learning A Sparse Transformer Network for Effective Image Deraining

Xiang Chen, Hao‐Ran Li, Mingqiang Li, Jin-shan Pan
3/1/2023
645 citations
transformer-attention

Official code: cschenxiang/DRSformer (348 stars, Python, last commit 2025-07-06).

Abstract

Transformers-based methods have achieved significant performance in image deraining as they can model the non-local information which is vital for high-quality image reconstruction. In this paper, we find that most existing Transformers usually use all similarities of the tokens from the query-key pairs for the feature aggregation.

Show full abstract

However, if the tokens from the query are different from those of the key, the self-attention values estimated from these tokens also involve in feature aggregation, which accordingly interferes with the clear image restoration. To overcome this problem, we propose an effective DeRaining network, Sparse Transformer (DRSformer) that can adaptively keep the most useful self-attention values for feature aggregation so that the aggregated features better facilitate high-quality image reconstruction. Specifically, we develop a learnable top-k selection operator to adaptively retain the most crucial attention scores from the keys for each query for better feature aggregation. Simultaneously, as the naive feed-forward network in Transformers does not model the multi-scale information that is important for latent clear image restoration, we develop an effective mixed-scale feed-forward network to generate better features for image deraining. To learn an enriched set of hybrid features, which combines local context from CNN operators, we equip our model with mixture of experts feature compensator to present a cooperation refinement deraining scheme. Extensive experimental results on the commonly used benchmarks demonstrate that the proposed method achieves favorable performance against state-of-the-art approaches. The source code and trained models are available at https://github.com/cschenxiang/DRSformer.

View on arXivView PDF

Code Implementations(1)

Learning A Sparse Transformer Network for Effective Image Deraining (CVPR 2023)

34821Python, MATLABFeb 28, 20231 years ago

Similar Papers

Cite this paper

@article{chen2023learning,
  title  = {Learning A Sparse Transformer Network for Effective Image Deraining},
  author = {Xiang Chen and Hao‐Ran Li and Mingqiang Li and Jin-shan Pan},
  year   = {2023},
  eprint = {2303.11950},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/pdf/2303.11950},
  journal = {CVPR 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2303.11950.svg)](https://codeofpaper.com/paper/2303.11950)

Discussion