Open channel water level intelligent identification method and system based on computer vision technology
Through the intelligent water level identification method based on computer vision technology, the image segmentation and data processing are used using a new water ruler and U-Net model, the high maintenance cost and low accuracy of traditional water level monitoring methods are solved, and efficient and real-time water level monitoring is achieved , the accuracy rate reaches 98.5%.
Patent Information
- Application Number
- CN202411047268.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-11-19
AI Technical Summary
Traditional water level monitoring methods have high maintenance costs, are vulnerable to damage, and are unable to achieve remote monitoring and real-time data transmission. They are affected by human factors, environmental impacts and water quality fluctuations, and have low accuracy and are not suitable for modern intelligent monitoring systems.
Using the intelligent identification method of open channel water level based on computer vision technology, a new water ruler and intelligent monitoring device are designed, and the water ruler image is obtained through an 8-megapixel camera, a U-Net semantic segmentation model is constructed for image segmentation, and the peak value of the pixel value sum is calculated to Output the water ruler readings and upload data through a wireless WiFi transmitter for cloud processing and model optimization.
It improves the accuracy and real-time nature of water level monitoring, overcomes the problems of small monitoring range, easy damage and difficult maintenance of traditional methods, and achieves efficient real-time monitoring, and accurately identifying water levels to reach 98.5%, and supports remote and large-scale monitoring.
Smart Images

Figure CN118982670A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of environmental monitoring, and more particularly to an open channel water level intelligent recognition method and system based on computer vision technology. Background Art
[0002] At present, traditional water level monitoring methods are mainly divided into water level gauges, liquid level gauges, water level markers and water level measuring rods. Modern water level monitoring methods are mainly divided into sonar water level gauges, laser water level gauges, pressure sensors and remote sensing technology. Different monitoring methods have inevitable problems:
[0003] (1) Water level meters and liquid level meters have high maintenance costs. The devices require regular maintenance and calibration, are susceptible to contamination and damage, have low accuracy, and cannot achieve remote monitoring and real-time data transmission, which limits their application in modern intelligent monitoring systems.
[0004] (2) Water level markers and water level measuring rods are greatly affected by human factors and the environment, which increases labor costs and may cause instability in monitoring data. They are not suitable for remote monitoring and large-scale monitoring.
[0005] (3) Sonar water level meters and laser water level meters are affected by water quality and water surface fluctuations, and their accuracy may be affected to a certain extent.
[0006] (4) Pressure sensors need to consider issues such as water sealing and corrosion protection, and the installation and maintenance costs are high.
[0007] (5) Remote sensing technology is affected by weather conditions and obstructions, has high requirements for equipment, is costly, and has complex data processing, making it unsuitable for some specific monitoring scenarios.
[0008] Therefore, how to improve the water level monitoring capability on the basis of overcoming the above problems is an issue that technical personnel in this field need to solve urgently. Summary of the invention
[0009] In view of this, the present invention provides an open channel water level intelligent identification method and system based on computer vision technology, which not only improves the water level monitoring capability, but also overcomes the problems of traditional water level monitoring equipment such as high labor cost, easy damage and difficult maintenance, and inability to achieve remote monitoring and real-time data transmission.
[0010] In order to achieve the above object, the present invention adopts the following technical solution:
[0011] On the one hand, a method for intelligently identifying water level in an open channel based on computer vision technology is provided, comprising:
[0012] Design a new water gauge and determine the relationship between the peak number of pixel values and water gauge readings;
[0013] Obtain real-time images of water gauges through intelligent monitoring equipment;
[0014] Construct a water gauge image segmentation model to segment the water gauge image;
[0015] The pixel value sum in the horizontal direction of the segmented water gauge image is calculated, and the water gauge reading is output according to the relationship between the peak number of the pixel value sum and the water gauge reading.
[0016] Optionally, the process of designing a new water gauge is: remove the identification readings of the conventional water gauge, and have ten "E"s and reverse "E"s, which are arranged on both sides of the water gauge respectively and marked in red, and the upper and lower horizontal widths of each "E" and reverse "E" of the water gauge are reduced from the original 1cm to 0.8cm, and then a 0.4cm gap will be left in the vertical direction between each "E" and the adjacent reverse "E", and the length of the original water gauge will not be changed. The total length of the new water gauge is 1m and the width is 20cm.
[0017] Optionally, the intelligent monitoring device includes an 8-megapixel camera, which collects water level images of the monitoring area by combining photos and videos.
[0018] Optionally, the constructing of the water gauge image segmentation model specifically includes:
[0019] Preprocess the collected water gauge images, including image size standardization, brightness and contrast adjustment, and denoising;
[0020] Extract the water gauge image from the preprocessed water gauge image and find the area where the water gauge is located;
[0021] According to the shape and characteristics of the water gauge, the Hough transform algorithm is used to detect the straight line or curve on the water gauge;
[0022] The processed water gauge images are divided into training set, validation set and test set according to 7:2:1;
[0023] Annotate the water gauge image;
[0024] The U-Net semantic segmentation model architecture is selected, and the U-Net semantic segmentation model architecture is trained using the training set, validation set, and test set to obtain a trained water gauge image segmentation model.
[0025] Optionally, the semantic segmentation model architecture of the U-Net includes a convolutional layer, a maximum pooling layer, an upsampling layer, a skip connection and an output layer;
[0026] The function of the convolutional layer is to parse the input image and extract key features. The convolutional layers are arranged in sequence, and the maximum pooling layer inserted between them realizes indirect information transmission. In the decoding stage, the multi-layer convolutional layers are spliced with the feature map from the encoder through jump connections to fuse context information at different levels.
[0027] The maximum pooling layer is used for downsampling, reducing the spatial size of the feature map, increasing the receptive field, and capturing higher-level features; after each convolution block, the maximum pooling layer is used for downsampling; the maximum pooling layer halves the size of the feature map and is indirectly connected to the upsampling layer to form an encoding-decoding structure;
[0028] Upsampling gradually restores the size of the feature map until it matches the resolution of the input image.
[0029] The upsampling layer enlarges the feature map, and the upsampled features are concatenated with the corresponding feature map of the encoder through skip connections;
[0030] The skip connection directly connects the corresponding layers in the encoder and decoder to transfer local fine-grained information and help restore image details. After upsampling at each level of the decoder, the feature map is concatenated with the output of the encoder at the same level.
[0031] The output layer is used to generate the final pixel-level classification or segmentation results.
[0032] Optionally, after the water level gauge is segmented and calculated, the data is uploaded to the cloud through a wireless WiFi transmitter and an IoT network card and an alarm is issued, and the parameters of the trained model are updated through cloud calculation.
[0033] Optionally, when the cloud server receives data, cloud computing resources are used for distributed computing or GPU acceleration is used for model training and parameter optimization; after the training is completed, the new model parameters are downloaded from the cloud to the intelligent monitoring device to update the water gauge image segmentation model.
[0034] On the other hand, an open channel water level intelligent recognition system based on computer vision technology is provided, including a camera, an integrated recognition algorithm module, a memory, a terminal processor, a power supply, a communication module, a display and a cloud;
[0035] Camera, to obtain real-time images of the water gauge;
[0036] The recognition algorithm module is integrated to construct a water gauge image segmentation model to segment the water gauge image; the horizontal pixel value sum of the segmented water gauge image is calculated, and the water gauge reading is output according to the relationship between the peak value of the pixel value sum and the water gauge reading;
[0037] A memory, used to store data generated by the integrated recognition algorithm module;
[0038] Terminal processor, which controls each component;
[0039] Power supply, which provides power to the system;
[0040] Communication module, establishing communication between the terminal processor and the cloud;
[0041] A display for displaying water gauge readings;
[0042] In the cloud, use cloud computing resources for distributed computing or use GPU acceleration to perform model training and parameter optimization.
[0043] It can be seen from the above technical solutions that the present invention discloses a method and system for intelligently identifying water level in an open channel based on computer vision technology. Compared with the prior art, the present invention has the following advantages and
[0044] Beneficial effects:
[0045] (1) This method further improves the intelligent perception capability of urban floods, overcoming the problems of traditional river water level monitoring equipment, such as small monitoring range, easy damage and difficult maintenance, and inability to provide important information on the duration and range of waterlogging;
[0046] (2) Compared with traditional methods, the proposed method can monitor the open channel water level in real time in a simple and efficient manner, and improve the accuracy of water level detection under complex conditions. The accuracy of this method in accurately identifying the water level is as high as 98.5%.
[0047] (3) Compared with the traditional method, the proposed method can implement the model to serve the implementation of control, monitor data and the current status of the pipeline network in real time, and the calculation accuracy can be verified in real time. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0049] Figure 1 A flow chart of the method provided by the present invention;
[0050] Figure 2 The design diagram of the new water gauge provided by the present invention, the left figure is the overall schematic diagram of the water gauge; the right figure is a partial enlarged diagram;
[0051] Figure 3 A schematic diagram of the working process of the intelligent monitoring device provided by the present invention;
[0052] Figure 4 A system structure diagram provided by the present invention;
[0053] Figure 5 This is a schematic diagram of the semantic segmentation model structure of U-Net provided by the present invention. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] On the one hand, the embodiment of the present invention discloses a method for intelligently identifying water level in an open channel based on computer vision technology, such as Figure 1 and Figure 3 As shown, including:
[0056] Design a new water gauge and determine the relationship between the peak number of pixel values and water gauge readings;
[0057] Obtain real-time images of water gauges through intelligent monitoring equipment;
[0058] Construct a water gauge image segmentation model to segment the water gauge image;
[0059] The pixel value sum in the horizontal direction of the segmented water gauge image is calculated, and the water gauge reading is output according to the relationship between the peak number of the pixel value sum and the water gauge reading.
[0060] In a specific embodiment, Figure 2 As shown, the process of designing a new water gauge is as follows: the marking readings of the conventional water gauge are removed, and there are ten "E"s and reverse "E"s, which are arranged on both sides of the water gauge and marked in red. The upper and lower horizontal widths of each "E" and reverse "E" of the water gauge are reduced from the original 1cm to 0.8cm, and a 0.4cm gap will be left in the vertical direction between each "E" and the adjacent reverse "E", and the length of the original water gauge will not be changed. The total length of the new water gauge is 1m and the width is 20cm.
[0061] In a specific embodiment, in the intelligent identification of water level monitoring, the primary task is to collect relevant data. Therefore, by adding a camera for shooting water gauge images to the device, the water gauge images of the monitoring area are collected by combining photos and videos. Each finished device contains an 8-megapixel camera that can shoot 1080p30 frame video. According to practical investigations, the clarity is sufficient to meet the needs of deep learning of water gauge images.
[0062] In a specific embodiment, constructing a water gauge image segmentation model specifically includes:
[0063] Preprocess the collected water gauge images, including image size standardization, brightness and contrast adjustment, and denoising;
[0064] Extract the water gauge image from the preprocessed water gauge image and find the area where the water gauge is located;
[0065] According to the shape and characteristics of the water gauge, the Hough transform algorithm is used to detect the straight line or curve on the water gauge;
[0066] The processed water gauge images are divided into training set, validation set and test set according to 7:2:1;
[0067] Annotate the water gauge image;
[0068] The U-Net semantic segmentation model architecture is selected, and the U-Net semantic segmentation model architecture is trained using the training set, validation set, and test set to obtain a trained water gauge image segmentation model.
[0069] Specifically, the cross entropy loss function or appropriate segmentation loss function can be used to measure the difference between the prediction result and the annotation. At the same time, data augmentation technology can be used to expand the data set and improve the generalization ability of the model. By calculating the accuracy, recall rate, IoU and other indicators of the segmentation results, the model can be adjusted and optimized according to the evaluation results.
[0070] In a specific embodiment, Figure 5 As shown in the figure, the semantic segmentation model architecture of U-Net includes convolutional layer, maximum pooling layer, upsampling layer, skip connection and output layer;
[0071] The function of the convolutional layer is to parse the input image and extract key features. The convolutional layers are arranged in sequence, and the maximum pooling layer inserted between them realizes indirect information transmission. In the decoding stage, the multi-layer convolutional layers are spliced with the feature map from the encoder through jump connections to fuse context information at different levels.
[0072] The maximum pooling layer is used for downsampling, reducing the spatial size of the feature map, increasing the receptive field, and capturing higher-level features; after each convolution block, the maximum pooling layer is used for downsampling; the maximum pooling layer halves the size of the feature map and is indirectly connected to the upsampling layer to form an encoding-decoding structure;
[0073] Upsampling gradually restores the size of the feature map until it matches the resolution of the input image.
[0074] The upsampling layer enlarges the feature map, and the upsampled features are concatenated with the corresponding feature map of the encoder through skip connections;
[0075] The skip connection directly connects the corresponding layers in the encoder and decoder to transfer local fine-grained information and help restore image details. After upsampling at each level of the decoder, the feature map is concatenated with the output of the encoder at the same level.
[0076] The output layer is used to generate the final pixel-level classification or segmentation results.
[0077] Specifically, the segmented water gauge image will be passed into the built-in peak number and water gauge reading calculation program to calculate the peak number of the sum of horizontal pixel values. Due to the unique design of the new water gauge, the segmented water gauge image is a binary image. The water gauge "E" and the reverse "E" above the water surface are both white, and the rest are black. In the pixel value calculation, the white pixel value is 255, and the black pixel value is 0. There is a specific relationship between the peak number of the sum of horizontal pixel values and the water gauge reading, as shown in Table 1. A pixel map is established with pixel points as the unit, the height of the segmented water gauge image as the horizontal coordinate, and the horizontal pixel sum as the vertical coordinate. The peak number of the sum of horizontal pixel values is counted by the dataDealFunc function in the built-in peak number and water gauge reading calculation program. The output binary image will output the water gauge reading according to the specific relationship between the peak number of the sum of horizontal pixel values and the water gauge reading.
[0078] Table 1 Relationship between the peak value of the horizontal pixel value and the water gauge reading
[0079]
[0080]
[0081] In a specific embodiment, after the integrated water gauge intelligent algorithm in the edge camera device segments and calculates the water gauge, the data is uploaded and an alarm is issued through a wireless WiFi transmitter and an IoT network card, and the parameters of the system's trained model are updated through cloud computing. When the system model parameters need to be updated, this can be achieved through cloud computing. Cloud computing refers to the method of storing computing tasks and data on a cloud server for processing and analysis. By uploading training data to a cloud server, cloud computing resources are used for distributed computing or GPU acceleration is used for model training and parameter optimization. After training is completed, the new model parameters can be downloaded from the cloud to the local system to update the system model. This method can effectively utilize cloud computing resources, speed up model training, and update model parameters at any time to cope with changing needs and data. Then it is fed back to the terminal device to improve monitoring accuracy.
[0082] In a specific embodiment, the feasibility of the method is verified by identifying the water level of a water tank gauge in a laboratory. The water tank in the laboratory can better simulate the scene in the actual river channel and can stably control the rise and fall of the water level. An intelligent recognition device based on the new water gauge video monitoring water level can be used to monitor the area in real time.
[0083] On the other hand, an open channel water level intelligent recognition system based on computer vision technology is provided. Figure 4 As shown, it includes a camera, an integrated recognition algorithm module, a memory, a terminal processor, a power supply, a communication module, a display and a cloud;
[0084] Camera, to obtain real-time images of the water gauge;
[0085] The recognition algorithm module is integrated to construct a water gauge image segmentation model to segment the water gauge image; the horizontal pixel value sum of the segmented water gauge image is calculated, and the water gauge reading is output according to the relationship between the peak value of the pixel value sum and the water gauge reading;
[0086] A memory, used to store data generated by the integrated recognition algorithm module;
[0087] Terminal processor, which controls each component;
[0088] Power supply, which provides power to the system;
[0089] Communication module, establishing communication between the terminal processor and the cloud;
[0090] A display for displaying water gauge readings;
[0091] In the cloud, use cloud computing resources for distributed computing or use GPU acceleration to perform model training and parameter optimization.
[0092] The terminal processor obtains water gauge data through U-Net image segmentation in the Torch environment and uploads the data to the cloud server through the communication module.
[0093] The edge camera device can specifically include an 8-megapixel camera that can shoot 1080P30 frame video, which can be used to capture images and videos of water accumulation on urban streets.
[0094] The Torch environment (python) integrates an intelligent water level recognition algorithm and a built-in deep learning neural network framework for receiving images and video footage, performing open channel water gauge segmentation, and then achieving open channel water level recognition through a built-in peak value and water gauge reading calculation program.
[0095] Wireless WIFI transmitters and IoT network cards are used to upload processed and analyzed data and send alerts to the cloud. At the same time, the cloud server updates the algorithm and parameters based on the data uploaded by the edge device and feeds back to the terminal device.
[0096] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0097] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An intelligent identification method of open channel water level based on computer vision technology, It is characterized in that include: Design a new water gauge and determine the relationship between the peak number of pixel values and water gauge readings; Obtain real-time images of water gauges through intelligent monitoring equipment; Construct a water gauge image segmentation model to segment the water gauge image; The pixel value sum in the horizontal direction of the segmented water gauge image is calculated, and the water gauge reading is output according to the relationship between the peak number of the pixel value sum and the water gauge reading.
2. According to claim 1, a method for intelligently identifying water level in an open channel based on computer vision technology, It is characterized in that The process of designing the new water gauge is as follows: the marking readings of the conventional water gauge are removed, and there are ten "E" and reverse "E" respectively, which are arranged on both sides of the water gauge and marked in red. The upper and lower horizontal widths of each "E" and reverse "E" of the water gauge are reduced from the original 1cm to 0.8cm, and a 0.4cm gap will be left in the vertical direction between each "E" and the adjacent reverse "E", and the length of the original water gauge will not be changed. The total length of the new water gauge is 1m and the width is 20cm.
3. According to claim 1, a method for intelligently identifying water level in an open channel based on computer vision technology, It is characterized in that The intelligent monitoring device includes an 8-megapixel camera, which collects water level images of the monitoring area by combining photos and videos.
4. According to claim 1, a method for intelligently identifying water level in an open channel based on computer vision technology, It is characterized in that The construction of the water gauge image segmentation model specifically includes: Preprocess the collected water gauge images, including image size standardization, brightness and contrast adjustment, and denoising; Extract the water gauge image from the preprocessed water gauge image and find the area where the water gauge is located; According to the shape and characteristics of the water gauge, the Hough transform algorithm is used to detect the straight line or curve on the water gauge; The processed water gauge images are divided into training set, validation set and test set according to 7:2:1; Annotate the water gauge image; The U-Net semantic segmentation model architecture is selected, and the U-Net semantic segmentation model architecture is trained using the training set, validation set, and test set to obtain a trained water gauge image segmentation model.
5. According to claim 4, a method for intelligently identifying water level in an open channel based on computer vision technology, It is characterized in that The semantic segmentation model architecture of the U-Net includes a convolutional layer, a maximum pooling layer, an upsampling layer, a skip connection and an output layer; The function of the convolutional layer is to parse the input image and extract key features. The convolutional layers are arranged in sequence, and the maximum pooling layer inserted between them realizes indirect information transmission. In the decoding stage, the multi-layer convolutional layers are spliced with the feature map from the encoder through jump connections to fuse context information at different levels. The maximum pooling layer is used for downsampling, reducing the spatial size of the feature map, increasing the receptive field, and capturing higher-level features; after each convolution block, the maximum pooling layer is used for downsampling; the maximum pooling layer halves the size of the feature map and is indirectly connected to the upsampling layer to form an encoding-decoding structure; Upsampling gradually restores the size of the feature map until it matches the resolution of the input image; The upsampling layer enlarges the feature map, and the upsampled features are concatenated with the corresponding feature map of the encoder through skip connections; The skip connection directly connects the corresponding layers in the encoder and decoder to transfer local fine-grained information and help restore image details. After upsampling at each level of the decoder, the feature map is concatenated with the output of the encoder at the same level. The output layer is used to generate the final pixel-level classification or segmentation results.
6. According to claim 1, a method for intelligently identifying water level in an open channel based on computer vision technology, It is characterized in that It also includes segmenting and calculating the water level, uploading the data to the cloud and issuing an alarm through a wireless WiFi transmitter and IoT network card, and updating the parameters of the trained model through cloud computing.
7. According to claim 6, a method for intelligently identifying water level in an open channel based on computer vision technology, It is characterized in that When the cloud server receives data, it uses cloud computing resources for distributed computing or uses GPU acceleration to perform model training and parameter optimization; After the training is completed, the new model parameters are downloaded from the cloud to the smart monitoring device to update the water gauge image segmentation model.
8. An open channel water level intelligent recognition system based on computer vision technology, It is characterized in that Includes camera, integrated recognition algorithm module, memory, terminal processor, power supply, communication module, display and cloud; Camera, to obtain real-time images of the water gauge; The recognition algorithm module is integrated to construct a water gauge image segmentation model to segment the water gauge image; the horizontal pixel value sum of the segmented water gauge image is calculated, and the water gauge reading is output according to the relationship between the peak value of the pixel value sum and the water gauge reading; A memory, used to store data generated by the integrated recognition algorithm module; Terminal processor, which controls each component; Power supply, which provides power to the system; Communication module, establishing communication between the terminal processor and the cloud; A display for displaying water gauge readings; In the cloud, use cloud computing resources for distributed computing or use GPU acceleration to perform model training and parameter optimization.
Citation Information
Cited By
Open channel flow detection method and open channel flowmeter
CN121026249A
