RivAIr is an AI-powered Unmanned Aerial Vehicle (UAV) system designed to tackle pressing commercial, social, and environmental challenges in real-time river monitoring. Effective flood risk mitigation, water resource management, and ecosystem protection depend on accurate, timely data on river surface velocity and flow extent. Traditional methods are often computationally intensive, costly, and impractical for large or ungauged river networks, particularly during emergencies. RivAIr integrates Convolutional Neural Network (CNN) with optimized optical flow estimation to enable on-board, real-time hydrological data collection. This mobile, scalable solution supports rapid decision-making for authorities, emergency responders, and water resource managers without relying on fixed infrastructure. It enhances public safety supporting flood early warning systems and sustainable water usage in agriculture and urban planning. By offering a cost-effective, deployable alternative to conventional systems, RivAIr advances hydrological monitoring, bridging critical gaps in flood forecasting, water conservation, and environmental sustainability. It empowers data-driven river management, benefiting both local communities and global water governance efforts in the face of climate change.
The real-time workflow for river flow segmentation and surface velocity estimation in a typical scenario consists of several steps: 1. Image acquisition: UAV, initially in a standby position, is piloted to the area of interest and collects image frame pairs while hovering at predefined altitude, maintaining a proper frame acquisition rate. 2. Real-time segmentation: immediately after image frame pairs acquisition, the YOLOv8m-seg trained model performs real-time inference on the first frame to detect and segment the river flow. The segmentation quality is evaluated based on a confidence score threshold of 0.5. If the score falls below this threshold, image frame acquisition is repeated (step 1). 3. Binary mask generation: the segmented image from step 2 is converted into a binary mask. 4. Optical flow refinement: the binary mask is utilized to constrain optical flow calculations, which are then converted into m/s based on frame rate and image GSD. This conversion is directly derived from the predefined altitude in step 1 and known camera width (image and sensor width) and focal length, accounting for the minimal influence of radial distortion. The detailed velocity field is explicitly presented through the image velocimetry-derived heatmap. Complementary, the mean surface velocity is then determined by averaging the magnitudes of the vector displacements within the masked region, ensuring a representative flow estimate. 5. Live visualization: the results from steps 1–4 are transmitted via live streaming to a ground unit for real-time monitoring by a field operator. 6. Iteration: the process is started upon activation of the RivAIr module battery and is repeated continuously from step 1 until the field operator is satisfied with the results for a given area, after which the UAV is piloted to the next target location.
Field demonstrations were conducted along the 100 m length river reach (Basento river, Southern Italy). Two field operators managed the experiment: one piloting the UAV over the target area and the other monitoring real-time results streamed by the RivAIr module on a ground unit tablet (D). UAV surveys were performed capturing image frame pairs and executing the complete workflow repeatedly. Although the highest accuracy in optical flow analysis was achieved using images captured at 30 m altitude with the 13 MP camera, higher altitudes (50 m and 65 m) were also employed to ensure broader spatial coverage of the 100 m river reach, enabling a more comprehensive assessment of surface velocity distribution along the entire target area. The YOLOv8m-seg model demonstrated high confidence in river flow detection, with confidence scores of 0.92 at 30 m (A), 0.94 at 50 m (B), and 0.95 at 65 m (C). The YOLO inference on a single image frame required approximately 4.8 seconds. Optical flow analysis within the segmented region yielded mean surface velocity estimates of 0.77 m/s at 30 m (A’), 0.58 m/s at 50 m (B’), and 0.55 m/s at 65 m (C’). In all three cases, the spatial flow pattern demonstrated high consistency with the river flow motion derived from in-situ measurements. Specifically, the flow exhibited a northwest-southeast movement direction, with higher velocities observed mainly near the right riverbank. The Farneback optical flow inference on one image frame pair was completed in approximately 8 seconds. The entire on-board UAV inference cycle, including the time allocated for result visualization by field operators, was executed in less than 40 seconds. Peak resource utilization during processing was limited to 2 CPU cores, 1.75 GB RAM, and 1.76 GB VRAM. Throughout the process, the UAV reached a distance of approximately 800 m from the remote pilot, ensuring uninterrupted live streaming between the on-board module and the ground unit tablet.
Real-time river surface velocity and flow pattern monitoring offers significant advancements for a wide range of hydrological, environmental, and civil engineering applications. By enabling rapid and spatially distributed observations, RivAIr could substantially support flood forecasting and early warning systems, particularly in areas where ground-based measurements are scarce or infeasible. Real-time accurate surface velocity data could be critical for calibrating and validating hydrodynamic models and advanced statistical methodologies used to simulate or calculate flood extents and flow dynamics during extreme events, thereby enhancing community preparedness and disaster response. Moreover, monitoring flow patterns in real time would enable the early detection of zones prone to riverbank erosion, supporting the design of timely and targeted mitigation measures to protect infrastructure and ecosystems. In sediment transport studies, UAV-derived velocity fields could support understanding of sediment dynamics, deposition zones, and channel morphology changes, essential for river engineering and habitat conservation. Additionally, the real-time tracking flow patterns could facilitate the modeling of pollutant dispersion, enabling authorities to identify contamination pathways and implement corrective actions more effectively. The dual-output capability of RivAIr, geotagged spatially resolved surface velocities and a representative mean velocity estimate at each UAV location, could enable post-survey synthesis of a comprehensive velocity map over an extended river reach. By conducting a series of spatially distributed UAV hovers and aggregating the representative mean velocity values from each segment, it could be possible to enhance the mentioned applications by providing a broader spatial context and complementing the real-time capabilities. Crucially, RivAIr aims to address persistent challenges in monitoring remote, ungauged, or hazardous river reaches, filling critical data gaps and supporting more comprehensive watershed management strategies. The integration of real-time, on-board processing is central to this capability, allowing timely decision-making in the field without dependence on connectivity or post-mission workflows. This is particularly valuable in dynamic or high-risk environments, where immediate responses, such as rerouting UAV to track evolving inundation zones or identify velocity thresholds, are necessary for intelligent resource use and effective environmental management.
Reference:
La Salandra, M., Colacicco, R., Panza, S., Fumai, G., Dellino, P., & Capolongo, D. (2025). RivAIr: A custom-designed UAV-based sensor for real-time water area segmentation and surface velocity estimation. International Journal of Applied Earth Observation and Geoinformation, 142, 104720. https://doi.org/10.1016/j.jag.2025.104720