CD-Models: A Unified Change Detection Benchmark Suite

A multi-dataset, multi-model benchmark for binary remote sensing change detection.
Covers 21 registered models spanning CNN, Transformer, and Mamba architectures, evaluated across the dataset configs in this repository with a shared training pipeline.

Python PyTorch Models Datasets License

Overview

CD-Models is a benchmark harness for binary remote sensing change detection. It brings original research repositories and newly added model wrappers under one launcher, one dataset-config convention, one weight-management layer, and one result aggregation layout. The repository exists to make model comparisons reproducible across the same prepared dataset folders instead of relying on isolated, model-specific scripts. It also keeps the limits visible: result tables are populated only from results/*/*/metrics_test.json, and framework-specific models remain marked until their required stacks are installed.

Supported Models

The model list below is taken from configs/models/registry.yaml, which is what run_training.py uses for --model choices.

Model Paper Venue Backbone Params Training Script Status
bifa BiFA: Remote Sensing Image Change Detection with Bitemporal Feature Alignment IEEE TGRS 2024 MixTransformer β€” train/train_bifa.py πŸ”„ In Progress
bit_cd Remote Sensing Image Change Detection with Transformers IEEE TGRS 2021 ResNet-18 + base transformer ~11M† train/train_bit_cd.py βœ… Working
cdmamba CDMamba: Incorporating Local Clues into Mamba for Binary Change Detection IEEE TGRS 2025 Mamba β€” train/train_cdmamba.py πŸ”„ In Progress
cgnet Change Guiding Network IEEE JSTARS 2023 CGNet custom backbone β€” train/train_cgnet.py βœ… Working
change3d Change3D: Revisiting Change Detection and Captioning from a Video Modeling Perspective CVPR 2025 Highlight X3D-L β€” train/train_change3d.py βœ… Working
changeformer A Transformer-Based Siamese Network for Change Detection IGARSS 2022 MiT-b4 ~41M† train/train_changeformer.py βœ… Working
changemamba ChangeMamba: Remote Sensing Change Detection with Spatio-Temporal State Space Model IEEE TGRS 2024 VMamba β€” train/train_changemamba.py ⚠️ Framework Required
changer Changer: Feature Interaction is What You Need for Change Detection IEEE TGRS / Open-CD ResNet-18 β€” train/train_changer.py ⚠️ Framework Required
dsamnet Deeply-supervised Attention Metric-based Network IEEE TGRS 2021 ResNet β€” train/train_dsamnet.py βœ… Working
dsifn Deeply Supervised Image Fusion Network ISPRS JPRS 2020 VGG-16 β€” train/train_dsifn.py πŸ”„ In Progress
elgcnet ELGC-Net: Efficient Local-Global Context Aggregation IEEE TGRS 2024 ResNet-18 / ELGCA β€” train/train_elgcnet.py βœ… Working
fc_ef Fully Convolutional Early Fusion ICIP 2018 FCN β€” train/train_fc_variants.py βœ… Working
fc_siam_conc Fully Convolutional Siamese Concatenation ICIP 2018 Siamese FCN β€” train/train_fc_variants.py βœ… Working
fc_siam_diff Fully Convolutional Siamese Difference ICIP 2018 Siamese FCN β€” train/train_fc_variants.py βœ… Working
hanet HANet: Hierarchical Attention Network IEEE JSTARS 2023 HANet custom backbone β€” train/train_hanet.py βœ… Working
ifnet Deeply Supervised Image Fusion Network ISPRS JPRS 2020 VGG-16 β€” train/train_ifnet.py πŸ”„ In Progress
rsm_cd RS-Mamba for Large Remote Sensing Image Dense Prediction arXiv 2024 VMamba/RSM-CD tiny β€” train/train_rsm_cd.py ❌ Failed
schanger SChanger: Semantic Change and Spatial Consistency Perspective IEEE JSTARS 2025 SChanger-base β€” train/train_schanger.py πŸ”„ In Progress
siam_nestedunet SNUNet-CD / Siamese NestedUNet IEEE GRSL 2021 UNet++ β€” train/train_siam_nestedunet.py πŸ”„ In Progress
stanet Spatial-Temporal Attention Network Remote Sensing 2020 ResNet-18 + PAM ~17M† train/train_stanet.py βœ… Working
tinycd TinyCD: A Not So Deep Learning Model for Change Detection Neural Computing and Applications 2023 EfficientNet-B4 β€” train/train_tinycd.py βœ… Working

† Parameter counts are inherited from the previous project README or upstream publications, not measured by the current harness.

Supported Datasets

Every dataset below is a real YAML file under configs/datasets/. The harness expands ${DATA_ROOT} through utils/config_loader.py; if ${DATA_ROOT} is unset, it first checks /new-home/buddhiw/Datasets and then the sibling mamba-cd/datasets fallback.

LEVIR-CD+

Property Value
Task Binary building change detection
Source LEVIR-CD project page
Train / Val / Test Determined by files under $DATA_ROOT/LEVIR-CD-plus-256/{train,val,test}
Image size 256 x 256
Resolution Original LEVIR-CD is 0.5 m/pixel; this config uses prepared 256 patches
Channels RGB
Label convention Thresholded binary mask; Mask/ folder, changed pixels above 127
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/levir_cd.yaml
Root pattern ${DATA_ROOT}/LEVIR-CD-plus-256

LEVIR-CD+ Test-as-Val

Property Value
Task Binary building change detection with literature-style test-as-validation protocol
Source LEVIR-CD project page
Train / Val / Test Determined by files under $DATA_ROOT/LEVIR-CD-plus-256-test-as-val/{train,val,test}
Image size 256 x 256
Channels RGB
Label convention Thresholded binary mask; Mask/ folder, changed pixels above 127
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/levir_cd_test_as_val.yaml
Root pattern ${DATA_ROOT}/LEVIR-CD-plus-256-test-as-val

WHU-CD

Property Value
Task Binary building change detection
Source WHU building dataset page
Train / Val / Test Determined by files under $DATA_ROOT/WHU-CD/{train,val,test}
Image size 256 x 256
Channels RGB
Label convention Thresholded binary mask; OUT/ folder, changed pixels above 127
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/whu_cd.yaml
Root pattern ${DATA_ROOT}/WHU-CD

DSIFN-CD

Property Value
Task Binary high-resolution change detection
Source DSIFN dataset reference
Train / Val / Test Determined by files under $DATA_ROOT/DSIFN-CD/DSIFN/{train,val,test}
Image size 256 x 256
Channels RGB
Label convention mask/ folder; raw masks may be 0/1; generated model views convert to 0/255 where required
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/dsifn_cd.yaml
Root pattern ${DATA_ROOT}/DSIFN-CD/DSIFN

WildFire-S2

Property Value
Task Binary burned-area change detection from bi-temporal Sentinel-2 style imagery
Source Local project dataset card in sibling WildFire-S2/
Train / Val / Test Determined by files under $DATA_ROOT/WildFireS2/{train,val,test}
Image size 256 x 256
Channels RGB
Label convention Thresholded binary mask; label/ folder, changed pixels above 127
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/wildfire_s2.yaml
Root pattern ${DATA_ROOT}/WildFireS2

SYSU-CD

Property Value
Task Binary change detection
Source SYSU-CD project page
Train / Val / Test Determined by files under $DATA_ROOT/SYSU-CD-folders/{train,val,test}
Image size 256 x 256
Channels RGB
Label convention Thresholded binary mask; Mask/ folder, changed pixels above 127
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/sysu_cd.yaml
Root pattern ${DATA_ROOT}/SYSU-CD-folders

KATE-CD-256

Property Value
Task Binary change detection
Source Local prepared dataset config
Train / Val / Test Determined by files under $DATA_ROOT/KATE-CD-256/{train,val,test}
Image size 256 x 256
Channels RGB
Label convention Thresholded binary mask; label/ folder, changed pixels above 127
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/kate_cd.yaml
Root pattern ${DATA_ROOT}/KATE-CD-256

Custom-CD

Property Value
Task User-supplied binary change detection
Source Local template config
Train / Val / Test Determined by files under $DATA_ROOT/Custom-CD/{train,val,test}
Image size 256 x 256
Channels RGB
Label convention Thresholded binary mask; Mask/ folder, changed pixels above 127
Mean / Std (A) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Mean / Std (B) [0.485, 0.456, 0.406] / [0.229, 0.224, 0.225]
Config configs/datasets/custom_cd.yaml
Root pattern ${DATA_ROOT}/Custom-CD

Results and released checkpoints

Only completed metrics_test.json evaluations are eligible for rankings. Rankings are computed per dataset by test-set F1 (descending), and the canonical best_model.pth checkpoint for every ranked model is released.

All accuracy values are fractions. GPU memory is the PyTorch peak reserved memory for inference, with peak allocated memory used only when reserved memory is absent. FPS is model-only throughput. A dash means the evaluator did not record that metric; values are never estimated.

The current evaluator records BF1 but not boundary mean IoU (BmIoU), so BmIoU remains explicitly unavailable rather than being inferred from BF1. Boundary IoU and boundary F1 are distinct measures.

The LEVIR-CD+ comparison combines the project-compatible levir_cd_test_as_val and levir_val_as_test result records. The ChangeMamba row uses the completed levir_val_as_test evaluation over 5,568 samples.

Dataset summary

Dataset Tested models F1 leader Best test F1
DSIFN-CD 14 BIT-CD 0.6732
LEVIR-CD+ comparison 14 ChangeMamba 0.8753
SYSU-CD 8 ChangeMamba 0.8216
WHU-CD 8 ChangeMamba 0.9521

DSIFN-CD

Rank Model F1 mIoU Overall accuracy Recall Precision BF1 BmIoU GFLOPs GPU (GB) FPS Parameters (M) Checkpoint
1 BIT-CD 0.6732 0.6929 0.8919 0.6552 0.6923 0.2819 β€” 10.63 2.24 127.76 12.40 Download
2 SChanger 0.6629 0.6835 0.8857 0.6612 0.6647 0.2847 β€” β€” 2.45 24.05 β€” Download
3 ChangeMamba 0.6435 0.6729 0.8849 0.6113 0.6792 0.1903 β€” 28.70 1.93 15.42 54.00 Download
4 CGNet 0.6204 0.6290 0.8343 0.7970 0.5079 0.2903 β€” 82.23 6.52 65.39 38.99 Download
5 FC-EF 0.6078 0.6400 0.8604 0.6365 0.5816 0.1955 β€” 3.58 0.74 204.13 1.35 Download
6 ChangeFormer 0.5964 0.6152 0.8299 0.7397 0.4996 0.2422 β€” 21.18 4.07 49.74 29.75 Download
7 BiFA 0.5876 0.6111 0.8296 0.7142 0.4991 0.2692 β€” 53.00 15.10 13.81 9.87 Download
8 Siam-NestedUNet 0.5839 0.6024 0.8188 0.7482 0.4788 0.2374 β€” 54.83 7.34 29.18 12.03 Download
9 FC-Siam-diff 0.5829 0.6277 0.8593 0.5784 0.5875 0.1691 β€” 4.73 1.06 113.98 1.35 Download
10 STANet 0.5483 0.6258 0.8829 0.4184 0.7953 0.1613 β€” 13.16 14.11 133.96 16.93 Download
11 FC-Siam-conc 0.5479 0.5665 0.7873 0.7583 0.4288 0.1811 β€” 5.33 1.02 127.67 1.55 Download
12 DSAMNet 0.5467 0.5757 0.8020 0.7027 0.4474 0.2374 β€” 75.39 2.91 166.43 16.95 Download
13 HANet 0.5347 0.5817 0.8193 0.6109 0.4754 0.2418 β€” 17.67 11.36 42.36 3.03 Download
14 IFNet 0.4579 0.5102 0.7524 0.6153 0.3647 0.1325 β€” 82.26 6.08 104.88 50.71 Download

LEVIR-CD+ comparison

Rank Model F1 mIoU Overall accuracy Recall Precision BF1 BmIoU GFLOPs GPU (GB) FPS Parameters (M) Checkpoint
1 ChangeMamba 0.8753 0.8840 0.9901 0.8572 0.8942 0.8307 β€” 28.70 1.93 76.82 54.00 Download
2 CGNet 0.8138 0.8356 0.9856 0.7746 0.8572 0.7651 β€” 82.23 6.01 44.01 38.99 Download
3 Siam-NestedUNet 0.8046 0.8282 0.9839 0.8129 0.7965 0.7386 β€” β€” 2.67 108.71 β€” Download
4 SChanger 0.8007 0.8253 0.9836 0.8112 0.7906 0.7364 β€” β€” 2.45 48.96 β€” Download
5 BIT-CD 0.7996 0.8247 0.9838 0.7946 0.8047 0.7143 β€” 10.63 2.27 236.60 12.40 Download
6 HANet 0.7841 0.8131 0.9819 0.8064 0.7630 0.7043 β€” β€” 5.04 84.44 β€” Download
7 BiFA 0.7772 0.8084 0.9818 0.7785 0.7760 0.6581 β€” 53.00 15.14 30.38 9.87 Download
8 FC-Siam-conc 0.7650 0.7999 0.9809 0.7623 0.7678 0.7175 β€” 5.33 1.02 308.81 1.55 Download
9 STANet 0.7544 0.7921 0.9791 0.7865 0.7249 0.6388 β€” β€” 4.45 174.00 β€” Download
10 ChangeFormer 0.7488 0.7887 0.9795 0.7505 0.7472 0.6525 β€” 21.18 4.03 157.64 29.75 Download
11 DSAMNet 0.7444 0.7850 0.9779 0.7897 0.7040 0.5370 β€” 75.39 2.90 37.84 16.95 Download
12 IFNet 0.7410 0.7833 0.9786 0.7510 0.7313 0.3489 β€” 82.26 6.08 105.44 50.71 Download
13 FC-EF 0.7319 0.7766 0.9768 0.7785 0.6905 0.6497 β€” 3.58 0.74 457.44 1.35 Download
14 FC-Siam-diff 0.7196 0.7667 0.9725 0.8650 0.6160 0.5447 β€” 4.73 1.06 262.80 1.35 Download

SYSU-CD

Rank Model F1 mIoU Overall accuracy Recall Precision BF1 BmIoU GFLOPs GPU (GB) FPS Parameters (M) Checkpoint
1 ChangeMamba 0.8216 0.8006 0.9214 0.7677 0.8836 0.3197 β€” 28.70 1.93 77.65 54.00 Download
2 FC-Siam-conc 0.7778 0.7558 0.8975 0.7609 0.7955 0.1939 β€” 5.33 1.02 356.94 1.55 Download
3 STANet 0.7728 0.7482 0.8913 0.7841 0.7619 0.1962 β€” β€” 4.45 176.02 β€” Download
4 FC-EF 0.7710 0.7489 0.8936 0.7596 0.7828 0.1857 β€” 3.58 0.73 553.75 1.35 Download
5 ChangeFormer 0.7635 0.7382 0.8851 0.7863 0.7420 0.1591 β€” 21.18 4.03 143.73 29.75 Download
6 FC-Siam-diff 0.7630 0.7457 0.8956 0.7129 0.8208 0.1853 β€” 4.73 1.08 552.90 1.35 Download
7 BIT-CD 0.7618 0.7395 0.8881 0.7584 0.7652 0.1780 β€” 10.63 2.24 111.11 12.40 Download
8 IFNet 0.7145 0.7020 0.8724 0.6772 0.7562 0.1158 β€” β€” 3.29 109.80 β€” Download

WHU-CD

Rank Model F1 mIoU Overall accuracy Recall Precision BF1 BmIoU GFLOPs GPU (GB) FPS Parameters (M) Checkpoint
1 ChangeMamba 0.9521 0.9519 0.9954 0.9401 0.9644 0.8605 β€” 28.70 1.93 75.28 54.00 Download
2 CGNet 0.9331 0.9340 0.9936 0.9299 0.9364 0.8138 β€” 82.23 5.62 129.54 38.99 Download
3 BIT-CD 0.8940 0.8989 0.9899 0.8845 0.9037 0.6879 β€” 10.63 2.24 46.28 12.40 Download
4 DSAMNet 0.8905 0.8956 0.9891 0.9167 0.8657 0.5855 β€” 75.39 2.90 116.58 16.95 Download
5 IFNet 0.8389 0.8534 0.9849 0.8147 0.8644 0.3245 β€” 82.26 6.08 104.98 50.71 Download
6 FC-EF 0.8385 0.8531 0.9850 0.8067 0.8729 0.5818 β€” 3.58 0.74 498.55 1.35 Download
7 FC-Siam-conc 0.7789 0.8062 0.9756 0.8907 0.6920 0.4733 β€” 5.33 1.03 397.86 1.55 Download
8 FC-Siam-diff 0.7135 0.7580 0.9631 0.9540 0.5699 0.2148 β€” 4.73 1.09 567.87 1.35 Download

Datasets without a released checkpoint

WildFire-S2, KATE-CD-256, the standard LEVIR-CD+ configuration, and Custom-CD currently have no eligible completed test result. Their validation-only or incomplete checkpoints are intentionally not uploaded.

Installation

1. Clone this repository

git clone https://github.com/<your-username>/CD-Models.git
cd CD-Models

2. Create and activate environment

conda create -n cd-models python=3.10 -y
conda activate cd-models

3. Install PyTorch (CUDA 12.4)

pip install torch==2.6.0 torchvision==0.21.0 --index-url https://download.pytorch.org/whl/cu124

Adjust the CUDA version for your system. See PyTorch Get Started.

4. Run automatic setup

python setup.py

This single command:

  • Checks all required Python packages.
  • Auto-installs safe pure-Python/common packages when missing.
  • Clones confirmed model repositories into model_repos/.
  • Downloads or warms pretrained backbone weights.
  • Generates dataset list files for datasets already present on disk.
  • Prints a full status report.

5. ChangeMamba / Changer MMSeg stack

These two models require OpenMMLab packages that should be installed after PyTorch:

pip install mmengine==0.10.1
pip install mmcv==2.1.0 -f https://download.openmmlab.com/mmcv/dist/cu124/torch2.6/index.html
pip install mmsegmentation==1.2.2 mmdet==3.3.0 mmpretrain==1.2.0

6. Set your dataset root

export DATA_ROOT=/path/to/your/datasets

Add the export to ~/.bashrc or your scheduler job script if you want it to persist.

Dataset Preparation

All datasets follow the same high-level split structure: train/, val/, and test/, each with a pre-change image folder, a post-change image folder, and a mask folder. Folder names differ by dataset and are encoded in YAML.

LEVIR-CD+

Download: Official LEVIR page

Expected structure:

$DATA_ROOT/LEVIR-CD-plus-256/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
└── test/
    β”œβ”€β”€ A/
    β”œβ”€β”€ B/
    └── Mask/

Prepare list files:

python setup.py --dataset levir_cd

Config: configs/datasets/levir_cd.yaml

LEVIR-CD+ Test-as-Val

Download: Use the same source data as LEVIR-CD+ and prepare the test-as-validation split protocol locally.

Expected structure:

$DATA_ROOT/LEVIR-CD-plus-256-test-as-val/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
└── test/
    β”œβ”€β”€ A/
    β”œβ”€β”€ B/
    └── Mask/

Prepare list files:

python setup.py --dataset levir_cd_test_as_val

Config: configs/datasets/levir_cd_test_as_val.yaml

WHU-CD

Download: WHU building dataset page

Expected structure:

$DATA_ROOT/WHU-CD/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── OUT/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── OUT/
└── test/
    β”œβ”€β”€ A/
    β”œβ”€β”€ B/
    └── OUT/

Prepare list files:

python setup.py --dataset whu_cd

Config: configs/datasets/whu_cd.yaml

DSIFN-CD

Download: DSIFN dataset reference

Expected structure:

$DATA_ROOT/DSIFN-CD/DSIFN/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ t1/
β”‚   β”œβ”€β”€ t2/
β”‚   └── mask/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ t1/
β”‚   β”œβ”€β”€ t2/
β”‚   └── mask/
└── test/
    β”œβ”€β”€ t1/
    β”œβ”€β”€ t2/
    └── mask/

Prepare list files:

python setup.py --dataset dsifn_cd

Config: configs/datasets/dsifn_cd.yaml

Important DSIFN note: some masks are encoded as 0/1. The generated compatibility views convert those masks to exact 0/255 PNG data for loaders that use ToTensor() and then cast labels to integer classes.

WildFire-S2

Download: Local sibling dataset project, documented in ../WildFire-S2/DATASET_CARD.md.

Expected structure:

$DATA_ROOT/WildFireS2/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── label/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── label/
└── test/
    β”œβ”€β”€ A/
    β”œβ”€β”€ B/
    └── label/

Prepare list files:

python setup.py --dataset wildfire_s2

Config: configs/datasets/wildfire_s2.yaml

SYSU-CD

Download: SYSU-CD repository

Expected structure:

$DATA_ROOT/SYSU-CD-folders/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
└── test/
    β”œβ”€β”€ A/
    β”œβ”€β”€ B/
    └── Mask/

Prepare list files:

python setup.py --dataset sysu_cd

Config: configs/datasets/sysu_cd.yaml

KATE-CD-256

Download: Local prepared dataset; no official source URL was found in the audited repo files.

Expected structure:

$DATA_ROOT/KATE-CD-256/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── label/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── label/
└── test/
    β”œβ”€β”€ A/
    β”œβ”€β”€ B/
    └── label/

Prepare list files:

python setup.py --dataset kate_cd

Config: configs/datasets/kate_cd.yaml

Custom-CD

Download: User supplied.

Expected structure:

$DATA_ROOT/Custom-CD/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
β”œβ”€β”€ val/
β”‚   β”œβ”€β”€ A/
β”‚   β”œβ”€β”€ B/
β”‚   └── Mask/
└── test/
    β”œβ”€β”€ A/
    β”œβ”€β”€ B/
    └── Mask/

Prepare list files:

python setup.py --dataset custom_cd

Config: configs/datasets/custom_cd.yaml

Training

All registered models share the same outer interface through run_training.py.

Train a single model on a single dataset

python run_training.py --model bifa --dataset levir_cd

Train a single model on all datasets

python run_training.py --model changemamba --dataset all

Train all models on a single dataset

python run_training.py --model all --dataset levir_cd

Full benchmark sweep

python run_training.py --model all --dataset all

Already-completed runs are skipped when results/{model}/{dataset}/metrics_test.json exists. To retry anyway:

python run_training.py --model bifa --dataset levir_cd --force

Resume interrupted training:

python run_training.py --model bifa --dataset levir_cd --resume

Run command-construction checks without training:

python run_training.py --model all --dataset dsifn_cd --dry-run

Run a single wrapper smoke test:

python train/train_bifa.py --dataset levir_cd --smoke-test

Available models

Original and legacy integrated models:

bifa
bit_cd
cdmamba
change3d
changeformer
dsifn
ifnet
rsm_cd
schanger
siam_nestedunet
stanet

Newly added external or direct adapters:

fc_ef
fc_siam_conc
fc_siam_diff
changemamba
elgcnet
changer
hanet
cgnet
dsamnet
tinycd

Available datasets:

custom_cd
dsifn_cd
kate_cd
levir_cd
levir_cd_test_as_val
sysu_cd
whu_cd
wildfire_s2

Training outputs

Each completed run is expected to save under:

results/
└── bifa/
    └── levir_cd/
        β”œβ”€β”€ checkpoints/
        β”‚   β”œβ”€β”€ best_model.pth
        β”‚   └── latest.pth
        β”œβ”€β”€ logs/
        β”‚   β”œβ”€β”€ train_stdout.log
        β”‚   β”œβ”€β”€ train_stderr.log
        β”‚   β”œβ”€β”€ eval_stdout.log
        β”‚   └── eval_stderr.log
        β”œβ”€β”€ predictions/
        β”‚   β”œβ”€β”€ test/
        β”‚   └── test_prob/
        β”œβ”€β”€ visuals/
        β”‚   └── selected_20/
        β”œβ”€β”€ metrics_val.json
        └── metrics_test.json

The master launcher appends run status to results/training_log.jsonl. After every run attempt, utils.results_writer.append_to_comparison_table() regenerates results/comparison_table.csv.

For qualitative comparison, the evaluator writes one deterministic sample manifest per dataset:

results/qualitative_samples/<dataset>/sample_manifest.json

The same selected test samples are then reused for every model on that dataset. Binary predictions use exact 0 and 255 PNG values.

Dataset-specific notes

Model Dataset Note
tinycd wildfire_s2 Skipped automatically by run_training.py; current exclusion is explicit in DATASET_EXCLUSIONS.
changemamba all Requires VMamba weights and the MMSeg/OpenMMLab stack.
changer all Runs through Open-CD and requires the MMSeg/OpenMMLab stack.
dsifn / ifnet dsifn_cd Uses VGG-16 family loaders; DSIFN masks need careful binary scaling.
rsm_cd all Marked unresolved because the upstream training path has prior initialization/runtime issues.

Evaluation

Evaluate a trained checkpoint

python evaluate.py --model bifa --dataset levir_cd

The central evaluator uses utils/model_adapters.py for verified in-process PyTorch model construction, checkpoint loading, forward calls, and output normalization. Current smoke-tested adapters are:

bit_cd
cgnet
changeformer
dsamnet
elgcnet
fc_ef
fc_siam_conc
fc_siam_diff
hanet
siam_nestedunet
stanet
tinycd

For these adapters, evaluation loads checkpoints/best_model.pth, computes split-level metrics, saves all test predictions, writes selected qualitative panels, records timing/profiling fields, writes metrics_test.json, and regenerates the aggregate comparison table.

For remaining subprocess/upstream wrappers, central evaluation fails explicitly until a real architecture construction and checkpoint-loading adapter is added. It does not evaluate dummy models, random initialized models, or guessed output formats.

Explicit checkpoint path

python evaluate.py --model bifa --dataset levir_cd --checkpoint results/bifa/levir_cd/checkpoints/best_model.pth

Regenerate comparison table

python evaluate.py --model all --dataset all --dry-run

Metrics computed

For binary change detection, metrics are intended for the positive changed class.

Metric Description
F1 Harmonic mean of precision and recall
IoU Intersection over Union / Jaccard index
mIoU Mean IoU over unchanged/background and changed classes
OA Overall accuracy across both classes
Precision TP / (TP + FP)
Recall TP / (TP + FN)
Kappa Cohen's kappa coefficient
BF1 Boundary F1 with configurable tolerance, default 2 pixels
TP / FP / TN / FN Accumulated confusion counts over the full split

The implementation lives in utils/metrics.py. The evaluator also records measured parameter counts, FLOPs when thop or fvcore is installed, FPS, PyTorch peak GPU memory, and NVML GPU utilization when pynvml is installed. Missing profiler dependencies are recorded with explicit error fields; values are not guessed.

metrics_test.json includes the model, dataset, split, checkpoint path, threshold, confusion counts, F1, IoU, mIoU, precision, recall, OA, kappa, BF1, parameter counts, FLOPs fields, FPS fields, GPU profiling fields, test sample count, prediction and visual directories, timestamp, and status.

Pre-trained Weights

Backbone weights are downloaded or cache-warmed by python setup.py and by utils/weight_downloader.py.

Backbone weights

Model(s) Backbone Source Auto-Downloaded Size
ChangeMamba-T VMamba-Tiny Zenodo 14037770 yes ~86 MB
ChangeMamba-S VMamba-Small Zenodo 14037770 yes ~178 MB
ChangeMamba-B VMamba-Base Zenodo 14037770 yes ~391 MB
TinyCD EfficientNet-B4 timm yes ~75 MB
ChangeFormer, ELGC-Net MiT variants timm yes 15-82 MB
BIT_CD, STANet, Changer ResNet-18 torchvision yes ~45 MB
DSAMNet, HANet, CGNet ResNet-50 / ResNet family torchvision yes ~98 MB
DSIFN / IFNet VGG-16 torchvision yes ~528 MB

Pre-download all managed weights:

python utils/weight_downloader.py --prefetch-all

List managed VMamba weights:

python utils/weight_downloader.py --list

Trained checkpoints

All completed test-run checkpoints and direct download links are listed in Results and released checkpoints. Local training still writes checkpoints under results/{model}/{dataset}/checkpoints/.

Repository Structure

CD-Models/
β”œβ”€β”€ configs/
β”‚   β”œβ”€β”€ datasets/                  # one YAML per dataset
β”‚   β”‚   β”œβ”€β”€ custom_cd.yaml
β”‚   β”‚   β”œβ”€β”€ dsifn_cd.yaml
β”‚   β”‚   β”œβ”€β”€ kate_cd.yaml
β”‚   β”‚   β”œβ”€β”€ levir_cd.yaml
β”‚   β”‚   β”œβ”€β”€ levir_cd_test_as_val.yaml
β”‚   β”‚   β”œβ”€β”€ sysu_cd.yaml
β”‚   β”‚   β”œβ”€β”€ whu_cd.yaml
β”‚   β”‚   └── wildfire_s2.yaml
β”‚   └── models/                    # model hyperparameters and registry
β”‚       β”œβ”€β”€ bifa.yaml
β”‚       β”œβ”€β”€ bit_cd.yaml
β”‚       β”œβ”€β”€ cdmamba.yaml
β”‚       β”œβ”€β”€ cgnet.yaml
β”‚       β”œβ”€β”€ change3d.yaml
β”‚       β”œβ”€β”€ changeformer.yaml
β”‚       β”œβ”€β”€ changemamba.yaml
β”‚       β”œβ”€β”€ changer.yaml
β”‚       β”œβ”€β”€ dsamnet.yaml
β”‚       β”œβ”€β”€ dsifn.yaml
β”‚       β”œβ”€β”€ elgcnet.yaml
β”‚       β”œβ”€β”€ fc_ef.yaml
β”‚       β”œβ”€β”€ fc_siam_conc.yaml
β”‚       β”œβ”€β”€ fc_siam_diff.yaml
β”‚       β”œβ”€β”€ hanet.yaml
β”‚       β”œβ”€β”€ ifnet.yaml
β”‚       β”œβ”€β”€ registry.yaml
β”‚       β”œβ”€β”€ rsm_cd.yaml
β”‚       β”œβ”€β”€ schanger.yaml
β”‚       β”œβ”€β”€ siam_nestedunet.yaml
β”‚       β”œβ”€β”€ stanet.yaml
β”‚       └── tinycd.yaml
β”œβ”€β”€ datasets/
β”‚   β”œβ”€β”€ __init__.py
β”‚   └── cd_dataset.py              # shared dataset validation/loader
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ fc_adapter.py              # direct FC-EF / FC-Siam trainer
β”‚   β”œβ”€β”€ train_bifa.py
β”‚   β”œβ”€β”€ train_bit_cd.py
β”‚   β”œβ”€β”€ train_cdmamba.py
β”‚   β”œβ”€β”€ train_cgnet.py
β”‚   β”œβ”€β”€ train_change3d.py
β”‚   β”œβ”€β”€ train_changeformer.py
β”‚   β”œβ”€β”€ train_changemamba.py
β”‚   β”œβ”€β”€ train_changer.py
β”‚   β”œβ”€β”€ train_dsamnet.py
β”‚   β”œβ”€β”€ train_dsifn.py
β”‚   β”œβ”€β”€ train_elgcnet.py
β”‚   β”œβ”€β”€ train_fc_variants.py
β”‚   β”œβ”€β”€ train_hanet.py
β”‚   β”œβ”€β”€ train_ifnet.py
β”‚   β”œβ”€β”€ train_rsm_cd.py
β”‚   β”œβ”€β”€ train_schanger.py
β”‚   β”œβ”€β”€ train_siam_nestedunet.py
β”‚   β”œβ”€β”€ train_stanet.py
β”‚   β”œβ”€β”€ train_tinycd.py
β”‚   └── wrapper_common.py           # shared wrapper logic and generated views
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ config.py                   # generic YAML/JSON loading and merge helpers
β”‚   β”œβ”€β”€ config_loader.py            # dataset/model config expansion and validation
β”‚   β”œβ”€β”€ dataset_list_generator.py   # create list/train.txt, list/val.txt, list/test.txt
β”‚   β”œβ”€β”€ env_checker.py              # import checks for required packages
β”‚   β”œβ”€β”€ legacy_config_writer.py     # generated JSON/list views for legacy trainers
β”‚   β”œβ”€β”€ metrics.py                  # binary CD metrics
β”‚   β”œβ”€β”€ results.py                  # JSON/CSV helpers
β”‚   β”œβ”€β”€ results_writer.py           # metrics_test.json and comparison CSV writer
β”‚   └── weight_downloader.py        # Zenodo, timm, torchvision weight management
β”œβ”€β”€ model_repos/                    # cloned external repositories
β”‚   β”œβ”€β”€ CGNet-CD/
β”‚   β”œβ”€β”€ ChangeMamba/
β”‚   β”œβ”€β”€ DSAMNet/
β”‚   β”œβ”€β”€ HANet-CD/
β”‚   β”œβ”€β”€ TinyCD/
β”‚   β”œβ”€β”€ Tiny_model_4_CD/
β”‚   β”œβ”€β”€ elgcnet/
β”‚   β”œβ”€β”€ fully_convolutional_change_detection/
β”‚   └── open-cd/
β”œβ”€β”€ results/
β”‚   β”œβ”€β”€ comparison_table.csv
β”‚   β”œβ”€β”€ download_log.jsonl
β”‚   └── training_log.jsonl
β”œβ”€β”€ generated_configs/              # generated model-specific config files
β”œβ”€β”€ generated_dataset_views/        # generated compatibility views for upstream repos
β”œβ”€β”€ BIT_CD/                         # original model repository copy
β”œβ”€β”€ BiFA/
β”œβ”€β”€ CDMamba/
β”œβ”€β”€ Change3D/
β”œβ”€β”€ ChangeFormer/
β”œβ”€β”€ IFNet/
β”œβ”€β”€ RSM-CD/
β”œβ”€β”€ SChanger/
β”œβ”€β”€ Siam-NestedUNet/
β”œβ”€β”€ STANet/
β”œβ”€β”€ evaluate.py
β”œβ”€β”€ run_training.py
β”œβ”€β”€ setup.py
└── TRAINING_GUIDE.md

Known Issues

Model Issue Status Workaround
rsm_cd Upstream RS-Mamba training path has prior initialization/runtime issues. ❌ Unresolved Run explicitly only after auditing the upstream environment; skip in broad sweeps if needed.
changemamba Requires VMamba kernels and OpenMMLab stack. ⚠️ Separate install needed Install MMSeg stack in Installation section and run setup.py for VMamba weights.
changer Requires Open-CD / mmengine / mmcv / mmsegmentation. ⚠️ Separate install needed Install MMSeg stack in Installation section.
tinycd RGB-only model path; explicitly excluded for wildfire_s2. ⚠️ By design Use RGB datasets or edit dataset config only when the data is actually RGB.
evaluate.py Central checkpoint loading is adapter-based and currently smoke-tested for bit_cd, cgnet, changeformer, dsamnet, elgcnet, FC variants, hanet, siam_nestedunet, stanet, and tinycd. Remaining custom/OpenMMLab models still need verified adapters. πŸ”„ In Progress Add a real in-process model construction/checkpoint adapter or call a verified upstream evaluator and convert its outputs.
dsifn_cd masks Raw DSIFN masks may be 0/1, which some upstream loaders can scale to all zeros. βœ… Fixed in generated views Regenerate views by launching training or running dataset preparation.
SChanger repo URL Official clone URL was not confirmed from audited files. πŸ”„ In Progress setup.py skips automatic clone for this entry and prints a warning.
root license No root LICENSE file was found during audit. πŸ”„ Documentation gap Check upstream model licenses before redistribution.

Adding a New Model

  1. Clone the upstream repository into model_repos/<name>.
  2. Create configs/models/<name>.yaml with name, epochs, optimizer, LR, scheduler, loss, backbone, pretrained weights, and image size.
  3. Write train/train_<name>.py.
  4. Reuse train/wrapper_common.py if the model is a subprocess adapter.
  5. Use datasets/cd_dataset.py directly if the model can train in the unified process.
  6. Register the model in configs/models/registry.yaml.
  7. Add pretrained weight handling to utils/weight_downloader.py or setup.py when needed.
  8. Run python run_training.py --model <name> --dataset levir_cd --dry-run.
  9. Run the wrapper smoke-test using the real script path, for example python train/train_bifa.py --dataset levir_cd --smoke-test.
  10. Run a short real training pass on one dataset before adding the model to a full sweep.
  11. Ensure final metrics are saved as results/<model>/<dataset>/metrics_test.json.
  12. Regenerate results/comparison_table.csv.

Citation

If you use this benchmark suite in your research, please cite the individual model papers. Key references:

BibTeX references
@article{chen2021bit,
  title={Remote Sensing Image Change Detection with Transformers},
  author={Chen, Hao and Qi, Zipeng and Shi, Zhenwei},
  journal={IEEE Transactions on Geoscience and Remote Sensing},
  year={2021}
}

@article{zhang2020dsifn,
  title={A deeply supervised image fusion network for change detection in high resolution bi-temporal remote sensing images},
  author={Zhang, Chenxiao and Yue, Peng and Tapete, Deodato and Jiang, Linlin and Shangguan, Bo and Huang, Liangpei and Liu, Guoxiang},
  journal={ISPRS Journal of Photogrammetry and Remote Sensing},
  year={2020}
}

@article{bandara2022changeformer,
  title={A Transformer-Based Siamese Network for Change Detection},
  author={Bandara, Wele Gedara Chaminda and Patel, Vishal M.},
  journal={IGARSS},
  year={2022}
}

@article{zhou2025schanger,
  title={SChanger: Change Detection from a Semantic Change and Spatial Consistency Perspective},
  author={Zhou, Ziyu and Hu, Keyan and Fang, Yutian and Rui, Xiaoping},
  journal={IEEE JSTARS},
  year={2025}
}

Acknowledgements

We thank the authors of all included models for their open-source implementations. This benchmark builds on:

  • Open-CD for Changer and the Open-CD toolbox.
  • VMamba for the VMamba backbone family.
  • timm for pretrained backbone weights.
  • University of Peradeniya for computational resources.

Setup Commands

python setup.py Runs environment checks, clones repos, fetches weights, and prepares dataset lists. python setup.py --status Prints status without changes. python setup.py --skip-weights Skips weight downloads. python setup.py --env-check-only Checks packages only. python setup.py --dataset levir_cd Prepares list files for one dataset config.

Training Commands

python run_training.py --model bifa --dataset levir_cd Trains one model on one dataset. python run_training.py --model all --dataset levir_cd Runs every registered model on one dataset. python run_training.py --model bifa --dataset all Runs one model across all configured datasets with available roots. python run_training.py --model all --dataset all Runs the full configured sweep. python run_training.py --model all --dataset dsifn_cd --dry-run Checks launch commands without training.

Evaluation Commands

python evaluate.py --model bifa --dataset levir_cd Attempts central evaluation for a trained checkpoint. python evaluate.py --model all --dataset all --dry-run Checks evaluation config resolution. python utils/weight_downloader.py --prefetch-all Fetches managed pretrained weights. python utils/weight_downloader.py --list Lists managed VMamba weight files.

Audit Appendix: Environment Snapshot

The local Mamba environment used during audit reported:

torch 2.6.0+cu124
torchvision 0.21.0+cu124
numpy 2.1.2
PIL 12.2.0
cv2 4.13.0
yaml 6.0.2
tqdm 4.68.1
timm 0.4.12
einops 0.8.1
sklearn 1.6.1

timm 0.4.12 does not expose every modern MiT alias. The weight downloader treats missing mit_b0 and mit_b1 aliases as optional warmup warnings unless the model explicitly requires them.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support