Skip to main content
Computing, Environment and Life Sciences

Using AI for Water Level Detection

Argonne employs computer vision and machine learning to detect water level changes in real time, allowing more accurate predictions of urban flooding.

Detecting real-time water level in rivers or creeks located in urban areas is crucial to help prevent the human health risks and property damage caused by flash flooding. Devices that provide real-time detection of water levels must be cost-effective, automated, and require low maintenance. Advances in computer vision, machine learning, artificial intelligence, and edge computing allow deployment of algorithms on low-cost powerful computers right where the data are generated.

Argonne leveraged creek images to automatically detect water level changes with minimal error, correlating the results against United States Geographical Survey (USGS) data for the South Kishwaukee River in Illinois.

The creek images are collected using a downward-facing camera that is part of the Array of Things (AoT) node that collects a 96-dpi image every second, for a total of 2,580,468 images over 2 months in 2019. Argonne selected a reference image in which the water level information was pre-determined, processed collected images into day or night, and employed a template-matching algorithm to find the bridge in the images, converting them to grayscale edge-detection images and extracting the edge by applying the holistically nested edge detection (HED) algorithm. Argonne obtained a template of the bottom part of the bridge from the reference image, using it to locate the bridge in the images. By matching the template, the team obtained the water coordinates based on the pixel values’ variations within the image.

The transformation from the original image to the detection of water level change for each stage at the algorithm.

Linear regression was applied to determine the water level changes: the difference between the reference water line and the water line detected in the image. Next steps include using an object-detection algorithm to identify the bottom part of the bridge and observing changes in the location identified by the model.