# ChangeMamba applies a state space model to change detection on satellite imagery

> ChangeMamba is the code for an IEEE TGRS 2024 paper on remote sensing change detection built on a spatio-temporal state space model, and it covers three tasks in one codebase: binary change detection, semantic change detection and building damage assessment. The repository also publishes trained weights and preprocessed data, which is what makes it usable rather than only reproducible in principle.

**ChenHongruixuan/ChangeMamba** — [IEEE TGRS 2024] ChangeMamba: Remote Sensing Change Detection Based on Spatio-Temporal State Space Model

- Repository: https://github.com/ChenHongruixuan/ChangeMamba
- Website: https://ieeexplore.ieee.org/document/10565926
- Stars: 656 · Forks: 48
- Language: Python
- License: Apache-2.0
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/chenhongruixuan-changemamba

## One paper, three change detection tasks

ChangeMamba is the code for a paper accepted by IEEE TGRS, and the paper title names the idea: remote sensing change detection based on a spatio-temporal state space model.

The authors are Hongruixuan Chen and Jian Song, who are marked as equal contributors, Chengxi Han, Junshi Xia, and Naoto Yokoya as the corresponding author. The affiliations are the University of Tokyo, RIKEN AIP and Wuhan University.

The scope is stated as three tasks in one codebase. ChangeMamba serves as a strong benchmark for change detection tasks, including binary change detection, which is MambaBCD, semantic change detection, which is MambaSCD, and building damage assessment, which is MambaBDA.

Those three are meaningfully different problems that happen to share machinery. Binary change detection asks whether anything changed between two images. Semantic change detection asks what changed, so it produces a per-pixel label transition. Building damage assessment asks what kind of damage occurred, which adds a classification dimension on top of the spatial one.

The second figure in the README shows the spatio-temporal relationship learning methods of ChangeMamba, which is the part of the design that distinguishes it from a plain convolutional change detection network. The state space model handles the temporal relationship between the two dates, and the spatial relationship learning handles the within-image structure.

The project is Python, Apache-2.0 licensed, with the last push on 2026-04-24 and no GitHub releases. The paper is on IEEE Xplore and on arXiv, and the trained models are published on Zenodo.

## Installation is a clone, a conda environment and a compiled kernel

The getting started section is straightforward, and it starts with an important constraint. The code in this repository runs under Linux, and the authors have not tested whether it works under other operating systems.

The repository is based on the VMamba repository, so you need to install that first, and the installation sequence given is taken from the VMamba repo.

The first step is to clone and navigate:

```bash
git clone https://github.com/ChenHongruixuan/ChangeMamba.git
cd ChangeMamba
```

The second step is the environment. A conda environment with pip dependencies is recommended:

```bash
conda create -n changemamba
conda activate changemamba
```

And then the dependencies:

```bash
pip install -r requirements.txt
cd kernels/selective_scan && pip install .
```

That second command is the one that catches people. The selective scan kernel is compiled from source as part of the install, and it is the piece that makes the state space model fast. The kernel directory sits at the top level of the repository alongside changedetection/, so the CUDA extension is part of the project rather than something you pull from elsewhere.

The requirements file is short and gives a hint about the stack. Torch, torchvision and torchaudio are unpinned, packaging and triton are there, timm is pinned at 0.4.12, and the rest are the usual research toolkit of pytest, chardet, yacs for configuration, termcolor, submitit for job submission on a cluster, tensorboardX for logging and fvcore, plus seaborn for plots.

The optional dependencies for detection and segmentation, mmengine, mmcv, mmdet, mmsegmentation and mmpretrain, are listed in the README but commented out, and they are marked as optional in VMamba. So you can run the change detection path without the full OpenMMLab stack.

## The weights are published, and that changes what you can do

The pretrained weights are the part of this repository that matters most for anyone who is not trying to reproduce the paper.

The README asks you to download the pretrained weights of VMamba-Tiny, VMamba-Small and VMamba-Base and put them under:

```bash
project_path/ChangeMamba/pretrained_weight/
```

So the backbone is not trained by you, and three sizes are available, which means the compute you need is a choice rather than a fixed cost.

The trained ChangeMamba models are published separately. The April 5th 2024 update says that the models and training code for MambaBCD, MambaSCD and MambaBDA have been organized and uploaded, and the April 18th 2024 update says that all weights of the ChangeMamba models on the BCD tasks were released. The Zenodo record is linked from the badge at the top of the README and from the download instructions, and it holds the models.

The May 21st 2025 update extended the training script to the BRIGHT dataset and released the corresponding checkpoints, which is a different dataset from the three named in the data preparation section, and the update links both the BRIGHT repository and the Zenodo record.

The preprocessed SECOND dataset is on the same Zenodo record, which is a substantial convenience because preparing semantic change detection data by hand involves several steps described below.

So the practical position is: you can obtain trained models for binary change detection, for semantic change detection and for building damage assessment, plus a preprocessed version of the semantic dataset, without running any training. For a research codebase, that is the difference between a result you can use in an afternoon and one you can only read about.

## Data preparation is where the work actually is

The data preparation section is the longest part of the documentation, and it is where the differences between the three tasks show up.

For binary change detection, the three datasets are SYSU, LEVIR-CD+ and WHU-CD, and the expected folder structure is given in full. It is the standard two-time-point layout, with a train directory containing T1 and T2 image folders and a GT folder for the ground truth masks, a test directory, and train_set.txt and test_set.txt files recording the names of the training and testing data.

For semantic change detection, the SECOND dataset is used, and there are two warnings that matter. The land-cover maps are RGB images in the original SECOND dataset for visualization, and you need to transform them into single-channel. And the binary change maps should be generated by yourself and put into a GT_CD folder. There is also a GT_T1 folder for the land-cover map of the first time point.

Both of those are real work and both are the kind of thing that silently degrades results if you get them wrong. Generating the binary change map from the semantic labels is a derivation step, and getting the land-cover maps into single-channel form changes what the model sees.

That is exactly why the preprocessed SECOND dataset is offered on the Zenodo record, and why the warning is written the way it is. If you use their preprocessed version you skip the conversion entirely, and if you prepare it yourself you have to do both steps.

The data directories are inside a `changedetection/` package at the top level of the repository, alongside the kernels directory and the figures directory. There is also a modelcard.sh script at the root and a requirements.txt.

## What the update history says about the project's life

The updates section is a running log and it tells you a lot about how the work has been received and how the repository has been maintained.

The paper was accepted by IEEE TGRS on June 17th 2024, and the Simplified Chinese version of the README became available on June 8th 2024, before the acceptance. From there the log is a sequence of IEEE recognitions: a Weekly Paper in July 2024, a Popular Paper in August 2024, a Highly Cited Paper in September 2024, an ESI Hot Paper in November 2024, then the same selection again in November 2025 for twelve consecutive months, and again in March 2026.

The models were released in April 2024, and the training script was extended to the BRIGHT dataset with checkpoints in May 2025.

Then in March 2026 the code was reorganized to tidy the repo, and the acceptance notice was updated to say the paper has been accepted by IEEE TGRS and to ask for a star.

That last item, the reorganisation, is the one that matters practically if you are picking this up now. A repository that has been reorganised recently may have different paths from what an older paper or an older issue thread describes, and the changelog and the current README are the authority on where things live rather than the paper's appendix.

The citation trail is worth noting too. The arXiv preprint is linked from the badge, the IEEE Xplore document is the homepage of the repository, and the models are on Zenodo with a DOI-style record. So the paper, the preprint and the artefacts are all separately citable, which is what you need if you are building on the work.

The documentation itself is bilingual, with the English README and a Simplified Chinese version at README_zh-CN.md, and the navigation links to an overview, a getting started section, a results section, a common issues section and a Q and A.

## Where this sits against a plain change detection network

The comparison is with the convolutional and transformer change detection networks that came before it, and the difference comes down to the model class rather than the task list.

Earlier architectures for change detection, siamese convolutional networks and the transformer-based variants that followed, typically take two images, run a shared or paired encoder over them, and fuse the features at some level. ChangeMamba replaces the sequence-modelling part of that with a state space model applied across time, and the paper's second figure is devoted to how the spatio-temporal relationships are learned.

The state space model family has a specific appeal here that is worth stating carefully. Mamba-style models are designed to be efficient on long sequences, and satellite change detection is a sequence problem in time with two time points, and the same mechanism can be extended to handle longer or multi-temporal inputs. The literature around this is what the repository's topic tags reflect, with spatio-temporal modeling and state-space-model among them.

Against a general-purpose change detection library, the difference is that this is a research artifact with its own architecture, its own three task variants and its own published weights, rather than a toolkit where you compose the pieces yourself. For a benchmark comparison that is exactly what you want, and for a production pipeline it may be more than you need.

The other comparison is with the datasets. SYSU, LEVIR-CD+ and WHU-CD for binary change detection are the standard trio, and the SECOND dataset for semantic change detection is the common one, so the numbers in the paper are comparable with other work on those datasets. That comparability is the real value of a benchmark release.

The limit worth being clear about is that a change detection model is only as good as the imagery and the labels, and none of this addresses the annotation quality of the training data. The gains in the paper are architectural, and they are measured against datasets with known labelling conventions, so a different region, a different sensor or a different labelling standard is a different problem.

## Conclusion

Adopt ChangeMamba if you are working on satellite change detection and want a strong published baseline with trained weights for binary change detection, semantic change detection and building damage assessment rather than training from scratch. Skip it if you need a Windows or macOS workflow, since the code runs under Linux and has not been tested on other systems, and if you cannot build a CUDA extension, since the selective scan kernel is compiled at install time. Verify first which task you are running, since each has its own data preparation and its own checkpoints, that you place the pretrained VMamba weights in the expected folder, and that you read the common issues section, because the dataset preprocessing steps, particularly the SECOND land-cover conversion, are the part people get wrong.

## FAQ

### What tasks does ChangeMamba cover and which paper is it from?

It is the code for a paper accepted by IEEE TGRS on remote sensing change detection with a spatio-temporal state space model. The repository covers three tasks: binary change detection as MambaBCD, semantic change detection as MambaSCD, and building damage assessment as MambaBDA, and the authors are from the University of Tokyo, RIKEN AIP and Wuhan University.

### How do I install ChangeMamba and set up the environment?

The code runs under Linux and has not been tested on other systems. Clone the repository, create and activate a conda environment with `conda create -n changemamba` and `conda activate changemamba`, then run `pip install -r requirements.txt` followed by `cd kernels/selective_scan && pip install .` to compile the selective scan kernel. The repository is based on VMamba, so you also need the pretrained VMamba-Tiny, VMamba-Small and VMamba-Base weights placed under `project_path/ChangeMamba/pretrained_weight/`.

### What data preparation does semantic change detection need with ChangeMamba?

The SECOND dataset is used, and the README gives two warnings. The land-cover maps are RGB images in the original dataset for visualization and have to be transformed into single-channel, and the binary change maps have to be generated by yourself and placed in the GT_CD folder, alongside a GT_T1 folder for the first time point's land-cover map. A preprocessed version of the SECOND dataset is also published on Zenodo if you want to skip that work.

## Sources

- [ChenHongruixuan/ChangeMamba on GitHub](https://github.com/ChenHongruixuan/ChangeMamba)
- [Issues](https://github.com/ChenHongruixuan/ChangeMamba/issues)
- [License: Apache-2.0](https://github.com/ChenHongruixuan/ChangeMamba/blob/master/LICENSE)
- [Project website](https://ieeexplore.ieee.org/document/10565926)
- [README](https://github.com/ChenHongruixuan/ChangeMamba/blob/master/README.md)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/chenhongruixuan-changemamba
