-
-
Daytime flood on the main camera: USGS gauge 33.8 cm, FloodCam 33.7 cm (held-out estimate, selected example).
-
Infrared night frame: USGS gauge 8.8 cm, FloodCam 9.0 cm (held-out estimate, selected example).
-
Pipeline: locate the staff plate, rectify it, classify each row as wet or dry, decode the water level, and gate poor-quality frames.
-
Successes, rejected frames and failures across conditions and cameras, including cameras held out of training.
-
Locked test month, April 2025: FloodCam and a colour-threshold baseline compared against the USGS gauge.
-
Error vs image resolution on the main camera: MAE stays below twice its native value up to about 5 cm per pixel.
-
Camera estimate vs USGS gauge height under leave-one-month-out cross-validation, for frames passing the quality gate. Outliers remain.
-
Results summary: event tracking, cross-validation, a river flood on a second camera, and the effect of resolution.
Inspiration
Fixed cameras already watch gauges. We asked two questions: how accurately can such a camera estimate shallow flood depth, and does that accuracy carry over to other cameras?
What it does
FloodCam estimates water depth from a fixed camera that sees a staff plate (a gauge marked in centimetres). It returns a water level, or abstains when image quality is too poor.
How we built it
- Register each frame to align the camera view.
- Rectify the staff plate into a straight strip.
- Classify each row of the plate as submerged or dry.
- Decode the water level from the row classifications.
- Gate poor frames so the system abstains instead of guessing.
We used footage from real USGS gauge cameras, with official gauge heights as ground truth.
Results
Main camera, 2,259 frames over 15 months:
| Evaluation | Frames scored | FloodCam MAE | Colour-threshold baseline | Always 0 cm |
|---|---|---|---|---|
| Leave-one-month-out CV | 1,319 | 1.13 cm | 6.97 cm | 8.8 cm |
| Locked test months | 233 | 0.79 cm | 11.52 cm | 18.9 cm |
- The quality gate passes 67% of CV frames and 82% of locked test frames.
- Error stays below twice its native value up to a resolution of 5.0 cm per pixel.
- On one river camera, FloodCam read a 211 cm flood to within 12 cm.
Challenges
- Poor frames: without the gate, error rises to 3.38 cm in CV and 3.11 cm on the locked months.
- Generalization: on three other cameras, each held out of training, FloodCam beat a no-water guess on two and failed on one.
What we learned
Knowing when to abstain matters as much as reading the water level. Accuracy on one camera does not guarantee accuracy on another.
Impact
Floods endanger people, property and roads, and decisions during a flood depend on knowing how deep the water is. FloodCam explores how a fixed camera and a simple staff gauge can provide that measurement remotely, without anyone having to approach the water. On its main camera, it achieved a mean absolute error of 1.13 cm in cross-validation on the 67% of frames that passed its quality gate, and it rejects poor-quality frames to reduce unreliable readings. Such readings could help local authorities and communities monitor low-lying roads, underpasses and drainage channels where a gauge and camera can be installed. FloodCam is a research prototype, not a deployed warning system: it has not yet been shown to transfer reliably to new cameras without local labelled data. Its contribution is a tested, open starting point for camera-based flood monitoring that is explicit about where it works and where it fails.
What's next
- Improve performance on unseen cameras.
- Reduce the share of rejected frames without losing accuracy.
- Test on more cameras and more flood events.
Built With
- altair
- computer-vision
- css
- github
- github-actions
- gradient-boosting
- html
- javascript
- jekyll
- joblib
- latex
- machine-learning
- matplotlib
- numpy
- opencv
- pandas
- pillow
- pytest
- python
- pyyaml
- ruff
- scikit-learn
- sift
- streamlit
