Home

Awesome

Change Detection Laboratory

Note: This project is currently under development, and no stable version has yet been released.

Developing and benchmarking deep learning-based remote sensing change detection methods using PaddlePaddle.

CDLab also has a PyTorch version.

English | 简体中文

Prerequisites

opencv-python==4.1.1
paddlepaddle-gpu==2.2.0
visualdl==2.2.1
pyyaml==5.1.2
scikit-image==0.15.0
scikit-learn==0.21.3
scipy==1.3.1
tqdm==4.35.0

Tested using Python 3.7.4 on Ubuntu 16.04.

Get Started

In src/constants.py, change the dataset locations to your own.

Data Preprocessing

In scripts/ there are preprocessing scripts for several datasets。

Model Training

To train a model from scratch, use

python train.py train --exp_config PATH_TO_CONFIG_FILE

A few configuration files regarding different datasets and models are provided in the configs/ folder for ease of use. Note that the hyperparameters are not elaborately investigated to obtain a fully optimized performance.

As soon as the program starts and prints out the configurations, there will be a prompt asking you to write some notes. What you write will be recorded into the log file to help you remember what you did, or you can simply skip this step by pressing [Enter].

To resume training from some checkpoint, run the code with the --resume option.

python train.py train --exp_config PATH_TO_CONFIG_FILE --resume PATH_TO_CHECKPOINT

Other frequently used commandline options include:

During or after the training process, you can check the model weight files in exp/DATASET_NAME/weights/, the log files in exp/DATASET_NAME/logs/, and the output change maps in exp/DATASET_NAME/out/.

Model Evaluation

To evaluate a model on the test subset, use

python train.py eval --exp_config PATH_TO_CONFIG_FILE --resume PATH_TO_CHECKPOINT --save_on --subset test

This project also provides the funtionality of sliding-window test on large raster images. Use the following command:

python sw_test.py --exp_config PATH_TO_CONFIG_FILE \
  --resume PATH_TO_CHECKPOINT --ckp_path PATH_TO_CHECKPOINT \
  --t1_dir PATH_TO_T1_DIR --t2_dir PATH_TO_T2_DIR --gt_dir PATH_TO_GT_DIR

Other frequently used commandline options of src/sw_test.py include:

Note however that currently src/sw_test.py does not support custom pre-processing or post-processing modules.

Supported Models

ModelNameLink
CDNetCDNetpaper
FC-EFUNetpaper
FC-Siam-concSiamUNet-concpaper
FC-Siam-diffSiamUNet-diffpaper
STANetSTANetpaper
DSIFNIFNpaper
SNUNetSNUNetpaper
BITBITpaper
L-UNetLUNetpaper
DSAMNetDSAMNetpaper

Supported Datasets

DatasetNameLink
Synthetic images and real season-varying remote sensing imagesSVCDgoogle drive
WHU building change detection datasetWHUwebsite
LEVIR building change detection datasetLEVIRCDwebsite

Performance on SVCD Dataset

ModelPrecisionRecallF1OA
CDNet93.2187.7290.3997.70
FC-EF94.1488.7891.3897.93
FC-Siam-conc95.4092.0693.7098.47
FC-Siam-diff95.7492.8094.2498.60
STANet90.0797.9193.8298.41
DSIFN97.3195.3296.3199.10
SNUNet97.7697.2297.4999.38
BIT96.7195.0995.9099.00
L-UNet96.8395.5496.1899.06
DSAMNet91.6598.3794.8998.69

License

This project is released under the Unlicense.

Contributing

Any kind of contributions to improve this repository is welcome.