---
## 🔥🔥 Updates
- **Mar 2026 - Weights + Notebook Released** — Official Mamba-FCS checkpoints are now available on Hugging Face: https://huggingface.co/buddhi19/MambaFCS/tree/main, and the interactive evaluation/annotation notebook is available at `annotations/MambaFCS.ipynb`
- **Feb 2026 - Paper Published** — IEEE JSTARS (Official DOI: https://doi.org/10.1109/JSTARS.2026.3663066)
- **Jan 2026 - Accepted** — IEEE JSTARS (Camera-ready version submitted)
- **Jan 2026 - Code Released** — Full training pipeline with structured YAML configurations is now available
- **Aug 2025 - Preprint Released** — Preprint available on arXiv: https://arxiv.org/abs/2508.08232
Ready to push the boundaries of change detection? Let's go.
---
## 🔭 Overview
Semantic Change Detection in remote sensing is tough: seasonal shifts, lighting variations, and severe class imbalance constantly trip up traditional methods.
Mamba-FCS changes the game:
- **VMamba backbone** → linear-time long-range modeling (no more transformer VRAM nightmares)
- **JSF spatio–frequency fusion** → injects FFT log-amplitude cues into spatial features for appearance invariance + sharper boundaries
- **CGA module** → change probabilities actively guide semantic refinement (and vice versa)
- **SeK Loss** → finally treats rare classes with the respect they deserve
---
## ✨ Why Spatio–Frequency Matters
Remote sensing change detection suffers from **appearance shifts** (illumination, seasonal phenology, atmospheric effects).
Purely spatial feature fusion can overfit to texture/color changes, while **frequency-domain cues** capture structure and boundaries more consistently.
**Mamba-FCS explicitly combines:**
- **Spatial modeling (VMamba / state-space)** for long-range context
- **Frequency cues (FFT log-amplitude)** for appearance robustness
- **Change-guided cross-task attention** to tighten BCD ↔ SCD synergy
This spatio–frequency + change-guided design is a key reason for strong rare-class performance and cleaner semantic boundaries.
---
## 🧠 Method in ~30 Seconds
Feed in bi-temporal images **T1** and **T2**:
1. VMamba encoder extracts rich multi-scale features from both timestamps
2. JSF injects **frequency-domain log-amplitude (FFT)** into spatial features → stronger invariance to illumination/seasonal shifts
3. CGA leverages change cues to tighten BCD ↔ SCD synergy
4. Lightweight decoder predicts the final semantic change map
5. SeK Loss drives balanced optimization, even when changed pixels are scarce
Simple. Smart. Superior.
---
## ⚡ Quick Start
### 1. Download Released Mamba-FCS Weights
Pretrained Mamba-FCS checkpoints are now hosted on Hugging Face: [buddhi19/MambaFCS](https://huggingface.co/buddhi19/MambaFCS/tree/main).
Use these weights directly for inference and evaluation, or keep them alongside your experiment checkpoints for quick benchmarking.
### 2. Grab Pre-trained VMamba Weights
| Model | Links |
|---------------|----------------------------------------------------------------------------------------------------------|
| VMamba-Tiny | [Zenodo](https://zenodo.org/records/14037769) • [GDrive](https://drive.google.com/file/d/160PXughGMNZ1GyByspLFS68sfUdrQE2N/view?usp=drive_link) • [BaiduYun](https://pan.baidu.com/s/1P9KRVy4lW8LaKJ898eQ_0w?pwd=7qxh) |
| VMamba-Small | [Zenodo](https://zenodo.org/records/14037769) • [GDrive](https://drive.google.com/file/d/1dxHtFEgeJ9KL5WiLlvQOZK5jSEEd2Nmz/view?usp=drive_link) • [BaiduYun](https://pan.baidu.com/s/1RRjTA9ONhO43sBLp_a2TSw?pwd=6qk1) |
| VMamba-Base | [Zenodo](https://zenodo.org/records/14037769) • [GDrive](https://drive.google.com/file/d/1kUHSBDoFvFG58EmwWurdSVZd8gyKWYfr/view?usp=drive_link) • [BaiduYun](https://pan.baidu.com/s/14_syzqwNnVB8rD3tejEZ4w?pwd=q825) |
Set `pretrained_weight_path` in your YAML to the downloaded `.pth`.
### 3. Install
```bash
git clone https://github.com/Buddhi19/MambaFCS.git
cd MambaFCS
conda create -n mambafcs python=3.10 -y
conda activate mambafcs
pip install --upgrade pip
pip install -r requirements.txt
pip install pyyaml
````
### 4. Build Selective Scan Kernel (Critical Step)
```bash
cd kernels/selective_scan
pip install .
cd ../../..
```
(Pro tip: match your torch CUDA version with nvcc/GCC if you hit issues.)
---
## 🗂 Data Preparation
Plug-and-play support for **SECOND** and **Landsat-SCD**.
### SECOND Layout
```
/path/to/SECOND/
├── train/
│ ├── A/ # T1 images
│ ├── B/ # T2 images
│ ├── labelA/ # T1 class IDs (single-channel)
│ └── labelB/ # T2 class IDs
├── test/
│ ├── A/
│ ├── B/
│ ├── labelA/
│ └── labelB/
├── train.txt
└── test.txt
```
### Landsat-SCD
Same idea, with `train_list.txt`, `val_list.txt`, `test_list.txt`.
**Must-do**: Use integer class maps (not RGB). Convert palettes first.
---
## 🚀 Train & Evaluation
YAML-driven — clean and flexible.
1. Edit paths in `configs/train_LANDSAT.yaml` or `configs/train_SECOND.yaml`
2. Fire it up:
```bash
# Landsat-SCD
python train.py --config configs/train_LANDSAT.yaml
# SECOND
python train.py --config configs/train_SECOND.yaml
```
Checkpoints + TensorBoard logs land in `saved_models/