back to site

Read a SAR flood scene in five widgets.

No reading required. Every teaching point is a control you can move. A Honduras-trained network — UNetRSMamba, a.k.a. CS-Mamba — applied zero-shot to the 26 November 2025 Banda Aceh flood.

Model
CS-Mamba · 40.55 M params
Trained on
KuroSiwo Honduras · 6322 tiles
Test mIoU
79.79 % (TTA)
Training length
37 ep · best @ 12
Scene shown
Banda Aceh · zero-shot

W1What is inside a single SAR tile?

/ STAGE 02 · INTERACTIVE · TILE EXPLORER

Sample one 224² tile and see what's inside.

Each KuroSiwo-format tile directory packs 6 GeoTIFFs: VV + VH at three acquisition times — pre-event 1 (21 Oct, baseline), pre-event 2 (2 Nov, approach) and co-event (26 Nov, main flood scene). Press Sample to load a random tile from the …-tile Banda Aceh test split. Each click round-trips to the WSL box in ~1 s.

Sentinel-1 VV backscatter · Banda Aceh · 21 October 2025 · pre-event baseline
pre-event 1 · VV 21 Oct 2025 baseline — river dark, city bright, no flood
Sentinel-1 VV backscatter · Banda Aceh · 2 November 2025 · approach
pre-event 2 · VV 2 Nov 2025 approach — same scene ~11 days before the flood
Sentinel-1 VV backscatter · Banda Aceh · 26 November 2025 · main flood scene
co-event · VV 26 Nov 2025 flood visible — new dark patches across farmland

Three Sentinel-1 VV composites — the same scene, ~11 days apart. Each tile the model sees is a 224 × 224 px crop of these, stacking all 6 bands (VV + VH at each of the three dates). About 911 such tiles make up the Banda Aceh test split. When the GPU endpoint is online, the Sample button above will sample one at random and show its 6 bands.

Each tile is 6 GeoTIFFs: VV and VH polarisation at three acquisition times. Water scatters radar away (dark); built-up areas scatter it back (bright). The six channels stacked in this exact order are what every forward pass sees.

W2How does the clamp rescue — or kill — the prediction?

/ STAGE 03 · INTERACTIVE · CLAMP PLAYGROUND

Drag the clamp, watch the model's view of Banda Aceh change.

Every bar is a VH backscatter bucket. Everything to the right of your clamp value gets clipped to the ceiling — identical to the model. Find the clamp that keeps the flood tail visible without drowning in speckle. This one runs entirely in your browser.

clamp0.300
truncated17.6%
post-clamp mean0.1884
× KuroSiwo7.14×
clamp = 0.300 0.00.20.40.60.81.0 KuroSiwo μ
Goldilocks · most of the flood tail survives, noise still manageable.

Banda Aceh's VH runs 5–8× brighter than the Honduras training mean. Clamp = ∞ lets the bright tail dominate gradients; clamp = 0.15 cuts into the flood signal and it vanishes. 0.30 is the sweet spot we ship.

W3What is actually inside CS-Mamba?

/ WIDGET 3 · INTERACTIVE · ARCHITECTURE WALKTHROUGH

Click an encoder level. See its tensors, its block count, its job.

CS-Mamba is a U-Net where every block is a two-branch residual cell: a convolution for local speckle, a Mamba state-space scan for long-range water connectivity. Four encoder levels, mirrored by four decoder levels, skip-connected at each scale. 40.55 M params total.

levels4
blocks12
in6ch
out3ch
input (B, 6, 224, 224) 3 SAR acquisitions × VV + VH
encoder
decoder
output (B, 3, 224, 224) bg · perm water · flood
SELECTED · Level 2
shape
(B, 384, 14, 14)
blocks
6 × ConvRSMamba
param share
~55 %

6 blocks — the information-densest scale. Mamba scans now cover a full river bend in one pass. Most of the model's parameters live here.

ConvRSMambaBlock · body (applied at Level 2)
# two-branch residual cell · shape preserved
x = x + conv_branch(x)    # depthwise 3×3 → BN → GELU → 1×1
x = x + mamba_branch(x)   # RSMamba: fwd + rev + shuffle, gated fusion
x = x + mlp(norm(x))     # LayerNorm → FFN

Conv handles short-range speckle; Mamba scan propagates information along connected water bodies. real source ↗

Four encoder levels mirrored by four decoder levels with skip connections at every scale. Each block is a two-branch residual cell — convolution for local SAR speckle, Mamba scan for long-range water connectivity.

W4How did the 37-epoch run actually go?

/ TRAINING TRAJECTORY

Scrub through the 37-epoch run that produced the checkpoint above.

The inference you see on the case page is not magic — it comes from a specific checkpoint, saved at a specific epoch of a specific training run. Below is the real shape of that run: loss, per-class IoU, learning-rate schedule, and the exact epoch where the best weights were picked.

Note · The run is real: 37 epochs, best val at epoch 12, 79.79 % test mIoU with TTA. Per-epoch curve values below are an approximation that matches the three-phase summary in TEACHING_NOTES_BEST_MODEL.md. The full 37-row log ships at `public/sources/checkpoints/UNetRSMamba_FloodFocus2/`.

Model
CS-Mamba (class name UNetRSMamba) · 40.55M params
Data
KuroSiwo Honduras · 6322 train · 649 val · 911 test
Compute
WSL2 · 1× RTX 4090 · PyTorch 2.3 · fp16 AMP · EMA 0.999
Loss train val
0.000.320.640.961.28 1712203037
Validation IoU flood water land
0.000.250.500.751.00 1712203037
epoch 1 / 37

Three phases: A (1–6) learn "not water"; B (7–11) focal loss kicks in and Flood Recall leaps 25 → 81 %; C (12–37) plateau with precision drift. Best val at epoch 12. Test mIoU 79.79 % with TTA.

W5Why this architecture and not one of the four we tried first?

/ WIDGET 5 · INTERACTIVE · MODEL RACE

Five models. Same data. Click any row for the post-mortem.

Same KuroSiwo Honduras split (6322 train · 649 val · 911 test). Same FloodFocus loss. Five different architectures were trained to completion. CS-Mamba is lower on val than UNet but higher on test — the most instructive row is not the winner, it's that reversal.

The U-Net wrapper around RSMamba. Val mIoU 75.98 % — two points below UNet — but test mIoU 79.79 %, nearly four points above. The three-path + multi-scale combination gave it headroom on unseen activations (test split: 497 / 421 / 502) that UNet's overfitted val peak did not predict. Flood IoU 63.46 %, Flood F1 77.65 %. This is the checkpoint every inference on this site loads.

CS-Mamba's val mIoU is two points below UNet's — but its test mIoU is four points above. The teaching point is not that CS-Mamba wins; it is that the val→test gap lies about generalisation.