Raster Input
Max 32 MB
Drop Sentinel-2 scene here
Supports 12-band GeoTIFF (.tif) or optical (.png, .jpg)
No file selected
Validation Scenes (1-Click)
Verified Ground Truth
Sample 1: Inland Lake / Reservoir
GT Water: 76.9%
Sample 2: Meandering River & Shoreline
GT Water: 35.28%
Sample 3: Narrow Streams & Wetland
GT Water: 8.02%
Sample 4: Open Deep Water Basin
GT Water: 89.38%
Sample 5: Coastal Bay & Estuary
GT Water: 57.26%
Sample 6: Arid Reservoir & Oasis
GT Water: 24.7%
Sample 7: Agricultural Canal Network
GT Water: 17.61%
Sample 8: Thin Creek & Riparian Tributary
GT Water: 3.89%
0.50
Standard τ = 0.50. Lower values capture shallow wetlands; higher values suppress shoreline reflections.
No raster loaded
Select one of the prepackaged validation scenes on the left or drop a 12-channel Sentinel-2 GeoTIFF to inspect surface water segmentation.
Inference Output
Notice: Optical 3-Band RGB Fallback
This scene contains 3 optical bands. Sentinel-2 multispectral bands (B1, B5–B8A, B11–B12) are synthesized. Results are indicative. For verified quantitative accuracy, use 12-channel GeoTIFF.
Surface Water
--%
fraction of total
Water Pixels
--
of 16,384 px
Mean Confidence
--%
sigmoid probability
Inference Time
-- ms
ONNX Runtime CPU
Before / After Split Comparison
Drag slider horizontally to compare
1. Optical (B4-B3-B2)
2. Binary Mask (M ∈ {0,1})
3. Shoreline Overlay
Satellite Explorer
Beacon Ready
Scope Footprint
Mask Opacity:
Tiles provide 3-band RGB optical imagery. Multi-spectral bands are synthesized; treat as visual exploration.
Inference Service Offline
Backend unavailable. Live satellite inference requires active server.
Water
--%
Pixels
--
Latency
-- ms
Lat: 22.4500° | Lon: 31.8500° | Zoom: 12
Fetching satellite tile & segmenting...
REST API Specification
Dual Response Modes
HydroFlow provides a high-throughput REST API supporting multipart file uploads, direct sample identification, and dual output modes: binary PNG mask stream (format=image) and structured telemetry (format=json).
| Method | Endpoint | Format | Description |
|---|---|---|---|
| POST | /predict?format=image | image/png | Direct binary PNG mask stream with custom headers (X-Water-Percentage, X-Latency-Ms) |
| POST | /predict?format=json | application/json | JSON payload with water %, pixel counts, latency, and base64 assets |
| POST | /predict_geo | application/json | Satellite globe water segmentation with tile GPS coordinates |
| GET | /samples | application/json | List verified validation scenes with metadata and ground-truth values |
| GET | /health | application/json | System status, device provider, and model capability inventory |
cURL • Download Binary Mask Stream
# Stream raw binary PNG mask directly to water_mask.png
curl -X POST "http://127.0.0.1:5000/predict?format=image" \
-F "file=@sample_1_lake.tif" \
--output water_mask.png
Python • Multipart JSON Inference
import requests
url = "http://127.0.0.1:5000/predict?format=json"
with open("sample_1_lake.tif", "rb") as f:
res = requests.post(url, files={"file": f}, data={"threshold": 0.50})
data = res.json()
print(f"Surface Water: {data['water_percentage']}%")
print(f"Water Pixels: {data['water_pixels']} / {data['total_pixels']}")
print(f"Latency: {data['latency_ms']} ms")
Model Architecture & Physical Calibration
Benchmark 81.66% IoU
Model Architecture
ResNet-34 U-Net
Transfer Learning (ImageNet encoder)
Input Layout
12 Channels × 128 × 128
Dynamic Spatial Resizing (mod 32)
Inference Engine
ONNX Runtime (CPU)
Multi-threaded ORT_ENABLE_ALL
Dataset Provenance
306 Sentinel-2 Scenes
Independent group-aware split
12-Channel Multispectral Raster Definition
| Index | Band / Layer | Spectral Region | Calibration Min | Calibration Max | Physical Function |
|---|---|---|---|---|---|
| Ch 0 | B1 | Coastal Aerosol | 69.0 | 941.0 | Atmospheric scattering correction |
| Ch 1 | B2 | Blue | 100.0 | 1143.0 | Water penetration & bathymetry |
| Ch 2 | B3 | Green | 233.0 | 1733.0 | NDWI water reflection peak (560 nm) |
| Ch 3 | B4 | Red | 104.0 | 2478.0 | Chlorophyll absorption baseline |
| Ch 4 | B5 | RedEdge 1 | 127.0 | 4046.0 | Vegetation transition boundary |
| Ch 5 | B6 | RedEdge 2 | 14.0 | 4453.0 | Canopy reflectance plateau |
| Ch 6 | B7 | RedEdge 3 | 11.0 | 3761.0 | Near-infrared transition slope |
| Ch 7 | QA_PIXEL | Bitmask | 64.0 | 224.0 | Quality assurance & cloud/shadow flags |
| Ch 8 | B8A | Narrow NIR | 17.0 | 1902.0 | Atmospheric water vapor rejection |
| Ch 9 | B11 | SWIR 1 | 17.0 | 1907.0 | Strong water absorption (1610 nm) |
| Ch 10 | WorldCover | ESA LULC | 10.0 | 80.0 | Land-cover prior (80 = permanent water) |
| Ch 11 | JRC Water | Occurrence % | 0.0 | 98.0 | Multi-decadal historical occurrence frequency |