Skip to content

Official Implementation (code and models) of: "SITS-Extreme: Leveraging Satellite Image Time Series for Accurate Extreme Event Detection"

License

Notifications You must be signed in to change notification settings

hfangcat/SITS-ExtremeEvents

Repository files navigation

🛰️ SITS-ExtremeEvents

Official Implementation (code and models) of our WACVw paper: "Leveraging Satellite Image Time Series for Accurate Extreme Event Detection".

Paper Google Drive Poster

🌐 Overview

SITS-Extreme is a scalable framework for detecting extreme events (e.g., 🌊 floods, 🔥 fires, ⛰️ landslides, 🌪️ hurricanes) by leveraging multi-temporal satellite imagery. Unlike traditional bi-temporal approaches, our method integrates multiple pre-disaster images to isolate disaster-relevant changes and filter out irrelevant variations (e.g., weather, seasonality).


Figure 1: Real-world illustration of SITS-Extreme in detecting extreme events.



Figure 2: Overview of the SITS-Extreme pipeline.

0. Environment Setup 🔧

We recommend using conda to manage the environment and pip to install the required packages.

This project uses Python 3.8 and was tested with PyTorch 1.12.1 + CUDA 11.6.

Create a new conda environment:

conda create -n sits-extreme python=3.8 -y
conda activate sits-extreme

Install the required packages via pip:

pip install -r requirements.txt

⚠️ Notes:

  • The PyTorch versions in requirements.txt are CUDA-specific (+cu116). If you're using a different CUDA version or a CPU-only setup, install PyTorch manually before installing other dependencies: Visit https://pytorch.org/get-started/locally/ to get the right install command.

1. Data Preparation 🗂️

Important Note on Data Preparation and Reproducility:

We recommend downloading the processed data directly from the provided links in Section 1.1 for the following reasons:

  1. Time efficiency: Preparing the data from scratch can take a significant amount of time (e.g., processing RaVAEn data takes over 7 hours).
  2. Consistency and Reproducibility: We inadvertently forgot to set a fixed random seed for the data splitting process. As a result, the exact train/validation/test splits may vary slightly if you choose to prepare the data from scratch using the provided scripts.

For full transparency, we also provide the scripts to prepare the data from scratch in Section 1.2. However, to ensure consistency and reproducibility of the experiments and results as presented in the paper, we strongly suggest using the processed data files, which include the exact splits, available for download in Section 1.1.

1.1. Downloading the data

To run the experiments and reproduce the results, you need to download the processed data from the following links and place them in the data/processed/ directory:

  • EuroSAT (hdf5 format, including train/validation/test splits): Google Drive
  • RaVAEn (hdf5 format, including train/validation/test splits): Google Drive

1.2. Preparing the data from scratch (optional)

If you want to prepare the data from scratch, you can follow the instructions here:

  1. Download the raw data from the following links and place them in the data/raw/ directory:

    • EuroSAT (RGB): GitHub, Download Link
    • RaVAEn:
      • Manually download from the RaVAEn paper website: Google Drive
      • Or alternatively download the data with gdown:
      #!gdown https://drive.google.com/uc?id=1UCNnxaL9pQSkkZQx0aDEWQL0UBXPXkv0 -O fires.zip
      #!gdown https://drive.google.com/uc?id=1CbNGrpK66Hos_TtOEut510k7CSHvSwkl -O landslides.zip
      #!gdown https://drive.google.com/uc?id=1VP3SYgh3bj6uPa4r_bKP-5zFP3JdGin8 -O hurricanes.zip
      #!gdown https://drive.google.com/uc?id=1scjd4gIB_eiNS-CsOyb7Q8rYWnl9TM-L -O floods.zip
  2. Unzip the downloaded files:

    # Make sure you are in the 'SITS-ExtremeEvents/' directory
    python data/scripts/unzip_data.py
  3. Run the processing scripts to prepare the data:

    • EuroSAT:
    # Make sure you are in the 'SITS-ExtremeEvents/' directory
    python data/scripts/prepare_eurosat_data.py
    • RaVAEn:
    # Make sure you are in the 'SITS-ExtremeEvents/' directory
    python data/scripts/ravaen_to_hdf5.py
    python data/scripts/generate_ravaen_splits.py
    python data/scripts/prepare_ravaen_data.py

2. Experiments 🔬

2.1. Training the models

python main.py --config ${CONFIG_FILE} --subconfig ${SUBCONFIG_FILE} --seed ${SEED}

For example, to train our model (SITS-Extreme-VAE) on the RaVAEn dataset with the default configuration and a specific seed, you can run:

python main.py --config "configs/ravaen/default.yaml" --subconfig "configs/ravaen/vae.yaml" --seed 42

2.2. Evaluating the models (calculating metrics for all seeds and aggregating results)

python make_table.py --default_config ${CONFIG_FILE} --subconfig ${SUBCONFIG_FILE} --checkpoint_folder ${CHECKPOINT_FOLDER} --dataset ${DATASET}

For example, to evaluate our model (SITS-Extreme-VAE) on the RaVAEn dataset with the default configuration and a specific checkpoint folder, you can run:

python make_table.py --default_config "configs/ravaen/default.yaml" --subconfig $"configs/ravaen/vae.yaml" --checkpoint_folder "checkpoints/ravaen" --dataset "ravaen"

2.3 Model Checkpoints to reproduce the results (optional)

We provide the model checkpoints (SITS-Extreme-VAE) on the RaVAEn dataset to reproduce the results in the paper. You can create a folder named checkpoints/ravaen, download the model checkpoints from the following link and place them in the checkpoints/ravaen directory:

📋 TODOs

  • add environment setup
  • add Google Drive links for downloading the processed data
  • add example commands for training and testing
  • add model checkpoints for reproducing the results
  • add reference bibtex
  • Test the code from scratch and fix bugs
  • add license file
  • add README improvements (e.g., one or two sentences for project summary, arxiv/thecvf link, overview figure, etc.)
  • add sample output or result logs (optional)

📖 Citation

If you want to cite our work, you can do so with the following BibTex:

@inproceedings{fang2025leveraging,
  title={Leveraging Satellite Image Time Series for Accurate Extreme Event Detection},
  author={Fang, Heng and Azizpour, Hossein},
  booktitle={Proceedings of the Winter Conference on Applications of Computer Vision},
  pages={526--535},
  year={2025}
}

📡 Contact

If you have any questions or need further assistance, please feel free to reach out to us: [email protected].

🙌 Acknowledgements

  1. We would like to thank the authors of the RaVAEn paper for providing the RaVAEn dataset and the authors of the EuroSAT dataset for making it publicly available.
  2. This work is funded by Digital Futures in the project EO-AI4GlobalChange. All experiments were performed using the supercomputing resource Berzelius provided by the National Supercomputer Centre at Linkoping University and the Knut and Alice Wallenberg Foundation. Heng Fang thanks Erik Englesson, Adam Stewart, Dino Ienco, Zhuo Zheng, Sebastian Gerard, Ling Li, and Sebastian Hafner for their feedback on improving the presentation of this paper.

About

Official Implementation (code and models) of: "SITS-Extreme: Leveraging Satellite Image Time Series for Accurate Extreme Event Detection"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages