ImpactMesh
ImpactMesh is a large-scale multimodal, multitemporal dataset for flood and wildfire mapping, released by IBM, DLR, and the ESA Φ-lab. It combines Sentinel-1 SAR, Sentinel-2 optical imagery, and Copernicus DEM with high-quality annotations from Copernicus EMS. The dataset covers over 400 events globally with four temporal observations per event.
Dataset
Please find the wildfire subset at https://huggingface.co/datasets/ibm-esa-geospatial/ImpactMesh-Fire and the flood samples at https://huggingface.co/datasets/ibm-esa-geospatial/ImpactMesh-FLood. The following map gives an overview of events present in ImpactMesh:
The wildfire masks are binary (0 = unburnt, 1 = burnt). The flood masks have three
classes (0 = no water, 1 = permanent water, 2 = flood water), so flood configs use
num_classes: 3. Both use -1 as the ignore value.
This repository provides code to build the pytorch dataloader or directly fine-tune a model with TerraTorch.
Setup
Quick start from pypi:
pip install impactmesh
Alternatively create a new environment and install TerraTorch and the package from source:
python -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install terratorch==1.2.1
pip install zarr==2.18.0 numcodecs==0.15.1
pip install -e .
ImpactMesh uses Zarr Version 2.
Download
Each split is released as one tar per modality. Download a subset and extract the tars into the flat directory the configs expect:
hf download ibm-esa-geospatial/ImpactMesh-Flood --repo-type dataset --local-dir data/ImpactMesh-Flood
mkdir -p data/ImpactMesh-Flood/data
for f in data/ImpactMesh-Flood/*/*.tar; do
tar -xf "$f" -C data/ImpactMesh-Flood/data
done
Fine-tuning
Run training using on of the configs provided in configs/.
terratorch fit --config configs/terramind_v1_tiny_impactmesh_fire.yaml
Run the evaluation on the test split.
terratorch test --config configs/terramind_v1_tiny_impactmesh_fire.yaml --ckpt output/terramind_tiny_impactmesh_fire/1e-4/best_val_loss.ckpt
Run prediction with the following commands. The predict_data_root is expected to have modalities as subfolders with tif/zarr.zip files similar to ImpactMesh. Add --predict_split <split>.txt with sample prefixes if you only want to predict a subset in predict_data_root. Note that terratorch predict requires DEM input, use run_inference.py as an alternative if you don't use DEM inputs.
terratorch predict -c configs/terramind_v1_tiny_impactmesh_fire.yaml --ckpt path/to/ckeckpoint.pt --predict_output_dir output/impactmesh_fire_predictions --data.init_args.predict_data_root data/fire_inputs
# TerraTorch automatically uses a tiled inference. It might still lead to OOM errors. In that case, you can use:
python impactmesh/run_inference.py -c configs/terramind_v1_tiny_impactmesh_fire.yaml --ckpt path/to/ckeckpoint.pt --output_dir output/impactmesh_fire_predictions
WebDataset
Reading individual files means several random reads per sample, which is slow on shared
or network filesystems. wds_create_shards.py repackages the released per-modality tars
into WebDataset shards that hold all
modalities of a patch in one contiguous record, so they stream sequentially:
hf download ibm-esa-geospatial/ImpactMesh-Flood --repo-type dataset \
--local-dir data/hf/ImpactMesh-Flood
python -m impactmesh.wds_create_shards \
--hf-root data/hf/ImpactMesh-Flood --out data/shards --disaster flood
This streams tar-to-tar, holding one sample in memory, so it does not need the dataset extracted first. Seen-event patches are written to the first test shards and held-out events to the later ones, so each test subset is addressed as a shard range over a single copy of the data.
Use the WdsImpactMeshDataModule for training with shards, see config:
terratorch fit --config configs/terramind_v1_tiny_impactmesh_flood_wds.yaml
Shards are an infinite stream, so an epoch is defined by train_epoch_size (the number
of samples in the train split) rather than by exhausting the dataset.
Citation
Our technical report is released soon!
Acknowledgement
ImpactMesh was developed as part of the FAST‑EO project funded by the European Space Agency Φ‑Lab (contract #4000143501/23/I‑DT).
Sentinel-2 Level-2A data were downloaded from Microsoft Planetary Computer and are provided under Copernicus Sentinel license conditions (© European Union 2015–2025, ESA) (https://planetarycomputer.microsoft.com/dataset/sentinel-2-l2a).
Sentinel-1 Radiometrically Terrain Corrected (RTC) SAR data were retrieved from Microsoft Planetary Computer (calibrated to GRD and terrain-corrected using PlanetDEM) under Copernicus Sentinel license terms (© European Union 2014–2025) (https://planetarycomputer.microsoft.com/dataset/sentinel-1-rtc).
The DEM data is produced using Copernicus WorldDEM-30 © DLR e.V. 2010-2014 and © Airbus Defence and Space GmbH 2014-2018 provided under COPERNICUS by the European Union and ESA; all rights reserved.
Annotations were sourced from the Copernicus Emergency Management Service (© European Union, 2012–2025), available at https://emergency.copernicus.eu/.
License
The code and models are release under Apache 2.0. The dataset is released under CC-BY 4.0.
Release files for impactmesh 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| impactmesh-0.2.0.tar.gz | 25.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| impactmesh-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 50.9 kB
Release files / impactmesh-0.2.0.tar.gz
| Download URL | impactmesh-0.2.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edc17e17293d6f8acd5678a79b18fe7914f41a1d3ae0deb976d69a8d6143ac6d
|
|
BLAKE2b-256 checksum How to use checksums |
7ade69c8cd42469ee653a77839f32015e88e392392ff87af238bfba509a91549
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / impactmesh-0.2.0-py3-none-any.whl
| Download URL | impactmesh-0.2.0-py3-none-any.whl |
|---|---|
| Size | 25.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3a1209c9adf3b41b440bb77a86c513f42fbe354d1dc8d48e5487cd49a40c77d
|
|
BLAKE2b-256 checksum How to use checksums |
ff3646cf3204d4617379d08ae4c53bb042c1196834232fe20cf4c355eecd2bea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|