Home

Awesome

Contrastive Surface Image Pretraining (CSIP)

<img src="./assets/architecture.png" width="800px"></img>

This repository contains code for the ICIP 2022 paper "Supervising Remote Sensing Change Detection Models with 3D Surface Semantics", Corley et al. (2022). In this paper we contrastively train dual encoders (RGB and AGL) to learn 3D surface semantics. We then evaluate the pretrained RGB encoder on several downstream change detection and segmentation tasks. We find that pretraining using our CSIP framework improves performance on downstream tasks where surface and height information is relevant in optical imagery.

<img src="./assets/results.png" width="800px"></img>

Install dependencies

First install OpenJPEG to read JPEG2000 (.j2k) files

sudo apt-get install -y libopenjp2-7 libopenjp2-7-dev

Install Python dependencies

pip install -r requirements.txt

Datasets

Pretraining

python pretrain.py --cfg conf/pretrain_overhead_geopose.yaml

Training

To perform an individual experiment, use the following:

python train.py --cfg conf/oscd-csip.yaml

To repeat all experiments from the paper, use the following:

bash train.sh

Evaluation

To evaluate an individual experiment, use the following:

python evaluate.py --dir logs/oscd-csip

To evaluate all experiments from the paper, use the following:

bash evaluate.sh