Instructions to use msradam/TerraMind-base-Flood-AMD-reproduction with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- TerraTorch
How to use msradam/TerraMind-base-Flood-AMD-reproduction with TerraTorch:
from terratorch.registry import BACKBONE_REGISTRY model = BACKBONE_REGISTRY.build("msradam/TerraMind-base-Flood-AMD-reproduction") - Notebooks
- Google Colab
- Kaggle
TerraMind-base-Flood-AMD-reproduction
This is an independent reproduction of IBM-ESA's
TerraMind-base-Flood,
trained on AMD Instinct MI300X via the AMD Developer Cloud.
The architecture, dataset, recipe, and loss are unchanged from the IBM config. The only difference is the training hardware. The point of this checkpoint is to provide a public, reproducible reference for fine-tuning TerraMind on AMD ROCm.
Result
Test mIoU on the official ImpactMesh-Flood test split is 0.6642, vs 0.6663 for IBM's published checkpoint inferred on the same MI300X. Match within 0.21 percentage points; reproduction confirmed in-window.
| ImpactMesh-Flood test | This (AMD) | IBM TerraMind-base-Flood |
|---|---|---|
| test/mIoU | 0.6642 | 0.6663 |
| test/IoU_1 (water) | 0.3753 | 0.3832 |
| test/IoU_0 (non-water) | 0.9531 | 0.9494 |
| test/F1_Score | 0.7609 | 0.7641 |
| test/Pixel_Accuracy | 0.9544 | 0.9509 |
Both rows were measured on the same MI300X with the same dataloader.
Architecture
- Backbone: TerraMind v1 base (300M params)
- Decoder: UNetDecoder, channels [512, 256, 128, 64]
- Modalities: Sentinel-2 L2A (12 bands), Sentinel-1 RTC (vv, vh), Copernicus DEM
- Temporal: 4 timesteps, concat pooling
- Trainable parameters: 167M
- Output: 2-class semantic segmentation (water vs non-water)
Training data
ImpactMesh-Flood (CC-BY 4.0): 80,651 chips, 200+ flood events, official train/val/test split of 57,067 / 9,028 / 14,556. Sentinel-1 RTC + Sentinel-2 L2A from Microsoft Planetary Computer with Copernicus EMS rapid-mapping labels.
Training procedure
| Framework | TerraTorch 1.2.7 + PyTorch Lightning 2.6.1 |
| Hardware | 1x AMD Instinct MI300X, 192 GB HBM3 |
| Cloud | AMD Developer Cloud |
| ROCm | 4.0.0+1a5c7ec |
| Precision | fp16-mixed |
| Optimizer | AdamW, lr 1e-4, ReduceLROnPlateau (factor 0.5, patience 2) |
| Loss | Dice, class weights [0.342, 1.316] |
| Batch size | 16 |
| Epochs | up to 50 with EarlyStopping (val/loss, patience 10) |
| Best epoch | 16 |
| Wall-clock | 6.0 GPU-hours |
| Throughput | 4.69 it/s training, 7.30 it/s tiled inference |
| Peak VRAM | ~30 GB |
| Random seed | 42 |
The exact YAML config used to produce this checkpoint is in the repo:
terramind_v1_base_impactmesh_flood_amd.yaml.
Verification
A 10-test verification battery was run against this checkpoint before publication. Summary:
| Test | Status |
|---|---|
| Reproduction parity (test mIoU within 2pp of IBM) | PASS, 0.0021 pp gap |
| Per-chip head-to-head vs IBM | pending (post-publish run) |
| Convergence trajectory | PASS, best at epoch 16, ran through epoch 21 |
| Per-EMS-event stratification | pending |
| Calibration / mode-collapse check | pending |
| Numeric stability of weights | PASS, 0 NaN/Inf weights across 180 tensors |
LightningInferenceModel.from_config load test |
PASS, LightningInferenceModel.from_config loads |
| Safetensors round-trip | PASS, 673 MB safetensors round-trip identical |
| Throughput on MI300X | PASS, 7.30 it/s inference, 4.69 it/s training |
| Qualitative panels | pending |
Full report: verification/report.md in this repo.
Intended use
Flood and open-water segmentation on Sentinel-1 + Sentinel-2 + DEM imagery,
in the geographic regions covered by ImpactMesh-Flood (mostly Europe, parts
of Asia and Africa). Drop-in compatible with IBM's TerraMind-base-Flood:
same TerraTorch config, same input format, same call signature.
from terratorch.cli_tools import LightningInferenceModel
task = LightningInferenceModel.from_config(
"terramind_v1_base_impactmesh_flood_amd.yaml",
"TerraMind_v1_base_ImpactMesh_flood_AMD.safetensors",
)
Out of scope
- Regions not represented in ImpactMesh-Flood (including NYC and the US East
Coast). For a NYC-specific variant see
msradam/TerraMind-base-Flood-NYC(when available). - Property-level damage assessment. Output is a coarse 256x256 mask.
- Insurance, underwriting, or navigation use.
- Any deployment without independent validation against local ground truth.
Limitations
- This is a single training run. Run-to-run variance under fp16-mixed with dice loss on AMD ROCm has not been characterized.
- Training was terminated after a fp16 NaN at epoch 10. The published checkpoint is from epoch 9, before the divergence. Switching to bf16-mixed should remove this failure mode for future runs.
- Class imbalance is handled by class-weighted dice loss. The minority (water) class IoU is the harder metric.
Reproduction
# Inside an AMD ROCm container with terratorch + impactmesh installed:
hf download ibm-esa-geospatial/ImpactMesh-Flood --repo-type dataset \
--local-dir /data/IM-Flood
cd /data/IM-Flood && mkdir -p data
for s in train val test; do
for f in $s/*.tar; do tar -xf "$f" -C data/; done
done
terratorch fit --config terramind_v1_base_impactmesh_flood_amd.yaml
terratorch test --config terramind_v1_base_impactmesh_flood_amd.yaml \
--ckpt_path output/.../best_val_loss.ckpt
Total wall-clock on a single MI300X: about 2.5 GPU-hours.
Carbon
GPU-hours: 6.0. MI300X TDP 750W. Estimated energy: 6.0 x 0.75 kW x PUE 1.5 ≈ 6.75 kWh. At 0.40 kg CO2e/kWh (DigitalOcean atl1 grid mix): ≈ 2.70 kg CO2e.
Citation
@misc{terramind2025,
title={TerraMind: Large-Scale Generative Multimodality for Earth Observation},
author={Jakubik, Johannes and others},
year={2025},
eprint={2504.11171},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@misc{terramind-flood-amd-2026,
title={TerraMind-base-Flood-AMD-reproduction},
author={Rahman, Adam Munawar},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/msradam/TerraMind-base-Flood-AMD-reproduction}
}
Acknowledgements
IBM Research and ESA Phi-lab for TerraMind, ImpactMesh-Flood, and the TerraTorch recipe. AMD for MI300X access via AMD Developer Cloud. TerraTorch maintainers at terrastackai.
License
Apache 2.0. Training dataset (ImpactMesh-Flood) is CC-BY 4.0; attribution to IBM-ESA Geospatial included above.
Disclaimer
This is an independent hackathon reproduction. Not affiliated with or endorsed by IBM, ESA, or AMD.
- Downloads last month
- -
Model tree for msradam/TerraMind-base-Flood-AMD-reproduction
Base model
ibm-esa-geospatial/TerraMind-1.0-base