Change Detection Laboratory
Developing and benchmarking deep learning-based remote sensing change detection methods using PaddlePaddle.
CDLab also has a PyTorch version. Currently, this repo contains more model implementations, dataset interfaces, and configuration files.
Tested using Python 3.7.4 on Ubuntu 16.04.
src/constants.py, change the dataset locations to your own.
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.
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
To resume training from some checkpoint, run the code with the
python train.py train --exp_config PATH_TO_CONFIG_FILE --resume PATH_TO_CHECKPOINT
Other commandline options include:
--anew: Add it if the checkpoint is just used to initialize model weights. Note that loading an incompatible checkpoint is supported as a feature, which is useful when you are trying to utilize a well pretrained model for finetuning.
--save_on: By default, an epoch-based trainer is used for training. At the end of each training epoch, the trainer evaluates the model on the validation dataset. If you want to save the model output during the evaluation process, enable this option.
--log_off: Disable logging.
--vdl_on: Enable VisualDL summaries.
--debug_on: Useful when you are debugging your own code. In debugging mode, no checkpoint or model output will be written to disk. In addition, a breakpoint will be set where an unhandled exception occurs, which allows you to locate the causes of the crash or do some cleanup jobs.
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
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
|SZTAKI AirChange Benchmark set: Szada set||
|SZTAKI AirChange Benchmark set: Tiszadob set||
|Onera Satellite Change Detection dataset||
|Synthetic images and real season-varying remote sensing images||
|LEVIR building change detection dataset||
|WHU building change detection dataset||
This repository is currently under development. Note that no license has yet been added.