EARTH OBSERVATION · FIELD REPORT

TERRAMIND
FLOOD MAPPING

Teaching a geospatial foundation model to trace flood water in Sentinel-1 radar imagery — a staged fine-tuning pipeline on Sen1Floods11, with real numbers and one genuinely humbling out-of-distribution result.

SEN1FLOODS11TERRAMIND-LARGETERRATORCHS1 SAR ONLYupdated 25 JUL 2026

01 · WHY THIS EXISTS

Clouds don’t stop radar

Floods arrive with storms, and storms bring cloud — the exact moment optical satellites go blind. Synthetic-aperture radar doesn’t care.

SAR PHYSICS

Water is dark on radar

Sentinel-1 fires microwave pulses through cloud, smoke and darkness. Smooth open water acts like a mirror and reflects the pulse away from the sensor, so flooded land shows up as near-black in the VV/VH backscatter channels. That physical signal — not colour, not visibility — is what the model segments.

FOUNDATION MODEL

252 chips is not a lot

Sen1Floods11 has only 252 hand-labeled training chips. Training a segmenter from scratch on that would memorise, not generalise. TerraMind 1.0 (IBM & ESA) arrives already fluent in Earth-observation data, so this project only has to teach it one narrow skill: flood water vs everything else.

THE DATASET

Sen1Floods11

11 real flood events across 5 continents: 446 chips where humans traced the water by hand, plus 4,160 chips auto-labeled by Otsu thresholding — cheap, plentiful, and noisy. The whole Bolivia event is held out to ask the only question that matters: does this work on a flood it has never seen?

THE HONEST RESULT

Weak labels weren’t free

Pretraining on all 4,160 weak chips before fine-tuning matched the simple baseline in-domain (0.647 vs 0.653 flood IoU) — and lost5.7 points on the Bolivia holdout. The charts below show it plainly, because a lab notebook that only records wins isn’t a lab notebook.

02 · PIPELINE

From raw scenes to water masks

The whole run is one batch script: pretrain, extract the encoder, fine-tune, evaluate twice. Every stage logs to disk so results are reproducible and auditable.

run_stage1_pipeline.bat
1
SEN1FLOODS11 v1.1

4,160 weakly-labeled Sentinel-1 chips (Otsu-threshold water masks) plus 446 hand-labeled chips across 11 flood events. Bolivia scenes are quarantined as an out-of-distribution holdout.

2
SPLITS + NORMALISATION

Official splits: 252 train / 89 valid / 90 test hand-labeled chips, 15 Bolivia. VV/VH channels normalised with dataset stats (means ≈ −12.6 / −20.3 dB), D4 dihedral augmentation, dice loss with ignore-index for missing labels.

3
TERRAMIND-LARGE BACKBONE

TerraMind 1.0 Large (IBM + ESA) loaded from a local checkpoint via TerraTorch. Tokens are tapped at four depths (layers 5/11/17/23), reshaped to images, and interpolated into a feature pyramid feeding a UNet decoder.

4
STAGE 1 — WEAK PRETRAIN

Full encoder–decoder trained on the 4,160 Otsu-labeled chips (~6–9 h on a single local GPU, bf16). Checkpoint selection monitors loss on the clean hand-labeled validation split, so noisy labels never pick the winner.

5
ENCODER SURGERY + STAGE 2

extract_encoder.py strips the Lightning prefix off the best Stage 1 checkpoint and saves bare encoder weights. Stage 2 restarts with that encoder and a fresh decoder, fine-tuning on the 252 hand-labeled chips for up to 150 epochs.

6
EVALUATION

The best Stage 2 checkpoint runs terratorch test twice: once on the official 90-chip test split, once on the 15-chip Bolivia holdout. Every number on this page comes from those logs.

03 · NUMBERS

What the eval logs say

Two charts, zero massaging: flood-class IoU per training stage, and the label budget that motivated the experiment in the first place.

chart_01 — flood IoU by stage
STAGE 0 — HAND LABELS ONLYSTAGE 1→2 — WEAK PRETRAIN + FINE-TUNE0.00.20.40.60.8IoU · FLOOD CLASS0.6530.647OFFICIAL TEST90 chipsΔ 0.0060.5980.541BOLIVIA HOLDOUT15 chips, out-of-distributionΔ 0.057

Real numbers. Stage 1→2 values are from stage2_eval_test.log / stage2_eval_bolivia.log (TerraTorch test runs, 25 Jul); Stage 0 baseline values are the ones recorded in the pipeline script after the baseline run. In domain the weak pretraining is a wash — out of distribution it costs 5.7 IoU points.

chart_02 — chip budget per split
01k2k3k4k512×512 CHIPSWEAK TRAIN · OTSU AUTO-LABELS4,160HAND TRAIN252HAND VALID89HAND TEST90BOLIVIA HOLDOUT15

Real counts from the split files (splits/*.txt). The weak set is ~16× the hand-labeled training set, which is the whole bet of Stage 1: pretrain on cheap noisy labels, save the 446 hand-labeled chips for fine-tuning and honest evaluation. Bolivia scenes are excluded from the weak set so the holdout stays clean.

eval_readout — stage 2 best checkpoint
MetricOfficial testBolivia OODDrop
IoU · flood0.6470.5410.106
F1 score0.8770.8230.054
mIoU0.7920.7170.075
Pixel accuracy0.9430.9050.038
Flood recall0.8300.7080.122

Real values from the TerraTorch evaluation logs of the best Stage 2 checkpoint. Flood recall is the per-class accuracy of the flood class — on Bolivia the model misses ~29% of flood pixels, the clearest symptom of the distribution shift.

04 · TEST SCENES

Real chips, real masks

Five held-out Sen1Floods11 test scenes — India, and onwards — with the flood mask sweeping over the raw Sentinel-1 backscatter. Recorded from the actual evaluation output, not an illustration.

demo-reel.mp4 · sentinel-1 grd · vv+vh · 10 m/px
05 · FLOODSCOPE.SIM

SAR in, mask out

What the model actually does, as a scene you can sweep: dark specular water in the radar image on the left, the segmented flood product on the right.

floodscope.sim — sar → water mask
S1 SAR · VV/VHPRED. WATER MASK
◂▸
permanent waterflood extentland backscatterMODE: ILLUSTRATION

Drag the divider (or use arrow keys) to sweep between the SAR scene and the segmentation overlay. This is a hand-drawn illustrationof the model’s input/output — smooth water reflects the radar pulse away and shows up dark, which is exactly the signal the network learns. Exporting real prediction rasters from the Stage 2 checkpoint, and a live “tile anywhere” FLOODSCOPE demo, are roadmap items below.

06 · STATUS LEDGER

Where it stands

▣ BUILT
  • Stage 0 baseline: direct fine-tune on hand labels (test flood IoU 0.653)
  • One-command staged pipeline (run_stage1_pipeline.bat): pretrain → extract encoder → fine-tune → double eval
  • Stage 1 weak-label pretraining on 4,160 chips with clean-val checkpointing
  • Stage 2 fine-tune + evaluation on test and Bolivia holdout
◩ IN PROGRESS
  • Understanding the Bolivia regression — did Otsu label bias leak into the encoder?
  • Prediction raster export (GeoTIFF → PNG) for real before/after visuals
▢ NEXT
  • Add Sentinel-2 optical as a second modality and test S1+S2 fusion
  • Frozen-encoder and lower-LR Stage 2 variants to protect pretrained features
  • FLOODSCOPE live demo: pick a tile anywhere, get a water mask in the browser