--- title: Flood mapping emoji: 🌊 colorFrom: blue colorTo: indigo sdk: static pinned: false short_description: In-browser Sentinel-2 flood mapping with WorldFloods v2 --- # Flood mapping — WorldFloods v2 · Sentinel-2 · in-browser Draw a study area, pick a pre-flood baseline scene and a post-flood scene, and run the ml4floods **WorldFloods v2** U-Net **entirely in your browser** — no server, no account, no API keys. - **Scenes**: public Sentinel-2 L2A archive on AWS Open Data, searched via the [Element84 Earth Search](https://element84.com/earth-search/) STAC API and read as cloud-optimized GeoTIFFs with HTTP range requests (geotiff.js). - **Model**: [WF2_unetv2_bgriswirs](https://huggingface.co/isp-uv-es/ml4floods) (6 bands: B2, B3, B4, B8, B11, B12) exported to ONNX with normalization baked in, executed with onnxruntime-web (WebGPU when available, WASM otherwise). - **Flood definition**: water probability ≥ threshold in the post scene on pixels that were land in the baseline scene, excluding thick cloud, clipped to the drawn polygon. - **Outputs**: flood polygons (GeoJSON), flood mask (GeoTIFF), overlay PNG, stats JSON — all generated client-side. ## Caveats - The model was trained on Sentinel-2 **L1C (TOA)**; here it runs on **L2A (surface reflectance)** from the open archive. Results are close but validate against known events before operational use. - Optical method: clouds are blind spots. Scene ranking uses scene-level cloud cover; the app reports the cloud share inside your AOI per run. - Study areas are capped at 1,000 km² (browser memory). A run downloads ~50–120 MB of imagery. Full method description, assumptions and references: **[METHODOLOGY.md](METHODOLOGY.md)**. Built by [IWMI](https://www.iwmi.org). Model and method: [spaceml-org/ml4floods](https://github.com/spaceml-org/ml4floods).