Skip to content

Latest commit

 

History

History
63 lines (41 loc) · 1.86 KB

File metadata and controls

63 lines (41 loc) · 1.86 KB

Contrastive Surface Image Pretraining (CSIP)

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.

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

  • The Overhead Geopose dataset can be downloaded here
  • The OSCD dataset can be downloaded here
  • The xBD dataset can be downloaded here
  • The S2Looking dataset can be downloaded here
  • The LandCover.ai dataset can be downloaded here

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