Using deep learning to observe river levels using river cameras

By: Sarah Dance

In recent times, machine learning is being increasingly used to make sense of digital data. In environmental science, we are only at the beginning of this journey (Blair et al 2021). However, we have already found one useful application, providing us with new observations of river levels.

We have successfully investigated novel deep learning approaches to extract quantitative river level information from CCTV cameras near a river (Vetra-Carvalho et al 2020, Vandaele et al 2020).  These provide a new, inexpensive, source of river-level observations.

Unlike river gauging stations, cameras are used to observe the overall environment instead of directly measuring the water level. The cameras are placed at a distance from the water body to ensure a large field of view, so they have a higher chance of withstanding floods. Many carry back-up batteries so that they can function even if the main power supply is disrupted.

Figure 1: (left) A river camera image. (right) An automated semantic segmentation mask for the same image. Flooded pixels are shown in white and unflooded pixels in black.

Figure 1 shows an example river camera image on the left. On the right we show the results of applying a deep learning technique (automated semantic segmentation using a convolutional neural network).  The deep learning method determines which pixels correspond to flooded areas (white) and unflooded areas (in black). Using this information and some extra information about the heights of the image pixels, we are able to work out the water level from the camera image in an automated way. This method could be used to provide invaluable new source of observations for flood monitoring and forecasting, emergency response and flood risk management.


Blair, G.S., Bassett, R., Bastin, L., Beevers, L., Borrajo, M.I., Brown, M., Dance, S.L., Dionescu, A., Edwards, L., Ferrario, M.A. and Fraser, R. et al., 2021: The role of digital technologies in responding to the grand challenges of the natural environment: the Windermere Accord. Patterns, 2(1), 100156.

Vandaele, R., Dance, S.L. and Ojha, V., 2020: Automated water segmentation and river level detection on camera images using transfer learning. In: 42nd German Conference on Pattern Recognition (DAGM GCPR 2020), 28 Sep – 1 Oct 2020. (In Press)

Vetra-Carvalho, S., Dance, S.L., Mason, D.C., Waller, J.A., Cooper, E.S., Smith, P.J. and Tabeart, J.M., 2020: Collection and extraction of water level information from a digital river camera image dataset, Data in Brief, 33,106338,


This entry was posted in Climate, Flooding, Machine Learning. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *