This repocitory contains the official implementation of our paper: CutMix-CD: Advancing Semi-Supervised Change Detection via Mixed Sample Consistency.
This repo was tested with python 3.8, torch 1.7.1.
pip install -r requirements.txtDownload LEVIR-CD and S2Looking datasets. The data preprocessing is introduced in the paper.
Check the file loaders/datasets.py and you can adjust it appropriately for your own dataset.
Modify the argument --data_root in training scripts.
We provide training scripts on LEVIR-CD and S2looking datasets.
To train the model, first download ImageNet-pretrained 3x3resnet50-imagenet.pth file and save it to the path models/backbones/pretrained.
Detailed training arguments are described in the training script. You can simply train a model by:
python train_LEVIR.pyDuring the training, the losses and metrics are reported in the file train.log saved in --log. The best model is saved as best.pth.
Set the path --weight_path of the best model in inference script and evaluate on the test set by:
python inference_LEVIR.pyEvaluation metrics are saved in the file test.log saved in --log.
If you find this repo useful for your research, please consider citing the paper as follows:
@ARTICLE{10810476,
author={Shu, Qidi and Zhu, Xiaolin and Wan, Luoma and Zhao, Shuheng and Liu, Denghong and Peng, Longkang and Chen, Xiaobei},
journal={IEEE Transactions on Geoscience and Remote Sensing},
title={CutMix-CD: Advancing Semi-Supervised Change Detection via Mixed Sample Consistency},
year={2024},
doi={10.1109/TGRS.2024.3520630}}
Thanks to the following open source efforts: