TimeMatch
Official source code of TimeMatch: Unsupervised Cross-region Adaptation by Temporal Shift Estimation by Joachim Nyborg, Charlotte Pelletier, Sébastien Lefèvre, and Ira Assent.
Requirements
Python requirements
- Python 3.9.4, PyTorch 1.8.1, and more in
environment.yml
.
TimeMatch dataset download
The dataset can be freely downloaded from Zenodo. The extracted size is about 78 GB.
Pre-trained models and full results
Pre-trained models and results can also be downloaded from Zenodo
Usage
Setup conda environment and activate
conda env create -f environment.yml
conda activate timematch
Download dataset and extract to /media/data/timematch_data
(or set --data_root
to its path for train.py
).
Pre-trained models should be extracted to timematch/outputs
.
Example: train model on the source domain
python train.py -e pseltae_32VNH --source denmark/32VNH/2017 --target denmark/32VNH/2017
Train TimeMatch with pre-trained model
python train.py -e timematch_32VNH_to_30TXT --source denmark/32VNH/2017 --target france/30TXT/2017 timematch --weights outputs/pseltae_32VNH
All training scripts can be found in the scripts
directory.
Reference
TODO
Credits
- The implementation of PSE+LTAE is based on the official implementation
- The implementation of competitors MMD, DANN, and CDAN is based on Transfer Learning Library, and JUMBOT on its official implementation.
- The annotations used in the TimeMatch dataset from the LPIS produced by the mapping agencies IGN (France), NaturErhverstyrelsen (Denmark), and the AMA (Austria).
- The Sentinel-2 imagery were accessed from the AWS bucket managed by Sinergise