MaIR: A Locality-and Continuity-Preserving Mamba for Image Restoration

Boyun Li, Haiyu Zhao, Wenxin Wang, Peng Hu, Yuanbiao Gou +1 more
2/9/2026

No official code found. Best implementation: XLearning-SCU/2025-CVPR-MaIR (113 stars, last commit 2025-09-12).

Abstract

Recent advancements in Mamba have shown promising results in image restoration. These methods typically flatten 2D images into multiple distinct 1D sequences along rows and columns, process each sequence independently using selective scan operation, and recombine them to form the outputs. However, such a paradigm overlooks two vital aspects: i) the local relationships and spatial continuity inherent in natural images, and ii) the discrepancies among sequences unfolded through totally different ways. To overcome the drawbacks, we explore two problems in Mamba-based restoration methods: i) how to design a scanning strategy preserving both locality and continuity while facilitating restoration, and ii) how to aggregate the distinct sequences unfolded in totally different ways. To address these problems, we propose a novel Mamba-based Image Restoration model (MaIR), which consists of Nested S-shaped Scanning strategy (NSS) and Sequence Shuffle Attention block (SSA). Specifically, NSS preserves locality and continuity of the input images through the stripe-based scanning region and the S-shaped scanning path, respectively. SSA aggregates sequences through calculating attention weights within the corresponding channels of different sequences. Thanks to NSS and SSA, MaIR surpasses 40 baselines across 14 challenging datasets, achieving state-of-the-art performance on the tasks of image super-resolution, denoising, deblurring and dehazing. The code is available at https://github.com/XLearning-SCU/2025-CVPR-MaIR.

View on arXivView PDF

Code Implementations(1)

Pytorch implementation of CVPR 2025 paper, "MaIR: A Locality- and Continuity-Preserving Mamba for Image Restoration". The Code will be released very soon (Within 2 week)

1138C, C++Mar 5, 20251 years ago

Similar Papers

Cite this paper

@article{li2026mair,
  title  = {MaIR: A Locality-and Continuity-Preserving Mamba for Image Restoration},
  author = {Boyun Li and Haiyu Zhao and Wenxin Wang and Peng Hu and Yuanbiao Gou and Xi Peng},
  year   = {2026},
  eprint = {2412.20066},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2412.20066},
  journal = {CVPR 2024 2024}
}

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/2412.20066.svg)](https://codeofpaper.com/paper/2412.20066)

Discussion