metadata
license: other
library_name: pytorch
pipeline_tag: image-segmentation
tags:
- remote-sensing
- change-detection
- binary-change-detection
- semantic-segmentation
- mamba
- mambarefine-cd
- mercon
metrics:
- f1
- iou
- precision
- recall
MambaRefine-CD
MambaRefine-CD is a remote sensing binary change detection model. It takes a bi-temporal image pair as input and outputs a binary change mask. The paper has been accepted at MERCon. This Hugging Face repository contains trained weights, configs, and usage instructions.
Model Details
- Model name: MambaRefine-CD
- Task: binary remote sensing change detection
- Input: pre-change and post-change image pair
- Output: binary change mask
- Framework: PyTorch
- Paper status: Accepted at MERCon
- GitHub repository:
https://github.com/Dineth14/MambaRefine-CD
Released Checkpoints
| Dataset | Checkpoint | Config | Train Split | Validation Split | Test Split | Main Metric | Notes |
|---|---|---|---|---|---|---|---|
| WHU-CD | checkpoints/mambarefine_cd_whu_cd_best.pth |
configs/whu_cd_run_config.yaml |
6096 samples | 762 samples | 762 samples | Test F1 95.5324 | Best validation checkpoint, iteration 45000, threshold 0.55, EMA found. |
| DSIFN-CD | checkpoints/mambarefine_cd_dsifn_cd_best.pth |
configs/dsifn_cd_run_config.yaml |
3153 samples | 3152 samples | Not specified in selected run manifest | Test F1 96.3963 | Best validation checkpoint, iteration 50000, threshold 0.60, EMA found. |
Datasets and Splits
WHU-CD
- Official/common dataset name: WHU-CD
- Dataset name used in config:
WHU-CD - Number of image pairs: train 6096, validation 762, test 762
- Image size: 256
- Mask format: binary change mask
- Binary threshold:
127inconfigs/active.yaml - Ignore index: Not specified in selected WHU-CD run config
- Normalization: ImageNet mean
[0.485, 0.456, 0.406]and std[0.229, 0.224, 0.225]insrc/datasets/transforms.py
DSIFN-CD
- Official/common dataset name: DSIFN-CD
- Dataset name used in config:
DSIFN-CD - Number of image pairs: train 3153, validation 3152, test not specified in selected run manifest
- Image size: 256
- Mask format: binary change mask
- Binary threshold:
127inconfigs/active.yaml - Ignore index: Not specified in selected DSIFN-CD binary release run config
- Normalization: ImageNet mean
[0.485, 0.456, 0.406]and std[0.229, 0.224, 0.225]insrc/datasets/transforms.py
Results
| Dataset | Precision | Recall | F1 | IoU | OA | Notes |
|---|---|---|---|---|---|---|
| WHU-CD | 96.0072 | 95.0623 | 95.5324 | 91.4469 | 99.5715 | From selected WHU-CD test metrics. |
| DSIFN-CD | 96.2591 | 96.5340 | 96.3963 | 93.0434 | 97.4721 | From selected DSIFN-CD test metrics. |
Installation
git clone https://github.com/Dineth14/MambaRefine-CD
cd MambaRefine-CD
pip install -r requirements.txt
pip install huggingface_hub
Download Weights
from huggingface_hub import hf_hub_download
ckpt_path = hf_hub_download(
repo_id="<HF_USERNAME_OR_ORG>/MambaRefine0cd",
filename="checkpoints/mambarefine_cd_whu_cd_best.pth",
)
print(ckpt_path)
Loading the Model
from src.engine.checkpoint import load_checkpoint
from src.models.build import build_model
from src.utils.config import load_config
from src.utils.device import get_device
cfg = load_config("configs/active.yaml")
device = get_device(cfg)
model = build_model(cfg).to(device)
checkpoint = load_checkpoint("checkpoints/mambarefine_cd_whu_cd_best.pth", model)
model.eval()
Evaluation
The repository scripts read configs/active.yaml.
python val.py
python test.py
python infer.py
Before running evaluation with downloaded weights, set checkpoint.path in configs/active.yaml to the downloaded checkpoint path and set the dataset root to your local dataset.
Limitations
- The weights are intended for remote sensing binary change detection.
- Results depend on dataset domain, resolution, preprocessing, and split consistency.
- Users should evaluate with the same preprocessing and splits used during training.
- DSIFN-CD test split count for the selected release run was not specified in the selected run manifest.
Citation
Official citation will be added after the MERCon proceedings information is available.