methods_agreeTwo independent methods agree, so the mean of the agreeing pair is published with its uncertainty.
FIG. 0 · FINSALBEKKEN, NORWAYFive seconds of a river camera, 150 frames registered and averaged with OpenCV. The silk is moving water; the stones held still.
Thalweg reads discharge from the video a river camera already records. OpenCV 5 measures the surface three ways, a policy-gated agent decides whether the number can go out, and a flood warning waits for a hydrologist's signature.
Open the live stationMost rivers that flood have a camera somewhere near them, and no gauge. Thalweg turns that camera into one, checks itself three ways, and says plainly when it can't.
Chapter one · how it measures
Four steps, each with its evidence. Every figure in this chapter comes from one development run on video 8 of the Video Globe Challenge, a Norwegian brook: 300 frames, ten seconds.
ALIKED keypoints are matched with LightGlue on the banks only, never on the water, and each keyframe is registered to the reference view, so camera shake can't become velocity. On this clip the frozen build rejected the feature model and treated the camera as static. It was hand-held and drifts. That miss is the clearest open issue in our report.
Surveyed ground reference points fix the camera model. Each pixel is projected onto the water plane at the measured stage, so a distance on the image becomes a distance on the river. When the river rises, the plane rises with it.
Window correlation, streak angles in space-time images, and dense optical flow. A visible riverbed fools correlation but not streaks; glare fools both in different ways. The agent compares them before it trusts any of them.
914 of 1146 vectors
55 of 60 lines
997 of 1109 vectors
Surface velocity, times a coefficient for the slower water below, across the surveyed bed at the measured level. The uncertainty is carried with the number, never dropped.
published · 95 % [0.711, 0.840] · mean of agreeing LSPIV and STIV
reference 0.636 m³/s, so +22 %. Two methods agreeing on a drifting frame is still wrong; see step i.
Chapter two · the agent refuses
The agent picks methods and parameters, but it can't publish on its own say-so. Every action passes a policy gate written in code. A gauging goes out only when the evidence in the run supports the basis the agent claims.
methods_agreeTwo independent methods agree, so the mean of the agreeing pair is published with its uncertainty.
image_quality: no_moving_tracers, glareThe surface can't be seen. The station asks for another clip instead of guessing.
camera_movedThe view no longer matches the survey. GRP pixels must be re-confirmed by a person before any gauging.
perception_failed:orthorectify:planar_grp_level_mismatchThe water level is off the surveyed plane, so the projection would be fiction.
fail_closed:timeoutAny error or timeout before a decision is saved ends in HOLD. Never a guessed number.
The gate's other words for no: methods_disagree · basis_false:bed_not_visible · basis_false:surface_not_seeded · coverage_low · valid_vectors_low · confidence_low · geometry_unverified · stabilization_residual_high · frozen_frames · bad_args:missing:reason
After each published gauging the station refits its rating curve and runs a stage nowcast. If the chance of crossing the flood threshold within three hours is at least one half, it drafts a warning and the workflow stops on a task token. Only a reviewer with the passcode can issue it; the agent has no tool for it. Unsigned drafts expire after six hours.
River Dart at Austins Bridge: river level 5000.12 m and rising 30 cm/h. Flow is forecast to reach the warning threshold of 231 m³/s (stage 5000.23 m) in about 0.4 h. Threshold source: NRFA 46003 Dart at Austins Bridge, QMED 231.2 m³/s (median annual maximum flood).
Specimen: Thalweg's nowcast and warning code replayed on the published Storm Callum stage series at noon. Live drafts wait in the review queue.
Chapter three · benchmark
The eight videos of the Video Globe Challenge 2020, from a 0.6 m³/s Norwegian brook to a 960 m³/s Australian river. Each was gauged by 15 to 23 hydrologists with their own tools. We developed on videos 1 and 8, froze the agent, then scored videos 2 to 7 once per brain. Every answer, plotted.

Australia, drone
reference 108 m³/s · 17 hydrologists

France, 3D bank camera
reference 55.2 m³/s · 18 hydrologists

Australia, drone
reference 139 m³/s · 22 hydrologists

Norway, hand-held
reference 19.7 m³/s · 23 hydrologists

France, 3D bank camera
reference 53.7 m³/s · 17 hydrologists

Australia, drone
reference 963 m³/s · 15 hydrologists

France, ground camera
reference 1.26 m³/s · 15 hydrologists
development video, not scored blind

Norway, hand-held
reference 0.636 m³/s · 23 hydrologists
development video, not scored blind
Signed error of the published discharge, and rank among the hydrologists plus our answer (1 is best). Frozen build, scored once.
On Graviton4, COOL's OpenCV build was no faster than the stock OpenCV 5 wheel for our workload: 38.9 s against 37.7 s per clip. Graviton4 itself is the saving: with the stock wheel, about 15 % per gauging against x86. The measurements.
| median of 5 | s / clip | $ / 1000 |
|---|---|---|
| c8g · COOL | 38.9 | 0.97 |
| c8g · pip OpenCV 5 | 37.7 | 0.84 |
| c7i x86 · pip | 39.7 | 0.98 |