A reservoir short-pile water gauge water level detection method based on improved YOLOv11 and DeepLabV3+

By improving the collaborative application of YOLOv11 and DeepLabV3+ models, the detection accuracy and robustness issues of reservoir low-pile water gauges in complex environments have been resolved, achieving high-precision automated water level monitoring, which is suitable for real-time automatic monitoring of reservoir water levels.

CN121392853BActive Publication Date: 2026-03-24GUANGDONG HUANAN HYDROPOWER HIGH-TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-25
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately and automatically identify low-pile water gauges in complex environments, especially when multiple piles are discretely arranged, marked with characters and numbers, easily submerged, and affected by wave and light variations. This results in low detection accuracy and poor robustness, making it difficult to meet the real-time and automation requirements of smart water conservancy systems.

Method used

An improved YOLOv11 and DeepLabV3+ model is adopted, combined with a global and local preset point collaborative observation strategy. The improved YOLOv11 model is used to accurately detect the number of water gauges and character regions, and the improved DeepLabV3+ model is used for pixel-level water area segmentation. Combined with the dynamic conversion model of water level lines, high-precision water level calculation is achieved.

Benefits of technology

It significantly improves the accuracy and robustness of water level detection, can accurately identify the number of water gauges and character areas in complex environments, reduces the false recognition rate, achieves highly reliable water level monitoring, and meets the real-time automation requirements of smart water conservancy systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121392853B_ABST
    Figure CN121392853B_ABST
Patent Text Reader

Abstract

The application discloses a reservoir short-pile water gauge water level detection method based on improved YOLOv11 and DeepLabV3+, which comprises the following steps: acquiring a panoramic image of a reservoir area and a close-up image of a water gauge character; constructing an improved YOLOv11 model, introducing an RCM module and a CA module in a backbone network and a neck network part, and realizing accurate detection of the number of water gauges and the character area; optimizing a DeepLabV3+ model, replacing the main network thereof with MobileNetV3, and fusing a DenseASPP and a spatial pyramid SP module, so as to realize high-precision segmentation of a water area and a water level line; and establishing a dynamic conversion model of a pixel distance and an actual water level according to a character detection result, so as to effectively eliminate measurement errors caused by a shooting angle and lens distortion. The application significantly improves the automation degree and precision of water level recognition, and is suitable for real-time monitoring of reservoir water levels in a wide range and a multi-angle environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of hydrological measurement technology, specifically relating to a method for detecting water level in reservoirs using a low-pile water gauge based on an improved YOLOv11 and DeepLabV3+. Background Technology

[0002] As a crucial infrastructure for regulating water resources and controlling floods, the real-time and accurate monitoring of reservoir water levels directly impacts the safety of engineering operations, the optimal allocation of water resources, and the accuracy of flood forecasting and early warning. Currently, water level monitoring methods mainly include two types: contact and non-contact. While contact water level gauges, such as float-type and pressure-type gauges, are technologically mature, they suffer from problems such as easy siltation and complex installation and maintenance. Non-contact water level gauges, such as radar and ultrasonic gauges, avoid direct contact with the water body, but are still susceptible to interference from environmental factors such as wind, waves, and steam, and the equipment costs are relatively high.

[0003] Low-pile water gauges are widely deployed in reservoir water level monitoring due to their stable structure, strong impact resistance, and suitability for riverbank terrain. However, the observation of this type of water gauge still mainly relies on manual on-site interpretation, which is not only inefficient and labor-intensive, but also poses a threat to personnel safety under adverse weather conditions, making it difficult to meet the urgent needs of smart water conservancy systems for real-time data processing and automation.

[0004] In recent years, automatic water level recognition technology based on computer vision has gradually become a research hotspot. Existing image-based water level detection methods mainly include the following categories: (1) recognition methods based on template matching and feature engineering, which extract water level gauge area and scale information through edge detection, HOG and other features; (2) methods based on traditional machine learning, which utilize the features and colors of the water level gauge for customized development; (3) target detection algorithms based on deep learning, which can directly detect water level gauge characters or scale markings; (4) models based on semantic segmentation, which can achieve pixel-level segmentation of water level gauge area or water edge line.

[0005] Although the above methods have made some progress in water level identification, they are still not ideal for the discrete arrangement of multiple piles on a reservoir's low-pile water gauge, marked with " "The characteristics of characters and numbers, their susceptibility to partial submersion, and their frequent exposure to complex environments such as waves and reflections present limitations in existing technologies. Most methods are designed for continuous, upright water gauges, lacking automatic identification and multi-target association mechanisms for discrete, low-profile gauges. This leads to blurred boundaries between adjacent gauges in images and difficulty in distinguishing them at low resolutions; traditional detection models also struggle with gauges whose height is less than 5% of the total height of the water gauge." "The character perception capability is weak, resulting in a large number of missed detections and false detections; the algorithm is not adaptable enough to environmental interference such as changes in lighting, water surface fluctuations, and stains, leading to a decline in generalization performance; the semantic segmentation method is easily affected by reflections and noise at the water-land boundary, and there are deviations in water level positioning."

[0006] Therefore, there is an urgent need for an automatic water level identification method that is highly accurate and robust, adaptable to the special structure and complex environmental conditions of low-pile water gauges, in order to support the actual deployment and application of modern intelligent reservoir monitoring systems. Summary of the Invention

[0007] The main objective of this invention is to overcome the shortcomings and deficiencies of existing technologies and provide a reservoir low-pile water level detection method based on improved YOLOv11 and DeepLabV3+. By improving the preset points and network model, the image quality and detection accuracy are improved. Furthermore, a corresponding water level calculation method is formulated according to the characteristics of the water gauge, which effectively reduces water level calculation errors. This provides an effective technical solution for realizing unmanned, high-precision, and real-time automatic monitoring of reservoir water levels.

[0008] To achieve the above objectives, the present invention adopts the following technical solution:

[0009] In a first aspect, the present invention provides a method for detecting water level in reservoirs using a low-pile gauge based on improved YOLOv11 and DeepLabV3+, comprising the following steps:

[0010] Design a collaborative observation strategy for global and local preset points to acquire panoramic water gauge images and close-up images of single water gauges in the reservoir area, respectively.

[0011] An improved YOLOv11 model was constructed and trained. The improved YOLOv11 model was used to identify the number of water gauges in the panoramic water gauge image of global preset points. The close-up image of a single water gauge corresponding to the identified water gauge was called. The improved YOLOv11 model was used to identify the "E" character and number area protruding from the water surface on a single water gauge to obtain the detection box information. The improved YOLOv11 model introduces a rectangular self-calibration module (RCM) and a coordinate attention mechanism (CA) in the backbone network and neck network, respectively.

[0012] An improved DeepLabV3+ model was constructed and trained. The improved DeepLabV3+ model was used to perform pixel-level water area segmentation on a close-up image of a single water level gauge at a local preset point, extract the segmentation contour, and complete the water level line localization. The improved DeepLabV3+ model is to replace the backbone network of the DeepLabV3+ model with MobileNetV3 and integrate the DenseASPP and Spatial Pyramid SP modules.

[0013] A dynamic conversion model between pixel distance and actual water level is established based on character detection results. The current water level value is calculated by the relative position of the water level line within the character range.

[0014] As a preferred technical solution, the design of a global and local preset point collaborative observation strategy to acquire panoramic images of the reservoir area and close-up images of water gauge characters includes the following steps:

[0015] The pan-tilt control system enables a collaborative shooting mode of "global view first, close-up later" for the camera;

[0016] Set global preset points and adjust the camera frame to cover all water gauges on the dam surface to ensure that the overall water gauge distribution is visible.

[0017] Starting from the first water gauge at the top of the dam, local pre-set points are set independently for each water gauge along the slope towards the bottom of the dam. Each local pre-set point corresponds to one water gauge. The image is adjusted to clearly capture only the complete range of that water gauge.

[0018] Record the known top elevation value of a single water gauge at each local preset point as the benchmark for water level calculation.

[0019] As a preferred technical solution, the improved YOLOv11 model specifically includes:

[0020] In the backbone network of YOLOv11, RCM modules are embedded after the outputs of the second and third C3k2 modules respectively. The RCM modules extract axial context information through multi-branch horizontal and vertical rectangular convolutions and fuse and reconstruct multi-scale features through a self-calibrating weight mechanism.

[0021] RCM modules are embedded at the output of the neck network of YOLOv11 and before the three detection branches. Different receptive field information is integrated through multi-scale rectangular convolution, and a self-calibration mechanism is used to perform feature compensation and repair of the occluded area.

[0022] A CA module is embedded between the SPPF module and the C2PSA module at the end of the backbone network. By embedding coordinate information, collaborative attention calibration of spatial location and channel dimensions is achieved, and the output is a feature map weighted by the location channel.

[0023] As a preferred technical solution, the improved YOLOv11 model is trained, including the following steps:

[0024] The collected panoramic water level gauge images and single water level gauge close-up images are preprocessed to simulate different weather and lighting conditions.

[0025] Each water gauge in the global preset point panoramic water gauge image is bounded by a bounding box, and the label is uniformly set to "water_gauge";

[0026] Fine-tune the water gauge character regions in close-up images of single water gauges at local preset points: distinguish " The orientation of the characters is marked as "right_e" for right and "left_e" for left, and the numbers on the water gauge that are exposed above the water surface are marked as "0" to "9" according to their actual characters;

[0027] The labeled image information is converted into a YOLO format txt file, with each line containing the category label and the normalized bounding box coordinates, resulting in a labeled dataset, which is then divided into training, validation and test sets according to a set ratio;

[0028] Based on the training set, a transfer learning strategy is used to load pre-trained weights and freeze some of the underlying network parameters for fine-tuning training.

[0029] During training, an optimizer is used to adaptively adjust the learning rate and monitor changes in validation set accuracy to prevent overfitting.

[0030] Ultimately, the model weights with the highest mAP values ​​for water level positioning and character recognition on the test set were retained for the water level recognition task.

[0031] As a preferred technical solution, the improved DeepLabV3+ model is specifically as follows:

[0032] In the encoder, the original backbone network Xception is replaced with the lightweight MobileNetV3, which receives input RGB images in the format [B,3,H,W], where B is the batch size, H and W are the image height and width, and outputs multi-scale intermediate feature maps.

[0033] The ASPP module in the original network is replaced with DenseASPP. The high-level feature map output by MobileNetV3 is used as input. Multi-scale contextual information is captured through densely connected multi-rate dilated convolutional layers, and the output is an enhanced tensor fused with dense features.

[0034] In DenseASPP, a strip pooling spatial pyramid module is introduced to process contextual information in both vertical and horizontal directions, thereby enhancing the feature extraction capability of long strip structures at the edge of the waterline.

[0035] As a preferred technical solution, the improved DeepLabV3+ model is trained, including the following steps:

[0036] The water area in the close-up image of a single water gauge at a local preset point is segmented and labeled at the pixel level. The water area in the image is uniformly labeled as "water" and a corresponding segmentation label mask is generated.

[0037] Data augmentation operations, including standardization, random cropping, and color dithering, are performed on the training images.

[0038] The model is initialized with pre-trained weights, and convergence is monitored through the performance of the validation set. The model with the highest segmentation mIoU index is retained for the water area identification task.

[0039] As a preferred technical solution, the extraction and segmentation of the contour and the positioning of the water level line include the following steps:

[0040] Contour extraction is performed on the binary segmentation results output by the improved DeepLabV3+ model to obtain pixel-level boundary contours of the water area;

[0041] A smoothing filter algorithm is used to optimize the contour, eliminating the jagged edges caused by image noise or segmentation errors, and obtaining a continuous and smooth water boundary.

[0042] Based on the known position of the water gauge in the image, the arc-shaped section that intersects with the bottom of the water gauge column is selected from the complete water area outline. This arc-shaped section is the actual water level line formed by the intersection of the water gauge and the water surface.

[0043] Record the water level line point set on the arc-shaped profile.

[0044] As a preferred technical solution, the step of establishing a dynamic conversion model between pixel distance and actual water level based on character detection results, and calculating the current water level value through the relative position of the water level line within the character range, includes the following steps:

[0045] The coordinates of the feature points of the identified "E" characters with the same orientation are fitted with a vertical line to obtain the fitted vertical line;

[0046] Find the point in the set of water level line points that is closest to the fitted vertical line and use it as the reference point for the water level line.

[0047] Calculate the pixel distance between the last two consecutive "E" characters in the same direction, and convert the pixel equivalent K based on the actual physical distance;

[0048] Calculate the pixel distance between the last "E" character and the waterline reference point, and convert the last "E" character to its pixel equivalent K. "Actual distance from the character to the water surface" ;

[0049] Combined with the top elevation value of the water gauge 1. Identify the nearest numeric value M to the bottommost "E" character and the actual height of the "E" character. Calculate the current water level. The calculation formula is: .

[0050] As a preferred technical solution, the identification of the same orientation " Fitting the coordinates of the bottom right corner of the character includes the following steps:

[0051] Based on the identification of a single water gauge "After the character, record" "Coordinates of the four corner points of the character detection box;"

[0052] If the bottom "E" character is positive, select all positive "E" characters. The coordinates of the lower right corner of the character are used as the feature point set; if " The character is reversed, so the coordinates of the lower left corner of all reversed "E" characters are selected as the feature point set;

[0053] The least squares method is used to fit a perpendicular line to the feature point set to obtain the equation of the perpendicular line.

[0054] As a preferred technical solution, the pixel equivalent K is calculated by dividing the actual physical distance by the pixel distance between the last two consecutive "E" characters in the same direction.

[0055] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0056] 1. This invention effectively solves the problem of model boundary box misjudgment caused by densely arranged short-pile water gauges by designing a global and local pre-set point collaborative observation strategy. Especially in low-resolution images, the feature discrimination of adjacent water gauges is reduced, and local observation can better ensure the clarity of water gauge surface information and effectively deal with the discrete distribution characteristics of short-pile water gauges.

[0057] 2. This invention improves the YOLOv11 model by combining the Rectangular Self-calibration Module (RCM) and the Coordinate Attention Mechanism (CA), significantly enhancing the accuracy and robustness of water level gauge detection. The RCM module, through multi-branch rectangular convolution and the self-calibration mechanism, strengthens the feature extraction capability for the elongated shape and edge structure of the water level gauge, effectively mitigating interference from occlusion, deformation, and scale changes. The CA module, by embedding coordinate information, enhances the model's spatial perception capability, accurately distinguishing between actual water level gauge characters and water surface reflections, significantly reducing the false recognition rate. The improved model can still achieve high-precision detection of the number of water level gauges, characters, and numerical regions even in complex natural environments.

[0058] 3. This invention performs synergistic optimization of the DeepLabV3+ model in terms of lightweighting and multi-scale perception capabilities. By replacing the backbone network with MobileNetV3, the computational intensity is significantly reduced while maintaining segmentation accuracy. The integration of DenseASPP and strip pooling spatial pyramid (SP) modules enhances the model's ability to perceive water features at different scales and preserve details of water level edges, achieving high-precision water segmentation and water level localization, and effectively overcoming the influence of interference factors such as water surface reflection and waves.

[0059] 4. This invention integrates multi-source information in water level calculation, achieving highly reliable and accurate water level elevation calculation. By combining the principle of monocular vision measurement with the known elevation benchmark of the water gauge, spatial mapping and elevation calculation are performed based on the extracted water level line contour point sequence. This effectively suppresses measurement errors caused by factors such as image distortion and shooting angle, ensuring the accuracy and reliability of water level monitoring results and meeting the needs of practical engineering applications. Attached Figure Description

[0060] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0061] Figure 1 This is a flowchart of the reservoir low-pile water level detection method based on the improved YOLOv11 and DeepLabV3+ according to an embodiment of the present invention.

[0062] Figure 2 This is an architecture diagram of the improved YOLOv11 model according to an embodiment of the present invention;

[0063] Figure 3 This is a structural diagram of the RCM according to an embodiment of the present invention;

[0064] Figure 4 This is a diagram of the CA structure according to an embodiment of the present invention;

[0065] Figure 5 This is an architecture diagram of the improved DeepLabV3+ model according to an embodiment of the present invention;

[0066] Figure 6 This is a structural diagram of DenseASPP-SP according to an embodiment of the present invention. Detailed Implementation

[0067] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0068] The technical concept of this invention is as follows: A global and local preset point collaborative observation strategy is designed to ensure the clarity of water level information in video images; an improved YOLOv11 model is constructed, introducing a rectangular self-calibration module (RCM) and a coordinate attention mechanism (CA) in the backbone and neck networks to achieve accurate detection of the number of water level gauges and character regions; the DeepLabV3+ model is optimized by replacing its backbone network with MobileNetV3 and integrating DenseASPP and spatial pyramid (SP) modules to achieve high-precision segmentation of water areas and water levels; a dynamic conversion model between pixel distance and actual water level is established based on character detection results, calculating the current water level value through the relative position of the water level line within the character range.

[0069] like Figure 1 As shown, this embodiment discloses a method for detecting reservoir water levels using a low-pile gauge based on improved YOLOv11 and DeepLabV3+, including the following steps:

[0070] S1. Before detecting the water level using the water gauge, some preliminary preparations need to be made for the camera equipment, and a global and local preset point collaborative observation strategy needs to be designed to acquire panoramic water gauge images of the reservoir area and close-up images of a single water gauge. The specific operations are as follows:

[0071] S11. Select a rotatable monitoring device with preset points, adjust the installation position of the monitoring device until the monitoring video frame can completely display the low-lying water gauge on the reservoir or slope in the camera's video frame, and install the monitoring device.

[0072] S12. Set preset points on the camera and use the gimbal control system to achieve a collaborative shooting mode of "global first, close-up later".

[0073] S13, Set global preset point By adjusting the camera's field of view to cover all water gauges on the dam surface, the overall distribution of water gauges is made visible, which is used for the overall identification and positioning of the number of water gauges.

[0074] S14. To avoid interference from other objects, starting from the first water gauge at the top of the dam, local pre-set points are independently set for each water gauge along the slope towards the bottom of the dam. Ensure that each preset point corresponds to only one water gauge, and adjust the image frame to clearly capture only the complete range of that water gauge.

[0075] S15. Record the known top elevation value of each water gauge corresponding to the single water gauge image taken at each local preset point. This serves as the benchmark for water level calculation.

[0076] S2. Construct and train an improved YOLOv11 model. Use the improved YOLOv11 model to identify the number of water gauges in the panoramic water gauge image of the global preset points. Call up the close-up image of a single water gauge corresponding to the identified water gauge in the local preset point. Use the improved YOLOv11 model to identify the "E" character and number area that protrudes from the water surface on a single water gauge to obtain the detection box information.

[0077] Furthermore, the aforementioned Figure 2 As shown, the improved YOLOv11 model embeds the first RCM module immediately after the output of the second C3k2 module in the backbone network of the original network, and similarly embeds the second RCM module after the output of the third C3k2 module. The RCM module takes the multidimensional feature tensor output by the previous C3k2 module as input, and its dimension is... ,in For batch size, For the number of channels, and The height and width of the feature map are defined by these dimensions. Axial contextual information is extracted through multi-branch horizontal and vertical rectangular convolutions within the map, and multi-scale features are fused and reconstructed via a self-calibrating weight mechanism. This effectively enhances the edge structure and longitudinal morphological features of the water level gauge, improves the model's ability to identify mesoscale water level gauge targets, and alleviates the problem of feature blurring and loss caused by uneven imaging illumination and scale variations.

[0078] After multi-scale feature fusion is completed in the neck network of the original network, RCM modules are embedded at its output and before the three subsequent detection branches. Each RCM module takes the fused feature map output from the corresponding level of the neck as input, integrates information from different receptive fields through multi-scale rectangular convolution, and uses a self-calibration mechanism to perform feature compensation and repair on occluded areas (such as floating objects and silt occlusion), improving the contour inference and complete recognition performance of the detection branches for abnormalities such as water gauge defects and deformations. The RCM network structure is as follows: Figure 3 As shown.

[0079] The CA module is embedded at the end of the original network's backbone, located between the SPPF module and the C2PSA module, such as... Figure 4 As shown, the CA module takes the feature tensor containing global context information output by the SPPF module as input, and achieves collaborative attention calibration of spatial position and channel dimension by embedding coordinate information, thereby enhancing the sensitivity to vertical spatial differences. The output is a feature map weighted by position channel, which effectively distinguishes targets with similar features but different vertical positions, such as the actual water gauge character and its reflection on the water surface, suppresses symmetry misidentification, and improves the robustness and accuracy of the model in complex water surface scenarios.

[0080] Furthermore, the improved YOLOv11 model is trained as follows:

[0081] S21. Collect data under different times and lighting conditions. and The image data consists of panoramic water level gauge images and close-up video images of a single water level gauge, taken separately, combined with a public dataset.

[0082] S22. Perform standardized preprocessing on the images, including resizing and normalization, and augment the samples using data augmentation methods, such as rotation, brightness adjustment, and adding noise to simulate different weather and lighting conditions.

[0083] S23, Global preset points Each water gauge in the image is bounded by a bounding box, and the label is uniformly set to "water_gauge".

[0084] S24. Local preset points Fine-tune the water gauge character area in the image: distinguish " The orientation of the characters is marked as "right_e" for right and "left_e" for left, and the numbers on the water gauge that are exposed above the water surface are marked as "0" to "9" according to their actual characters.

[0085] S25. The annotation file is a YOLO format txt file, with each line containing the category identifier and the normalized bounding box coordinates.

[0086] S26. Divide the labeled dataset into training set, validation set and test set according to the proportion.

[0087] S27. Use a transfer learning strategy, load pre-trained weights, freeze some of the underlying network parameters, and fine-tune the training.

[0088] S28. During training, an optimizer is used to adaptively adjust the learning rate, monitor changes in the accuracy of the validation set, and stop training early to prevent overfitting. Finally, the model weights with the highest mAP values ​​for water level positioning and character recognition on the test set are retained for the water level recognition task.

[0089] S3. Construct and train an improved DeepLabV3+ model. Use the improved DeepLabV3+ model to perform pixel-level water area segmentation on a close-up image of a single water level gauge at a local preset point, extract the segmentation contour, and complete the water level line localization.

[0090] Furthermore, building an improved DeepLabV3+ model includes:

[0091] like Figure 5As shown, the original Xception in the backbone network is replaced with the lightweight MobileNetV3. Specifically, in the encoder, the original Xception in the backbone network is replaced with the lightweight MobileNetV3. It receives input RGB images of size [B, 3, H, W], where B is the batch size, and H and W are the image height and width. The output is a multi-scale intermediate feature map, significantly improving the model's inference speed while maintaining high accuracy.

[0092] like Figure 6 As shown, the ASPP module in the original network is replaced by DenseASPP. Specifically, the ASPP module in the original network is replaced by DenseASPP, and the high-level feature maps output by MobileNetV3 are used as input. Multi-scale contextual information is captured through densely connected multi-rate dilated convolutional layers, and the output is an enhanced tensor fused with dense features, which significantly improves the model's ability to perceive water features at different scales.

[0093] Furthermore, DenseASPP introduces a strip pooling spatial pyramid module, which enhances the feature extraction capability for long strip structures such as the edge of the water level by processing context information in the vertical and horizontal directions.

[0094] Furthermore, the improved DeepLabV3+ model is trained, specifically including:

[0095] S31, collect The images captured by the camera frame, combined with public datasets, form image data, and data augmentation operations such as standardization, random cropping, and color dithering are performed.

[0096] S32, Local preset points The water areas in the image are segmented and labeled at the pixel level. The water areas in the image are uniformly labeled as "water" and a corresponding segmentation label mask is generated.

[0097] S33. Perform data augmentation operations such as standardization, random cropping, and color dithering on training images to improve the model's generalization ability;

[0098] S34. During training, pre-trained weights are used for initialization, and model convergence is monitored through validation set performance. Finally, the model with the highest segmentation mIoU index is retained for the water area identification task.

[0099] Furthermore, the extraction and segmentation of the contour and the completion of water level line positioning specifically involves:

[0100] S35. Extract the contours from the binary segmentation results output by the improved DeepLabV3+ model to obtain the pixel-level boundary contours of the water area.

[0101] S36. A smoothing filtering algorithm is used to optimize the contour, eliminating the jagged edges caused by image noise or segmentation error, and obtaining a continuous and smooth water boundary.

[0102] S37. Based on the known position of the water gauge in the image, select the section that intersects with the bottom of the water gauge column from the complete water area outline. This section has an arc-shaped geometric feature, which is the actual water level line formed by the intersection of the water gauge and the water surface.

[0103] S38. Record the water level line point set on the arc contour.

[0104] S4. Based on the character detection results, establish a dynamic conversion model between pixel distance and actual water level. Calculate the current water level value by the relative position of the water level line within the character range. This includes the following steps:

[0105] S41. Once the preset points of the monitoring equipment and the top elevation of the water gauge are set, and the detection and segmentation models are trained, the task of detecting the water level of the low-pile water gauge on the dam slope can begin, as detailed below:

[0106] S411, First call the global preset point Extract the video frame image at the current moment from the video frame size. .

[0107] S412. Use the improved YOLOv11 model trained in step S2 to process the image. Perform water gauge count identification, assuming the identified... The image contains The water gauge is located at a local pre-set point. Calling the first Local pre-set points of the water gauge And extract the current time. Video frames in the frame .

[0108] S413. Again, use the improved YOLOv11 model trained in step S2 to process the image. Perform character recognition on the surface of the water gauge, recognizing the characters on the surface of the water gauge. "Characters and numbers are used to obtain the coordinates and category information of the detection box."

[0109] S414. Simultaneously, the improved DeepLabV3+ model trained in step S3 is used to process the image. Water area segmentation is performed to obtain binary segmentation results of the water area. Then, contour extraction is performed on the results to obtain pixel-level boundary contours of the water area.

[0110] S42. The water area contour obtained in step S41 is optimized using a smoothing filtering algorithm to eliminate jagged edges caused by image noise or segmentation errors, resulting in a continuous and smooth water area boundary. Specifically, this includes:

[0111] S421. Based on the known position of the water gauge in the image, select the section that intersects with the bottom of the water gauge column from the complete water area outline. This section has an arc-shaped geometric feature, which is the actual water level line formed by the intersection of the water gauge and the water surface.

[0112] S422. Record the water level point set on the arc-shaped contour. .

[0113] S43. Obtain the "" of the water gauge surface from step S41. After obtaining the coordinate information of the detection box for the character, let the recognized first character be... indivual" The coordinates of the four corner points of the detection box for the character are: ,in , representing the top left, top right, bottom left, and bottom right corners respectively; , is from bottom to top (from the water surface to the top of the water gauge) " Character sequence number.

[0114] To standardize the calculation benchmark, feature points for fitting the vertical line need to be determined: if the lowest point (closest to the water surface) is the " If the character is positive, then select all positive characters. The bottom right corner of the character detection box As a set of feature points. If the bottom " If the characters are reversed, then select all reversed characters. The bottom left corner of the character detection box As a set of feature points;

[0115] With positive " Taking the character as an example, for all positive characters... The bottom right pixel coordinates of the character are fitted with a vertical line using the least squares method. The goal is to minimize the sum of the horizontal distance deviations from all points to the fitted line. Let the equation of the fitted vertical line be... as follows:

[0116] ;

[0117] The objective function of the least squares method is as follows:

[0118] ;

[0119] When the above objective function reaches its minimum value, the parameters of its fitted vertical line are obtained. and Thus, we obtain the same direction " "The fitted straight line at the lower left corner of the character detection box."

[0120] S44. Find the water level point set obtained in step S42. To fit the perpendicular equation The closest point is the intersection of the vertical line from the center of the water gauge and the actual water level line. This point is designated as the reference point for water level calculation.

[0121] dot set to the straight line distance as follows:

[0122] ;

[0123] Water level reference point The following conditions must be met:

[0124] ;

[0125] S45, two consecutive unidirectional water gauges on normal low-stakes piles The actual physical distance between characters is a fixed value. Find the last two in the same direction. "Pixel coordinates of the lower right corner of the character detection box" and ;

[0126] Calculate the pixel equivalent in the vertical direction (meters / pixels) as follows:

[0127] ;

[0128] S46, Calculate the reference point for the water level line. With the bottom " The bottom right corner coordinates of the character (j=1) Pixel distance in the vertical direction ,as follows:

[0129] ;

[0130] S47. Based on the obtained pixel equivalent , pixel distance Convert to actual physical distance That is, the last " The distance from the character to the water surface is as follows:

[0131] ;

[0132] S48. Identify all the numbers on the water gauge surface and their corresponding coordinate positions from step S41, using the position closest to the water surface as the coordinate. Starting with the character, find the recognized numeric value that is closest to the water surface. ;

[0133] The top elevation of the water gauge was recorded in step S1. .

[0134] Let a “ The height of the character is It can verify and calculate the current water level value. as follows:

[0135] .

[0136] This embodiment is based on an improved YOLOv11 and DeepLabV3+ method for detecting reservoir low-pile water gauges. It employs a "global-first, close-up-later" collaborative observation strategy with global and local preset points to acquire clear images. The YOLOv11 model incorporates a rectangular self-calibration module (RCM) and a coordinate attention mechanism (CA) to accurately detect the number of water gauges and character regions. The DeepLabV3+ model replaces its backbone network with MobileNetV3 and integrates DenseASPP and spatial pyramid (SP) modules to achieve high-precision segmentation of the water area and water level line. Finally, a dynamic conversion model between pixel distance and actual water level is established to calculate the current water level value. This effectively solves the problems of low accuracy and poor robustness in low-pile water gauge detection under complex environments in existing technologies, improving the automation and accuracy of water level monitoring. It is suitable for large-scale, multi-view real-time reservoir water level monitoring scenarios.

[0137] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0138] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0139] The above embodiments are preferred embodiments of the present invention, but the embodiments of the present invention are not limited to the above embodiments. Any changes, modifications, substitutions, combinations, or simplifications made without departing from the spirit and principle of the present invention shall be considered equivalent substitutions and shall be included within the protection scope of the present invention.

Claims

1. A method for detecting reservoir water levels using a low-pile gauge based on improved YOLOv11 and DeepLabV3+, characterized in that, Includes the following steps: Design a collaborative observation strategy for global and local preset points to acquire panoramic water gauge images and close-up images of single water gauges in the reservoir area, respectively. An improved YOLOv11 model was constructed and trained. The improved YOLOv11 model was used to identify the number of water gauges in the panoramic water gauge image of global preset points. The close-up image of a single water gauge corresponding to the identified water gauge was called. The improved YOLOv11 model was used to identify the "E" character and number area protruding from the water surface on a single water gauge to obtain the detection box information. The improved YOLOv11 model introduces a rectangular self-calibration module (RCM) and a coordinate attention mechanism (CA) in the backbone network and neck network, respectively. An improved DeepLabV3+ model was constructed and trained. The improved DeepLabV3+ model was used to perform pixel-level water area segmentation on a close-up image of a single water level gauge at a local preset point, extract the segmentation contour, and complete the water level line localization. The improved DeepLabV3+ model is to replace the backbone network of the DeepLabV3+ model with MobileNetV3 and integrate the DenseASPP and Spatial Pyramid SP modules. A dynamic conversion model between pixel distance and actual water level is established based on character detection results. The current water level value is calculated by the relative position of the water level line within the character range, including the following steps: The coordinates of the feature points of the identified "E" characters with the same orientation are fitted with a vertical line to obtain the fitted vertical line. Find the point in the set of water level line points that is closest to the fitted vertical line and use it as the reference point for the water level line. Calculate the pixel distance between the last two consecutive "E" characters in the same direction, and convert the pixel equivalent K based on the actual physical distance; Calculate the pixel distance between the last "E" character and the waterline reference point, and convert the last "E" character to its pixel equivalent K. "Actual distance from the character to the water surface" ; Combined with the top elevation value of the water gauge Identify the nearest numeric value M to the bottom "E" character and the actual height of the "E" character. Calculate the current water level. The calculation formula is: ; The improved YOLOv11 model is as follows: In the backbone network of YOLOv11, RCM modules are embedded after the outputs of the second and third C3k2 modules respectively. The RCM modules extract axial context information through multi-branch horizontal and vertical rectangular convolutions and fuse and reconstruct multi-scale features through a self-calibrating weight mechanism. RCM modules are embedded at the output of the neck network of YOLOv11 and before the three detection branches. Different receptive field information is integrated through multi-scale rectangular convolution, and a self-calibration mechanism is used to perform feature compensation and repair of the occluded area. A CA module is embedded between the SPPF module and the C2PSA module at the end of the backbone network. By embedding coordinate information, collaborative attention calibration of spatial location and channel dimensions is achieved, and the output is a feature map weighted by the location channel.

2. The method for reservoir low-pile water level detection based on improved YOLOv11 and DeepLabV3+ according to claim 1, characterized in that, The proposed global and local pre-set point collaborative observation strategy acquires panoramic images of the reservoir area and close-up images of water level gauge characters, including the following steps: The pan-tilt control system enables a collaborative shooting mode of "global view first, close-up later" for the camera; Set global preset points and adjust the camera frame to cover all water gauges on the dam surface to ensure that the overall water gauge distribution is visible. Starting from the first water gauge at the top of the dam, local pre-set points are set independently for each water gauge along the slope towards the bottom of the dam. Each local pre-set point corresponds to one water gauge. The image is adjusted to clearly capture only the complete range of that water gauge. Record the known top elevation value of a single water gauge at each local preset point as the benchmark for water level calculation.

3. The method for reservoir low-pile water level detection based on improved YOLOv11 and DeepLabV3+ according to claim 1, characterized in that, Training the improved YOLOv11 model includes the following steps: The collected panoramic water level gauge images and single water level gauge close-up images are preprocessed to simulate different weather and lighting conditions. Each water gauge in the global preset point panoramic water gauge image is bounded by a bounding box, and the label is uniformly set to "water_gauge"; Fine-tune the water gauge character regions in close-up images of single water gauges at local preset points: distinguish " The orientation of the characters is marked as "right_e" for right and "left_e" for left, and the numbers on the water gauge that are exposed above the water surface are marked as "0" to "9" according to their actual characters; The labeled image information is converted into a YOLO format txt file, with each line containing the category label and the normalized bounding box coordinates, resulting in a labeled dataset, which is then divided into training, validation and test sets according to a set ratio; Based on the training set, a transfer learning strategy is used to load pre-trained weights and freeze some of the underlying network parameters for fine-tuning training. During training, an optimizer is used to adaptively adjust the learning rate and monitor changes in validation set accuracy to prevent overfitting. Ultimately, the model weights with the highest mAP values ​​for water level positioning and character recognition on the test set were retained for the water level recognition task.

4. The method for reservoir low-pile water level detection based on improved YOLOv11 and DeepLabV3+ according to claim 1, characterized in that, The improved DeepLabV3+ model is specifically as follows: In the encoder, the original backbone network Xception is replaced with the lightweight MobileNetV3, which receives input RGB images in the format [B,3,H,W], where B is the batch size, H and W are the image height and width, and outputs multi-scale intermediate feature maps. The ASPP module in the original network is replaced with DenseASPP. The high-level feature map output by MobileNetV3 is used as input. Multi-scale contextual information is captured through densely connected multi-rate dilated convolutional layers, and the output is an enhanced tensor fused with dense features. In DenseASPP, a strip pooling spatial pyramid module is introduced to process contextual information in both vertical and horizontal directions, thereby enhancing the feature extraction capability of long strip structures at the edge of the waterline.

5. The method for reservoir low-pile water level detection based on improved YOLOv11 and DeepLabV3+ according to claim 1, characterized in that, Training the improved DeepLabV3+ model includes the following steps: The water area in the close-up image of a single water gauge at a local preset point is segmented and labeled at the pixel level. The water area in the image is uniformly labeled as "water" category, and the corresponding segmentation label mask is generated. Data augmentation operations, including standardization, random cropping, and color dithering, are performed on the training images. The model is initialized with pre-trained weights, and convergence is monitored through the performance of the validation set. The model with the highest segmentation mIoU index is retained for the water area identification task.

6. The method for reservoir low-pile water level detection based on improved YOLOv11 and DeepLabV3+ according to claim 1, characterized in that, The extraction and segmentation of the contour and the positioning of the waterline include the following steps: Contour extraction is performed on the binary segmentation results output by the improved DeepLabV3+ model to obtain pixel-level boundary contours of the water area; A smoothing filter algorithm is used to optimize the contour, eliminating the jagged edges caused by image noise or segmentation errors, and obtaining a continuous and smooth water boundary. Based on the known position of the water gauge in the image, the arc-shaped section that intersects with the bottom of the water gauge column is selected from the complete water area outline. This arc-shaped section is the actual water level line formed by the intersection of the water gauge and the water surface. Record the water level line point set on the arc-shaped profile.

7. The method for reservoir low-pile water level detection based on improved YOLOv11 and DeepLabV3+ according to claim 1, characterized in that, The same orientation identified Fitting the coordinates of the bottom right corner of the character includes the following steps: Based on the identification of a single water gauge "After the character, record" "Coordinates of the four corner points of the character detection box;" If the bottom "E" character is positive, select all positive characters. The coordinates of the lower right corner of the character are used as the feature point set; if... The character is reversed, so the coordinates of the lower left corner of all reversed "E" characters are selected as the feature point set; The least squares method is used to fit a perpendicular line to the feature point set to obtain the equation of the perpendicular line.

8. The method for reservoir low-pile water level detection based on improved YOLOv11 and DeepLabV3+ according to claim 1, characterized in that, The pixel equivalent K is calculated by dividing the actual physical distance by the pixel distance between the last two consecutive "E" characters in the same direction.

Citation Information

Patent Citations

  • Method and device for improving water gauge water level identification response speed and storage medium

    CN116883808A

  • Water body segmentation method and system based on SAR remote sensing image

    CN118334347A