cjf8899 / CDRL

:earth_asia:Official PyTorch implementation of "Unsupervised Change Detection Based on Image Reconstruction Loss", CVPRW 2022.
46 stars 5 forks source link
change-detection pytorch unsupervised-learning

Unsupervised Change Detection Based on Image Reconstruction Loss

release note

24.08.19 - We have published an extended version of this paper, CDRL-SA.

22.07.07 - Add : evaluate metric (note that all evaluate metrics is mean value. (0, 1))

Unsupervised Change Detection Based on Image Reconstruction Loss

Hyeoncheol Noh, Jingi Ju, Minseok Seo, Jongchan Park, Dong-Geol Choi

arXiv 2204.01200

Project Page

Results

Result videos are the results of the diffence map for each threshold. We used a threshold of 0.7.

Change Pair Result Unchange Pair Result

Abstract

To train the change detector, bi-temporal images taken at different times in the same area are used. However, collecting labeled bi-temporal images is expensive and time consuming. To solve this problem, various unsupervised change detection methods have been proposed, but they still require unlabeled bi-temporal images. In this paper, we propose unsupervised change detection based on image reconstruction loss using only unlabeled single temporal single image. The image reconstruction model is trained to reconstruct the original source image by receiving the source image and the photometrically transformed source image as a pair. During inference, the model receives bitemporal images as the input, and tries to reconstruct one of the inputs. The changed region between bi-temporal images shows high reconstruction loss. Our change detector showed significant performance in various change detection benchmark datasets even though only a single temporal single source image was used. The code and trained models will be publicly available for reproducibility.

memoryblock

Installation

Step1. Install CDRL.

git clone https://github.com/cjf8899/CDRL.git
cd CDRL
pip install -r requirements.txt

Step2. Creating a Pseudo-Unchange Image.

Download LEVIR-CD, LEVIR-CD_A2B_B2A and put them under /datasets in the following structure:

CDRL/datasets
       |——————LEVIR-CD
       |        └——————train
       |        └——————val
       |        └——————test
       └——————LEVIR-CD_A2B_B2A
                └——————train
                └——————val

The Photometric Transform model we used the CycleGAN code of pytorch-CycleGAN-and-pix2pix. We provide the model's weights.

Training

python main.py --root_path ./datasets/ --dataset_name LEVIR-CD --save_name levir 

Creating a Difference map.

python test.py --root_path ./datasets/ --dataset_name LEVIR-CD --save_name levir --save_visual