High-efficiency water gauge water level real-time identification and calculation method capable of resisting complex environment interference

Through deep learning algorithms with multimodal fusion and space-time feature enhancement, the problems of large errors and poor real-time performance of water level calculation in complex environments are solved, and high accuracy and efficient water level recognition are achieved, which is suitable for edge computing devices.

CN120580709APending Publication Date: 2025-09-02XIAN CENTN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511008068.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-09-02

AI Technical Summary

Technical Problem

The water level calculation of the prior art scale in complex environments has problems such as large errors, poor real-time performance, weak anti-interference ability, and difficult to deploy on edge computing devices.

Method used

Deep learning algorithms using multimodal fusion and spatiotemporal feature enhancement, including multimodal fusion of spectrum feature compensation, timing consistency modeling, surface recognition and neural network regression, to build lightweight models to improve computational accuracy and real-time performance.

Benefits of technology

It realizes high accuracy and timeliness calculation of water level values ​​in complex environments, which is convenient for deployment on edge computing devices, reduces manpower and material consumption, and adapts to a variety of complex conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120580709A_ABST
    Figure CN120580709A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of hydrologic monitoring in the water conservancy industry, and relates to an efficient water gauge water level real-time identification and calculation method capable of resisting complex environment interference, which comprises the following steps of: 1, training a fusion model by adopting a multi-modal fusion algorithm SFCN-CMFN for frequency spectrum characteristic compensation; 2, the position of the water surface is recognized on the basis of an optimized OfficientViT-Seg model; 3, in combination with a sliding window and a lightweight ConvGRU network, training a time sequence consistency model LTCM; 4, a two-stage detection algorithm and a Blender simulation algorithm are utilized to obtain the water gauge image, the pixel difference between the upper boundary and the lower boundary of the water gauge and the corresponding physical height of the water gauge; 5, training a regression model on the basis of ResNet50-MLP-Regression (ResNet50-MLP-Regression); and 6, inputting a water gauge image and a pixel difference, performing model reasoning, and outputting an actual water level value. The method is not affected by complex conditions such as water surface illumination, inverted images and water gauge characters at the intersection of the water gauge and the water surface are covered by sludge, a virtual water gauge does not need to be constructed on a river bank, operation is easy, manpower and material resources are saved, and universality is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of hydrological monitoring in the water conservancy industry, and particularly relates to a high-efficiency water gauge real-time recognition and calculation method that is resistant to interference from complex environments. Background Art

[0002] Currently, the smart water conservancy industry uses computer vision-based methods to calculate water gauge levels in rivers and canals. For physical water gauge level calculation, traditional image segmentation, character scale recognition, and water gauge position recognition are used on visible light images. This method is susceptible to complex conditions such as water surface illumination, reflections, nighttime, and mud covering the water gauge characters at the intersection of the water gauge and the water surface, resulting in significant errors in water gauge level calculation. For wide rivers with a physical water gauge in the middle, if the scale on the gauge cannot be recognized, the water gauge level value cannot be identified. For virtual water gauge level calculation, traditional image segmentation methods are used to segment the water surface on visible light images, and a virtual water gauge is constructed by setting calibration points on the riverbank. This method requires camera calibration and the construction of a virtual water gauge on the riverbank. This is complex, labor-intensive, and environmentally demanding, resulting in large fluctuations in recognition results and demanding operating conditions.

[0003] When it comes to recognizing physical water gauge scale characters, some methods rely on target detection algorithms, performing multi-target detection on the 10 categories (0 to 9) on the water gauge, resulting in significant errors. Other methods rely on target detection algorithms to recognize the "E" character on the water gauge. Since the "E" character has two representations, one facing left and the other facing right, this can lead to significant recognition errors. Furthermore, converting the recognized "E" character to a specific scale value takes time, impacting the real-time performance of water gauge level calculations.

[0004] Existing technologies use conventional image segmentation algorithms instead of real-time ones, which impacts the real-time performance of water gauge and water level calculations and makes them difficult to deploy on edge computing devices. Current computer vision-based real-time water gauge and water level recognition and calculation methods suffer from inability to adapt to complex environments, weak resistance to external interference, limited real-time performance on edge gateways, and low accuracy.

[0005] Therefore, an efficient real-time water level identification and calculation method that can resist interference from complex environments is needed to solve the above technical problems. Summary of the Invention

[0006] This invention aims to provide an efficient, real-time water gauge and water level identification and calculation method that is resistant to interference from complex environments. This highly reliable method utilizes multimodal fusion and spatiotemporal feature enhancement. Deep learning algorithms are used throughout the method, including multimodal fusion based on spectral feature compensation, temporal consistency modeling, water surface identification, and neural network regression modeling of water gauge image information, including pixel differences between the upper and lower boundaries of the water gauge and its physical height relative to the top. This leverages the high accuracy of deep learning. The method utilizes the multimodal fusion algorithm SFCN-CMFN based on spectral feature compensation, the lightweight temporal consistency algorithm LTCM, the optimized water surface identification algorithm EfficientViT-Seg, and the ResNet50-MLP-Regression neural network regression algorithm based on pixel differences between image water gauges and their corresponding physical heights. This method improves the real-time performance of water gauge and water level calculations and facilitates deployment on edge computing devices.

[0007] The present invention provides the following technical solution: a high-efficiency water gauge real-time water level recognition and calculation method resistant to complex environmental interference, comprising the following steps:

[0008] Step 1: Construct a multimodal fusion dataset of visible light and infrared water surface data, and train the multimodal fusion algorithm SFCN-CMFN based on spectral feature compensation on the visible light and infrared water surface fusion dataset to obtain the multimodal fusion SFCN-CMFN model file;

[0009] Step 2: Build a water surface position recognition dataset, train the water surface position recognition dataset based on the optimized recognition algorithm EfficientViT-Seg, and obtain the EfficientViT-Seg model file optimized for water surface position recognition;

[0010] Step 3: Construct a temporal consistency dataset and train the temporal consistency algorithm LTCM based on the sliding window mechanism combined with the lightweight ConvGRU network to obtain a temporal consistency LTCM model file.

[0011] Step 4: Generate water gauge images under various weather conditions, lighting conditions, and nighttime conditions using a two-stage detection algorithm and Blender simulation software algorithm, and obtain information about each simulated image, the pixel difference between the upper and lower boundaries of the water gauge, and the physical height of the water gauge relative to the top;

[0012] Step 5: Based on the image information, the pixel difference between the upper and lower boundaries of the water gauge, and the physical height value of the water gauge relative to the top, the ResNet50-MLP-Regression neural network regression algorithm is used to train the data set to obtain the ResNet50-MLP-Regression neural network regression model file;

[0013] Step 6. The pixel difference between the water level image to be identified, the water surface and the water surface line at the intersection of the water gauge relative to the top of the water gauge is used for model inference by calling the ResNet50-MLP-Regression neural network regression algorithm model file to obtain the physical height value h_water relative to the top of the water gauge. Then, based on the known physical height value h_up of the top of the water gauge, the actual water level value h_level = h_up-h_water can be obtained.

[0014] Preferably, in step 1, the multimodal fusion algorithm SFCN-CMFN uses EfficientNet as the backbone network for feature extraction, uses the spectral feature compensation mechanism SFCN to use the frequency domain features of the visible light image to enhance the infrared image features, and uses the cross-modal attention mechanism to strengthen the semantic alignment of key areas, thereby improving the accuracy of water surface position recognition.

[0015] Preferably, in step 2, the optimized recognition algorithm EfficientViT-Seg combines the local modeling capability of CNN and the global modeling capability of Transformer on the basis of the EfficientViT architecture.

[0016] Better yet, the Transformer is integrated into the CNN. Each module includes a depth-wise separable convolution for low-level and local feature extraction. At the same time, the GhostNet lightweight module design reduces the amount of computation, making it suitable for use in resource-constrained scenarios.

[0017] Better yet, the window attention mechanism and ASPP multi-scale feature fusion are used to extract features and improve the feature extraction capability of the algorithm.

[0018] Better yet, in step 2, the WIoU weight loss function is used instead of the original loss function EIoU to improve the training accuracy of the algorithm model.

[0019] Preferably, in step 3, the temporal consistency algorithm LTCM adopts a sliding window mechanism and a lightweight ConvGRU network. ConvGRU replaces the fully connected operation of GRU with a convolution operation, which is suitable for image sequence modeling, including spatial and temporal feature extraction in video frames. The sliding window mechanism is used to construct sequence samples as training samples for the LTCM algorithm. The sliding window size is W = 5 frames, and continuous frames are extracted from the image sequence as samples.

[0020] Preferably, in step 4, the water gauge images under various weather environments, lighting, and night conditions are generated through the two-stage detection algorithm and the Blender simulation software algorithm, and the simulated image information of each image, the upper and lower boundary pixel differences of the water gauge, and the physical height value of the water gauge relative to the top are obtained.

[0021] Preferably, in step 5, the water gauge image information, the upper and lower boundary pixel difference of the water gauge and the physical height value of the water gauge relative to the top are subjected to the ResNet50-MLP-Regression neural network regression algorithm, ResNet50 is used to perform feature extraction of the water gauge water level image, and MLP multi-layer perceptron is used to perform feature extraction of the upper and lower boundary pixel difference of the water gauge.

[0022] The beneficial effects of the present invention are:

[0023] Compared with the existing water gauge water level calculation method, the present invention can calculate the water gauge water level value with high accuracy and high timeliness, and is easy to deploy on edge computing devices. It is not affected by complex conditions such as water surface illumination, reflection, water gauge characters being covered by mud at the intersection of the water gauge and the water surface, and the inability to recognize the scale values ​​on the water gauge when the river surface is very wide and there is a physical water gauge in the middle of the river. There is no need to build a virtual water gauge on the river bank, and the operation is simple, saving manpower and material resources, and it has strong versatility. The algorithm of the present invention is safe and reliable, easy to maintain, and can be widely used in hydrological monitoring, reservoir scheduling management, irrigation management and scheduling of irrigation areas, and other industries. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 This is a flow chart of a high-efficiency water gauge real-time identification and calculation method that is resistant to interference from complex environments;

[0025] Figure 2 It is a flow chart of the multimodal fusion algorithm SFCN-CMFN based on spectrum feature compensation of the present invention;

[0026] Figure 3 This is a structural diagram of the optimized water surface recognition algorithm EfficientViT-Seg of the present invention;

[0027] Figure 4 is a flow chart of the temporal consistency algorithm LTCM of the present invention;

[0028] Figure 5 This is a flow chart of the ResNet50-MLP-Regression neural network regression algorithm of the present invention;

[0029] Figure 6 The present invention discloses a water level position diagram of a water gauge composed of four standard physical water gauges. DETAILED DESCRIPTION

[0030] The following will provide a clear and complete description of the relevant technologies in the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0031] like Figures 1 to 6 As shown, this embodiment aims to provide an efficient real-time identification and calculation method of water gauge water level that is resistant to interference from complex environments.

[0032] A multimodal fusion dataset of visible light and infrared water surface data was constructed. The SFCN-CMFN multimodal fusion algorithm, based on spectral feature compensation, was trained on the visible light and infrared water surface fusion dataset to generate the SFCN-CMFN multimodal fusion model file. The SFCN-CMFN multimodal fusion algorithm uses EfficientNet as the backbone network for feature extraction. It employs the SFCN spectral feature compensation mechanism to enhance infrared image features using frequency domain features of visible light images. A cross-modal attention mechanism is used to strengthen semantic alignment of key regions, thereby improving the accuracy of water surface location recognition.

[0033] A water surface location recognition dataset was constructed and trained on the optimized recognition algorithm EfficientViT-Seg to generate a water surface location recognition model file. The optimized recognition algorithm EfficientViT-Seg combines the local modeling capabilities of CNNs with the global modeling capabilities of Transformers based on the EfficientViT architecture. The Transformer is integrated into the CNN, with each module including depthwise separable convolutions for low-level and local feature extraction. The GhostNet lightweight module design reduces computational complexity, making it suitable for resource-constrained scenarios. A windowed attention mechanism and ASPP multi-scale feature fusion are used for feature extraction, enhancing the algorithm's feature extraction capabilities. The WIoU weighted loss function replaces the original EIoU loss function to improve the algorithm model training accuracy.

[0034] A temporal consistency dataset was constructed and trained on the temporal consistency algorithm (LTCM), which combines a sliding window mechanism with a lightweight ConvGRU network. This resulted in a temporal consistency LTCM model file. The LTCM algorithm uses a sliding window mechanism and a lightweight ConvGRU network. ConvGRU replaces the fully connected operations of the GRU with convolution operations, making it suitable for image sequence modeling, including spatial and temporal feature extraction from video frames. A sliding window mechanism was used to construct sequence samples, which served as training samples for the LTCM algorithm. The sliding window size was W = 5 frames, and consecutive frames were extracted from the image sequence as samples.

[0035] Through the two-stage detection algorithm and Blender simulation software algorithm, water gauge images under various weather environments, lighting, and night conditions are generated, and the simulated image information, the upper and lower boundary pixel differences of the water gauge, and the physical height value of the water gauge relative to the top are obtained.

[0036] Based on the image information, the pixel differences between the upper and lower boundaries of the water gauge, and the physical height of the water gauge relative to the top, a model was trained using the ResNet50-MLP-Regression neural network regression algorithm to generate the ResNet50-MLP-Regression neural network regression model file. ResNet50 was used to extract features from the water gauge water level image, and the ResNet50-MLP-Regression neural network regression algorithm used an MLP multi-layer perceptron to extract features from the pixel differences between the upper and lower boundaries of the water gauge.

[0037] The water level image to be identified, the water surface, and the pixel difference between the water surface line at the intersection of the water gauge and the top of the water gauge are used for model inference by calling the ResNet50-MLP-Regression neural network regression algorithm model file to obtain the physical height value h_water relative to the top of the water gauge. Then, based on the known physical height value h_up of the top of the water gauge, the actual water level value h_level = h_up-h_water can be obtained.

[0038] Example

[0039] This embodiment Figure 1 As shown in the figure, a multimodal fusion dataset of visible light and infrared water surface data is constructed, and the multimodal fusion algorithm SFCN-CMFN based on spectral feature compensation is trained on the visible light and infrared water surface fusion dataset to obtain the multimodal fusion SFCN-CMFN model file.

[0040] like Figure 1 As shown in the figure, a water surface position recognition dataset is constructed, and based on the optimized recognition algorithm EfficientViT-Seg, the water surface position recognition dataset is trained to obtain the EfficientViT-Seg model file optimized for water surface position recognition.

[0041] like Figure 1 As shown in the figure, a temporal consistency dataset is constructed, and a temporal consistency algorithm LTCM based on a sliding window mechanism combined with a lightweight ConvGRU network is used to train the temporal consistency dataset to obtain a temporal consistency LTCM model file.

[0042] like Figure 1 As shown in the figure, based on the two-stage detection algorithm, the water gauge position recognition dataset is trained to obtain the two-stage detection algorithm model file for water gauge position recognition. The model is inferred and the pixel difference between the upper and lower boundaries of the water gauge in each image and the physical height value are recorded.

[0043] like Figure 1As shown in the figure, the Blender simulation software algorithm is used to generate water gauge images under various weather environments, lighting, and night conditions, and the pixel difference between the upper and lower boundaries of the water gauge and the physical height value of each simulated image are recorded.

[0044] like Figure 1 As shown in the figure, the upper and lower boundary pixel difference of the water gauge and the physical height value dataset and the water gauge water level image data are obtained. Based on the ResNet50-MLP-Regression neural network regression algorithm, the upper and lower boundary pixel difference of the water gauge and the physical height value dataset and the water gauge water level image dataset are trained to obtain the ResNet50-MLP-Regression neural network regression model file.

[0045] like Figure 1 As shown in , input the water gauge water level image to be identified, call the multimodal fusion SFCN-CMFN model file for model inference, and obtain the water gauge water level fusion image, as shown in Figure 2 Then call the water surface position recognition EfficientViT-Seg model file for model inference to obtain the water surface position recognition image, as shown in Figure 3 As shown, the white area represents the water surface.

[0046] like Figure 1 As shown, for the obtained water surface position image, call the temporal consistency LTCM model file to obtain the pixel value of the water surface line where the water surface and the water gauge intersect, and then calculate the pixel difference relative to the top of the water gauge, as shown in Figure 4 shown.

[0047] like Figure 1 As shown in the figure, the water level image to be identified and the pixel difference relative to the top of the water gauge are used to perform model inference by calling the ResNet50-MLP-Regression neural network regression algorithm model file to obtain the physical height value h_water relative to the top of the water gauge. Figure 5 shown.

[0048] Then, based on the known physical height h_up of the top of the water gauge, the actual water level h_level = h_up - h_water can be obtained. Figure 6 As shown in the figure, the water gauge is composed of 4 standard physical water gauges. The physical height value of the top of the water gauge is h_up = 4 meters, and the actual water level value is 1.98.

[0049] In summary, the present invention can calculate the water level value of the water gauge with high accuracy and timeliness, and is easy to deploy on edge computing devices. It is not affected by complex conditions such as water surface illumination, reflections, water gauge characters being covered by mud at the intersection of the water gauge and the water surface, and the inability to recognize the scale values ​​on the water gauge when the river surface is very wide and there is a physical water gauge in the middle of the river. There is no need to build a virtual water gauge on the river bank, and the operation is simple, saving manpower and material resources, and strong versatility. The algorithm of the present invention is safe and reliable, easy to maintain, and can be widely used in hydrological monitoring, reservoir scheduling management, irrigation management and scheduling of irrigation areas, and other industries.

[0050] It should be emphasized that the above are only preferred embodiments of the present invention and do not limit the present invention in any form. Any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention are still within the scope of the technical solution of the present invention.

Claims

1. An efficient water gauge real-time identification and calculation method that is resistant to complex environmental interference, characterized in that: The following steps are involved: Step 1: Construct a multimodal fusion dataset of visible light and infrared water surface data, and train the multimodal fusion algorithm SFCN-CMFN based on spectral feature compensation on the visible light and infrared water surface fusion dataset to obtain the multimodal fusion SFCN-CMFN model file; Step 2: Build a water surface position recognition dataset, train the water surface position recognition dataset based on the optimized recognition algorithm EfficientViT-Seg, and obtain the EfficientViT-Seg model file optimized for water surface position recognition; Step 3: Construct a temporal consistency dataset and train the temporal consistency algorithm LTCM based on the sliding window mechanism combined with the lightweight ConvGRU network to obtain a temporal consistency LTCM model file. Step 4: Generate water gauge images under various weather conditions, lighting conditions, and nighttime conditions using a two-stage detection algorithm and Blender simulation software algorithm, and obtain information about each simulated image, the pixel difference between the upper and lower boundaries of the water gauge, and the physical height of the water gauge relative to the top; Step 5: Based on the image information, the pixel difference between the upper and lower boundaries of the water gauge, and the physical height value of the water gauge relative to the top, the ResNet50-MLP-Regression neural network regression algorithm is used to train the data set to obtain the ResNet50-MLP-Regression neural network regression model file; Step 6. The pixel difference between the water level image to be identified, the water surface and the water surface line at the intersection of the water gauge relative to the top of the water gauge is used for model inference by calling the ResNet50-MLP-Regression neural network regression algorithm model file to obtain the physical height value h_water relative to the top of the water gauge. Then, based on the known physical height value h_up of the top of the water gauge, the actual water level value h_level = h_up-h_water can be obtained.

2. The method for real-time identification and calculation of water level in a high-efficiency water gauge and resistant to interference from complex environments according to claim 1 is characterized in that: In step 1, the multimodal fusion algorithm SFCN-CMFN uses EfficientNet as the backbone network for feature extraction, adopts the spectral feature compensation mechanism SFCN to use the frequency domain features of the visible light image to enhance the infrared image features, and adopts the cross-modal attention mechanism to strengthen the semantic alignment of key areas, thereby improving the accuracy of water surface position recognition.

3. The method for real-time identification and calculation of water level in a high-efficiency water gauge and resistant to interference from complex environments according to claim 1 is characterized in that: In step 2, the optimized recognition algorithm EfficientViT-Seg combines the local modeling capability of CNN and the global modeling capability of Transformer on the basis of the EfficientViT architecture.

4. The method for real-time identification and calculation of water level in a high-efficiency water gauge and resistant to interference from complex environments according to claim 3 is characterized in that: The Transformer is integrated into the CNN. Each module includes a depth-wise separable convolution responsible for low-level and local feature extraction. At the same time, the GhostNet lightweight module design reduces the amount of computation, making it suitable for use in resource-constrained scenarios.

5. The method for real-time identification and calculation of water level in a high-efficiency water gauge and resistant to interference from complex environments according to claim 3 is characterized in that: The window attention mechanism and ASPP multi-scale feature fusion are used to extract features and improve the feature extraction capability of the algorithm.

6. The method for real-time identification and calculation of water level in a high-efficiency water gauge and resistant to interference from complex environments according to claim 3 is characterized in that: In step 2, the WIoU weight loss function is used instead of the original loss function EIoU to improve the training accuracy of the algorithm model.

7. The method for real-time identification and calculation of water level in a high-efficiency water gauge and resistant to interference from complex environments according to claim 1 is characterized in that: In step 3, the temporal consistency algorithm LTCM adopts a sliding window mechanism and a lightweight ConvGRU network. ConvGRU replaces the fully connected operation of GRU with a convolution operation, which is suitable for image sequence modeling, including spatial and temporal feature extraction in video frames. The sliding window mechanism is used to construct sequence samples as training samples for the LTCM algorithm. The sliding window size is W = 5 frames, and continuous frames are extracted from the image sequence as samples.

8. The method for real-time identification and calculation of water level in a high-efficiency water gauge and resistant to interference from complex environments according to claim 1 is characterized in that: In step 5, the water gauge image information, the pixel difference between the upper and lower boundaries of the water gauge and the physical height value of the water gauge relative to the top are obtained by using the ResNet50-MLP-Regression neural network regression algorithm. ResNet50 is used to extract the features of the water gauge water level image, and an MLP multi-layer perceptron is used to extract the features of the pixel difference between the upper and lower boundaries of the water gauge.