English | 简体中文
This repository contains the code implementation of the paper MDA-RSM: Multi-Directional Adaptive Remote Sensing Mamba for Building Extraction.
This project implements a multi-directional adaptive remote sensing Mamba (MDA-RSM) for high-precision building extraction on large-scale datasets with linear computational complexity.
Main Contributions:
A novel Mamba-based architecture, MDA-RSM, is proposed. MDA-RSM achieves efficient modeling of building features with both global contextual information and local details while preserving the intrinsic characteristics of large-scale VHR remote sensing images under linear computational complexity.
The idea of modeling the importance of Mamba scanning directions is introduced to remote sensing tasks for the first time. Considering the inherent spatial distribution patterns in remote sensing imagery, a Multi-Directional Adaptive Block (MDABlock) is designed, integrating diverse scanning modes and adaptive directional modeling to help the model focus on and retain critical directional features.
Extensive experiments validate the effectiveness and superiority of MDA-RSM. The results show that modeling the importance of scan directions significantly improves the model’s representation capability, achieving outstanding performance in building extraction.
If you find this project helpful, please give us a star ⭐️.
The project environment dependencies are specified in requirements.txt. You can refer to the configuration process of VMamba for setting up the environment.
git clone https://github.com/Joinzm/MDA-RSM.git
cd MDA-RSMStep 1: Follow the environment setup instructions in the Vmamba project to install the "mamba-env" environment. In our implementation, Python version 3.8 is used.
Step 2: Run the following command to install the required dependencies.
If you only need to use the model code, this step is not necessary.
bash
pip install -r requirements.txt
- Dataset download link: WHU Dataset.
- Dataset download link: Inria Dataset.
- Dataset download link: Massachusetts Dataset.
You need to organize the dataset in the following format:
# {DATASET_ROOT} Dataset root directory
├── train
├── image
└── 0001.png
└── 0002.png
└── ...
├── label
└── 0001.png
└── 0002.png
└── ...
├── val
├── image
└── 0001.png
└── 0002.png
└── ...
├── label
├── 0001.png
└── 0002.png
└── ...
├── test
├── image
└── 0001.png
└── 0002.png
└── ...
├── label
└── 0001.png
└── 0002.png
└── ...
The config folder contains models and training hyperparameters for different datasets, which can be imported for the training and testing process.
The model folder contains the source code for our model, while the utils folder contains various utility scripts, including dataset processing and model parameter statistics.
train.py is the training script; inference.py is the inference script; requirements.txt includes all the required dependencies for the project.
This project is licensed under the Apache 2.0 License.If you use code or performance benchmarks from this project in your research, please cite MDA-RSM.

