Home

Awesome

SDACD: An End-to-end Supervised Domain Adaptation Framework for Cross-domain Change Detection

This software implements SDACD: An End-to-end Supervised Domain Adaptation Framework for Cross-domain Change Detection in PyTorch. For more details, please refer to our paper https://arxiv.org/abs/2204.00154

Abstract

​ Change Detection is a crucial but extremely challenging task of remote sensing image analysis, and much progress has been made with the rapid development of deep learning. However, most existing deep learning-based change detection methods try to elaborately design complicated neural networks with powerful feature representations, but ignore the universal domain shift induced by time-varying land cover changes, including luminance fluctuations and season changes between pre-event and post-event images, thereby producing sub-optimal results. In this paper, we propose an end-to-end Supervised Domain Adaptation framework for cross-domain Change Detection, namely SDACD, to effectively alleviate the domain shift between bi-temporal images for better change predictions. Specifically, our SDACD presents collaborative adaptations from both image and feature perspectives with supervised learning. Image adaptation exploits generative adversarial learning with cycle-consistency constraints to perform cross-domain style transformation, effectively narrowing the domain gap in a two-side generation fashion. As to feature adaptation, we extract domain-invariant features to align different feature distributions in the feature space, which could further reduce the domain gap of cross-domain images. To further improve the performance, we combine three types of bi-temporal images for the final change prediction, including the initial input bi-temporal images and two generated bi-temporal images from the pre-event and post-event domains. Extensive experiments and analyses on two benchmarks demonstrate the effectiveness and universality of our proposed framework. Notably, our framework pushes several representative baseline models up to new State-Of-The-Art records, achieving 97.34% and 92.36% on the CDD and WHU building datasets, respectively.

CD_v1.9

Installation

Install PyTorch 1.7.1+ and other dependencies:

pip/conda install pytorch>=1.7.1, tqdm, tensorboardX, opencv-python, pillow, numpy, sklearn

Run demo

Download the datasets from Baidu Netdisk(Extraction code:rvbv).

Generate the train.txt, val.txt and test.txt

python write_path.py

A demo program can be found in demo. Before running the demo, download our pretrained models from Baidu Netdisk (Extraction code: eu68) or Google drive. Set the path of files in tmp/***.pt. Then launch demo by:

python eval.py

Evaluatioin

python eval.py
python visualization.py

Train a new model

Generate the train.txt, val.txt and test.txt:

python write_path.py

Submit the train.sh:

sbatch train.sh

Results

Here gives some examples of change detection results, comparing with existing methods on CDD Dataset in Figure (a), and Figure(b) is the results on WHU Dataset.

(a)(b)
CDDWHU

Evaluation of SDACD on different datasets with SNUNet, STANet, and DASNet as baseline:

MethodsCDDWHU building
P(%)R(%)F(%)P(%)R(%)F(%)
FC-EF84.6865.1373.6380.7567.2973.40
FC-Siam-diff87.5766.6975.0748.8488.9663.06
FC-Siam-conc88.8162.2073.1654.2081.3465.05
STANet83.1792.7687.7082.1289.1983.40
SDACD-STANet87.40 **↑**4.2389.50 **↓**3.2688.40 **↑**0.7090.90 **↑**8.7893.50 **↑**4.3192.21 **↑**8.81
DASNet93.2889.9191.5783.7791.0287.24
SDACD-DASNet92.85 **↓**0.4391.87 **↑**1.9692.35 **↑**0.7889.21 **↑**5.4490.46 **↓**0.5689.83 **↑**2.59
SNUNet96.6094.7795.6882.1289.1985.51
SDACD-SNUNet97.13 **↑**0.5397.56 **↑**2.7997.34 **↑**1.6693.85 **↑**11.7390.91 **↑**1.7292.36 **↑**6.85

The grid search results of λf and λCD. Here we fixed λcyc=10 and λi=1.

BaselineλfλCDP(%)R(%)F(%)
10.0593.3890.8592.10
10.193.8590.9192.36
SNUNet10.293.9290.9492.09
0.50.193.3191.2892.28
10.193.8590.9192.36
20.194.5689.9992.22

Acknowledgements

The authors would like to thank the developers of PyTorch, SNUNet, STANet, and DASNet. Please let me know if you encounter any issues.