SA-CD: Towards Advanced Change Detection: A Semantic-Aware Approach Inspired by Human Cognition (Code will be released soon)
To train change detection models, researchers commonly use bi-temporal images captured at different times of the same region as input, and employ corresponding change maps as training supervision signals. However, existing change detection methods primarily rely on pixel-aware change maps between bi-temporal images as constraints, deviating from human visual paradigm that emphasizes semantic understanding prior to change detection. This limitation undermines ability of model to perform effective change detection in the presence of pixel-level disturbances such as noise and illumination variations. We hypothesize that this stems from the model's lack of semantic awareness. To this end, we propose a change detection framework named Semantic-Aware Change Detection (SA-CD). Specifically, a Single-temporal Semantic Learning Pretraining (SSLP) strategy is introduced to enable the model to learn deep semantic feature representations and target change patterns from large-scale single-temporal remote sensing semantic segmentation data. Furthermore, we proposed a novel Semantic-Aware Change Detection Network (SANet), which design two distinct decoders at both pixel-difference and object-semantic levels, enabling precise decoding of target changes from global structures to fine textures, thereby enhancing overall accuracy in change detection.
Towards Advanced Change Detection: A Semantic-Aware Approach Inspired by Human Cognition
Exploring the documentation for SA-CD »
Check Demo
·
Report Bug
·
Pull Request
SA-CD
├── checkpoints
│ ├── SANet
│ │ ├── LEVIR
│ │ │ ├── no_pretrain.pth
│ │ │ └── with_pretrain.pth
│ │ ├── LEVIR+
│ │ │ ├── no_pretrain.pth
│ │ │ └── with_pretrain.pth
│ │ ├── S2Looking
│ │ │ ├── no_pretrain.pth
│ │ │ └── with_pretrain.pth
│ │ ├── WHU
│ │ │ ├── no_pretrain.pth
│ │ │ └── with_pretrain.pth
│ │ └── WHU_CUL
│ │ ├── no_pretrain.pth
│ │ └── with_pretrain.pth
│ └── pre_train
│ ├── Building
│ │ └── pretrain_Building.pth
│ └── Cultivalted land
│ └── pretrain_cultivalted.pth
├── datasets
│ ├── Levir_CD.py
│ ├── Levir_CD2.py
│ ├── data_utils.py
│ ├── data_utils2.py
│ ├── pre_CD.py
│ ├── pre_CD2.py
│ └── pre_CD3.py
├── fastsam_model
│ ├── FastSAM-s.pt
│ └── FastSAM-x.pt
├── models
│ ├── FastSAM
│ ├── SAM_Fusion2.py
│ └── preSAM_SNUNet4.py
├── pretrain.py
├── train.py
├── eval.py
├── ultralytics
└── utils
├── __init__.py
├── crf.py
├── data_vis.py
├── eval.py
├── load.py
├── loss.py
├── metric_tool.py
├── metrics.py
├── misc.py
├── transform.py
└── utils.py
- Dataset Formats
- Pretrained Weights and Datasets
- Model Loading Instructions
- Pretraining Phase Instructions
- Fine-Tuning Phase Instructions
- Performance Metrics on Public Change Detection Datasets
- Visualization Results
- Structure:
data_name: Input imagesA: Semantic segmentation input imageLabel: Corresponding segmentation labels
- Structure:
data_nametrainA: Image at time T1B: Image at time T2label: Ground truth change map
valA,B,label: Validation dataset
testA,B,label: Test dataset
- Download our FastSAM weights on Baidu cloud disk: https://pan.baidu.com/s/1lS3gPNU6FkTY3uFEAj_ITA?pwd=lzms
- Download our pre_train weights on Baidu cloud disk: https://pan.baidu.com/s/1otiGilbOmgzeATVerx7LSQ?pwd=lzms
- Download our SANet weights on Baidu cloud disk: https://pan.baidu.com/s/1JrX2jMrJIQJniEg2w0-sog?pwd=lzms
- Download LEVIR Dataset on Baidu cloud disk: https://pan.baidu.com/s/11W6Obog_mQm6kXfwfpuKDQ?pwd=lzms
- Download LEVIR+ Dataset on Baidu cloud disk: https://pan.baidu.com/s/1IRfqsIka7PpHEiGWkTh01Q?pwd=lzms
- Download S2Looking Dataset on Baidu cloud disk: https://pan.baidu.com/s/1UT1weZqiUgjdg68yuAgSJQ?pwd=lzms
- Download WHU-CD Dataset on Baidu cloud disk: https://pan.baidu.com/s/1g2y2wYnx7OIjIkARu5eAfg?pwd=lzms
- Download WHU Cultivate Land Dataset on Baidu cloud disk: https://pan.baidu.com/s/1lIooiYua3wwe4ec-9Zs7Wg?pwd=lzms
- Download WHU-Building Dataset on Baidu cloud disk: https://pan.baidu.com/s/1qnrWS-0UfVlsSJpPpAodIQ?pwd=lzms
- Download INRIA-Building Dataset on Baidu cloud disk: https://pan.baidu.com/s/1f1Q1PnjEQp3PtxlkCNFTgg?pwd=lzms
- Download LoveDA Dataset on PaddlePaddle: https://aistudio.baidu.com/datasetdetail/55681
- Download DLCCC Dataset on PaddlePaddle: https://aistudio.baidu.com/datasetdetail/55681
- Download AIRS Dataset on PaddlePaddle: https://aistudio.baidu.com/datasetdetail/74274
- Update the FastSAM model path in the following scripts:
/models/preSAM_SUNNet4.py: Line 235/models/SAM_Fusion2.py: Line 160
-
Single Dataset:
Modify the dataset path in
/datasets/pre_CD.pyat line 16:root = "<path_to_pretraining_dataset>"
-
Two Datasets:
Modify the paths in
/datasets/pre_CD2.pyat line 16:root1 = "<path_to_first_dataset>" root2 = "<path_to_second_dataset>"
-
Three Datasets:
Modify the paths in
/datasets/pre_CD3.pyat line 16:root1 = "<path_to_first_dataset>" root2 = "<path_to_second_dataset>" root3 = "<path_to_third_dataset>"
Update the model save directory in /pretrain.py:
- Line 19 and Line 22.
Update the dataset path in /datasets/Levir_CD.py at line 16:
root = "<path_to_dataset>"- Configure the following parameters in /train.py:
- Model save path: Line 19 and Line 22.
- Pretrained model loading: Line 30, load_premodel.
- Pretrained model path: Line 42, chkpt_path.
- Configure the following parameters in /eval.py:
- Model save path: Line 19 and Line 22.
- Model name for validation: Line 38, chkpt_path.
The performance of the proposed method is evaluated with and without pretraining on multiple public datasets. Results are presented in terms of Precision (P), Recall (R), and F1-Score (F1).
| Datasets | Methods | P(%) | R(%) | F1(%) |
| LEVIR | SA - CD w/o pretrain | 92.69 | 89.66 | 91.15 |
| SA - CD w/ pretrain | 91.77 | 91.28 | 91.53 | |
| LEVIR + | SA - CD w/o pretrain | 86.88 | 79.15 | 82.83 |
| SA - CD w/ pretrain | 85.55 | 83.44 | 84.43 | |
| S2Looking | SA - CD w/o pretrain | 81.25 | 54.73 | 65.40 |
| SA - CD w/ pretrain | 81.28 | 56.24 | 66.48 | |
| WHU | SA - CD w/o pretrain | 94.66 | 91.22 | 92.91 |
| SA - CD w/ pretrain | 95.29 | 93.67 | 94.47 | |
| WHU Cultivate Land | SA - CD w/o pretrain | 72.65 | 73.93 | 73.28 |
| SA - CD w/ pretrain | 77.74 | 72.82 | 75.20 |




