Implementation of "Background-Mixed Augmentation for Weakly Supervised Change Detection" in PyTorch.
- python 3.9
- pytorch 1.9.1
- opencv-python 4.5.5.64
- torchvision 0.10.1
- pillow 9.1.1
You can use the following commands to train and test:
python train.py
python test.py
train.py
: the entry point for training.models/CG.py
: defines the architecture of the Generator model and Discriminator models.options.py
: creates option lists using theargparse
package.datasets.py
: process the dataset before passing it to the network.models/vgg16.py
: defines the Classifier.models/models.py
: defines the model.optimizer.py
: defines the optimization.loss.py
: defines the loss functions.
Because of the perceptual similarity loss, you need to train a Classifier to extract the semantic features.
python train_Classifier.py
train_data
: The data for training.AICD
: Aerial image change detection dataset.C
: Change images.UC
: Background images.
BCD
: Building change detection dataset.C
: Change images.UC
: Background images.
test_data
: The data for testing.AICD
: Aerial image change detection.C
: Change images.
BCD
: Building change detection dataset.C
: Change images.
You can download the AICD dataset from The Aerial Imagery Change Detection (AICD) dataset
You can download the BCD dataset from the WHU Building change detection Dataset
Both cropped datasets can be downloaded here. Please cite their papers.
- AICD
- AICD
If you find this repo useful for your research, please cite our paper:
@article{huang2023bgmix,
title={Background-Mixed Augmentation for Weakly Supervised Change Detection},
author={Huang, Rui and Wang, Ruofei and Guo, Qing and Wei, Jieda and Zhang, Yuxiang and Fan, Wei and Liu, Yang},
journal={AAAI},
year={2023}
}