CM-UNet: Hybrid CNN-Mamba UNet for Remote Sensing Image Semantic Segmentation

Mushui Liu, Jun Dan, Ziqian Lu, Yunlong Yu, Yingming Li, Xi LiarXiv 2024

Abstract

Due to the large-scale image size and object variations, current CNN-based and Transformer-based approaches for remote sensing image semantic segmentation are suboptimal for capturing long-range dependencies or are limited by complex computational complexity. In this paper, we propose CM-UNet, comprising a CNN-based encoder for extracting local image features and a Mamba-based decoder for aggregating and integrating global information, facilitating efficient semantic segmentation of remote sensing images. Specifically, a CSMamba block is introduced to build the core segmentation decoder, which employs channel and spatial attention as the gate activation condition of the vanilla Mamba to enhance feature interaction and global-local information fusion. Moreover, to further refine the output features from the CNN encoder, a Multi-Scale Attention Aggregation (MSAA) module is employed to merge different scale features. By integrating the CSMamba block and MSAA module, CM-UNet effectively captures long-range dependencies and multi-scale global contextual information of large-scale remote-sensing images. Experimental results obtained on three benchmarks indicate that the proposed CM-UNet outperforms existing methods in various performance metrics.

1. Introduction

Remote sensing (RS) image semantic segmentation is a critical task in Earth observation. However, RS images present unique challenges: massive spatial dimensions and extreme variations in object scales, ranging from small vehicles to large building complexes. Traditional Convolutional Neural Networks (CNNs) excel at extracting local features but struggle with long-range dependencies due to limited receptive fields. Conversely, Vision Transformers (ViTs) capture global context via self-attention but suffer from quadratic computational complexity ($O(n^2)$), making them inefficient for high-resolution RS data.

2. CM-UNet Architecture

To address these limitations, we propose CM-UNet, a hybrid U-shaped network that combines the strengths of CNNs and State Space Models (SSMs).

The overall architecture of CM-UNet, featuring a ResNet encoder, MSAA skip connections, and a CSMamba-based decoder.

The architecture consists of three main components:

  1. CNN Encoder: A pre-trained ResNet backbone is used to extract fine-grained local features, preserving spatial details necessary for accurate boundary delineation.
  2. CSMamba Decoder: The decoder is constructed from novel CSMamba blocks that utilize the Mamba architecture to aggregate global information with linear complexity ($O(n)$).
  3. Multi-Scale Attention Aggregation (MSAA): This module replaces standard skip connections to fuse multi-level encoder features effectively using varying kernel sizes and attention mechanisms.

3. Core Innovations

3.1 CSMamba Block and 2D-SSM

The primary innovation is the CSMamba block, designed to adapt the 1D sequential processing of Mamba to 2D image data.

Detailed view of the CSMamba Block and the 2D-SSM module.

As shown in the figure above, the 2D-SSM module scans image patches in four directions to capture comprehensive spatial dependencies. To further enhance feature interaction, the CSMamba block incorporates Channel and Spatial Attention as a gating mechanism for the vanilla Mamba block, facilitating a more robust fusion of local and global contextual information.

3.2 Multi-Scale Attention Aggregation (MSAA)

The MSAA module refines the output from the CNN encoder before it enters the decoder. By employing parallel convolutions with varying kernel sizes (3x3, 5x5, 7x7) and attention mechanisms, MSAA ensures that the decoder receives a rich, multi-scale representation, which is vital for detecting objects of varying sizes in RS imagery.

4. Experimental Results

CM-UNet was evaluated on three benchmarks: ISPRS Potsdam, ISPRS Vaihingen, and LoveDA.

4.1 Performance and Efficiency

On the ISPRS Potsdam dataset, CM-UNet achieved state-of-the-art results with a 93.05% mF1 and 87.21% mIoU, outperforming established models like UNetformer.

Crucially, CM-UNet demonstrates exceptional efficiency. With only 12.89M parameters and 6.01 GFLOPs, it is significantly more lightweight than competing Transformer-based models (e.g., FTUNetformer at ~96M parameters) while delivering superior segmentation accuracy.

4.2 Qualitative Analysis

Visual inspections reveal that CM-UNet produces sharper object boundaries and fewer false positives in complex urban environments, particularly in shadowed regions where local-only features often fail. The model's ability to maintain a global receptive field allows it to distinguish large-scale structures more effectively than traditional CNNs.

5. Conclusion

CM-UNet represents a significant step forward in remote sensing image segmentation. By integrating the local feature extraction of CNNs with the efficient global modeling of Mamba, it achieves a superior balance between accuracy and computational cost. Future work will explore applying this hybrid architecture to other RS tasks such as change detection and land-cover classification in even more diverse environments.

Summary updated

BibTeX
@misc{liu2024cm,
  author = {Mushui Liu and Jun Dan and Ziqian Lu and Yunlong Yu and Yingming Li and Xi Li},
  title = {{CM-UNet: Hybrid CNN-Mamba UNet for Remote Sensing Image Semantic Segmentation}},
  year = {2024},
  eprint = {2405.10530},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.10530},
}
Figure