Water gauge reading identification method, device and equipment based on visual angle of unmanned aerial vehicle and medium

Through object detection and water surface segmentation technology, combined with large scale marking and numbers, the problem of poor accuracy in drone water level reading recognition in complex environments is solved, and efficient and accurate water level monitoring is achieved.

CN119131625APending Publication Date: 2024-12-13SHANDONG ZHIYANG SHANGSHUI INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411172260.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing drone image-based water level reading recognition method affects the accuracy and reliability of the readings in complex environments due to factors such as viewing angle deviation and water ruler pollution, making it difficult to achieve efficient and accurate water level monitoring in extreme environments.

Method used

The object detection model and the water surface semantic segmentation model are used to identify and divide the water surface through the water level monitoring images taken by the drone. The water level calculation is performed by combining large scale marks and numbers, which optimizes the recognition process of water level readings and improves the accuracy of the readings. and the efficiency of the process.

Benefits of technology

In complex and extreme environments, the accuracy and efficiency of water level monitoring are significantly improved, and the water level can be accurately read when partially defiled or blocked by the water ruler, which improves the accuracy of water level readings and the efficiency of the treatment process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131625A_ABST
    Figure CN119131625A_ABST
Patent Text Reader

Abstract

The invention relates to a water gauge reading identification method, device and equipment based on an unmanned aerial vehicle visual angle and a medium, and belongs to the technical field of computer vision and water environment monitoring, and the method comprises the steps: obtaining a water level monitoring image shot by an unmanned aerial vehicle, and constructing a data set; establishing a target detection model and a water surface semantic segmentation model, and performing model training; verifying the trained target detection model and the water surface semantic segmentation model by using a verification set; a to-be-recognized water level monitoring image shot by the unmanned aerial vehicle is obtained, the verified target detection model is adopted for recognition, and a target recognition result is obtained; performing semantic segmentation by adopting the verified water surface semantic segmentation model to obtain a water surface segmentation result; and performing water level calculation in combination with the target identification result and the water surface segmentation result to obtain the water gauge water level reading of the water level monitoring image to be identified. The accuracy of water level reading and the efficiency of the processing flow are improved, and the method is particularly suitable for water level monitoring in complex and extreme environments.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a method, device, equipment and medium for identifying water gauge readings based on the perspective of an unmanned aerial vehicle, and belongs to the technical field of computer vision and water level monitoring. Background Art

[0002] In recent years, with the increasing demand for environmental monitoring and disaster prevention and mitigation, water level monitoring has become a key link in flood control and prevention. Flood control water level monitoring is a powerful weapon against flood disasters, building a solid line of defense for the safety of people's lives and property. It is crucial to protecting the safety of people's lives and property, and can provide early warning, optimize resource allocation, and ensure the safety of water conservancy facilities.

[0003] Traditional water level monitoring technology mainly relies on manual reading or fixed monitoring equipment. These methods often have problems such as low efficiency, high cost and limited monitoring range in extreme weather conditions or complex geographical environments. The use of drone technology provides new possibilities for the extensive and rapid collection of water level data, but the existing drone-based water level reading recognition methods are often limited by factors such as viewing angle deviation and water gauge contamination in complex environments, affecting the accuracy and reliability of readings.

[0004] With the widespread application of drone technology, how to read water level gauge data efficiently and accurately from the perspective of drones has become an urgent need. The existing technology often affects the reading accuracy in harsh environments due to factors such as viewing angle deviation, water level gauge scale or small digital contamination. To this end, the present invention proposes a water level gauge reading recognition method based on the perspective of drones. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a water gauge reading recognition method, device, equipment and medium based on the perspective of an unmanned aerial vehicle, which can improve the accuracy of water level readings.

[0006] The technical solution adopted by the present invention to solve the technical problem is:

[0007] In a first aspect, an embodiment of the present invention provides a method for identifying water gauge readings based on a drone perspective, comprising the following steps:

[0008] Step S1, obtaining water level monitoring images taken by a drone and constructing a data set, wherein the data set includes a training set and a validation set;

[0009] Step S2, establishing a target detection model and a water surface semantic segmentation model, and using the training set to train the models, the target detection model is used to identify the water level gauge, numbers and scale marks in the water level monitoring image, and the water surface semantic segmentation model is used to perform semantic segmentation on the water surface in the water level monitoring image;

[0010] Step S3, using the validation set to validate the trained object detection model and water surface semantic segmentation model;

[0011] Step S4, obtaining the water level monitoring image to be identified taken by the drone, using the verified target detection model to identify the water level gauge, numbers and scale marks in the water level monitoring image to be identified, and obtaining the target recognition result;

[0012] Step S5, using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, to obtain a water surface segmentation result;

[0013] Step S6, calculating the water level by combining the target recognition result and the water surface segmentation result, and obtaining the water level reading of the water level monitoring image to be recognized.

[0014] As a possible implementation of this embodiment, the step S1, obtaining a water level monitoring image taken by a drone and constructing a data set, includes:

[0015] Step S11, marking water level gauges in a large number of water level monitoring images taken by drones as a target detection data set, wherein the water level gauge markings include a water level gauge, a large scale mark, a small scale mark, and numbers "0" to "9";

[0016] Step S12: annotating water surface areas in a large number of water level monitoring images taken by drones as a water surface segmentation data set.

[0017] As a possible implementation of this embodiment, the step S2, establishing a target detection model and a water surface semantic segmentation model, and using a training set to perform model training, includes:

[0018] Step S21, training the target detection model using the YOLOv10 algorithm based on the target detection data set to obtain a trained target detection model;

[0019] Step S22, training the water surface semantic segmentation model using the Swin-Transformer algorithm based on the water surface segmentation data set to obtain a trained water surface semantic segmentation model.

[0020] As a possible implementation of this embodiment, the step S3, using the verification set to verify the trained object detection model and the water surface semantic segmentation model, includes:

[0021] Step S31, using the validation set in the target detection data set to test the trained target detection model, and based on the test results, iteratively optimizing the trained target detection model, adjusting the hyperparameters, and obtaining a verified target detection model;

[0022] Step S32, using the verification set in the water surface segmentation dataset to test the trained water surface semantic segmentation model, based on the test results, iteratively optimize the trained water surface semantic segmentation model, adjust the hyperparameters, and obtain a verified water surface semantic segmentation model.

[0023] As a possible implementation of this embodiment, in step S4, the water level monitoring image to be identified taken by the drone is obtained, and the water level gauge, numbers and scale marks in the water level monitoring image to be identified are identified using the verified target detection model to obtain a target recognition result;

[0024] Step S41, using the verified target detection model to analyze the water level monitoring image to be identified, and determining whether the water level monitoring image to be identified contains a water level gauge, a large scale mark, and at least two small scale marks at the same time. If yes, proceed to the next step; otherwise, abandon the water level monitoring image to be identified;

[0025] Step S42, by comparing the center point distance between two small scale marks in the water level monitoring image to be identified with the average width of the small scale marks, determine whether the water level ruler is vertical; if the water level ruler is vertical, record the large scale marks and small scale marks of the water level ruler in the water level monitoring image to be identified.

[0026] As a possible implementation of this embodiment, the step S5, using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, to obtain a water surface segmentation result, includes:

[0027] Step S51, checking whether there is water surface in the water level gauge detection frame of the water level monitoring image to be identified, if yes, proceeding to the next step, otherwise abandoning the water level monitoring image to be identified;

[0028] Step S52: using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, and recording the position of the water surface in the water level monitoring image to be identified.

[0029] As a possible implementation of this embodiment, the step S6, combining the target recognition result and the water surface segmentation result to calculate the water level to obtain the water level reading of the water level monitoring image to be recognized, includes:

[0030] Step S61, obtaining image information above the water surface in the water level monitoring image to be identified;

[0031] Step S62, using the water surface mask to calculate the distance min_distance between the large scale mark and the water surface:

[0032]

[0033] Where (x, y) is the coordinate of the lower right corner of the large scale mark, i, j is the coordinate of the pixel with a value of 1 in the water surface mask, representing the position of the water surface;

[0034] Step S63, calculating the actual distance represented by each pixel according to the small scale mark;

[0035] Step S64, obtaining the water level value of the large scale mark through the digital detection result in the large scale mark detection frame;

[0036] Step S65, calculate the water level WaterLeval:

[0037] WaterLeval=H big -d×r

[0038] In the formula, H big represents the water level value of the large scale mark, d is the shortest distance from the lower right corner coordinate of the large scale mark to the water surface mask, and r is the actual distance represented by each pixel, which is determined based on the distance between the small scale marks.

[0039] In a second aspect, an embodiment of the present invention provides a water gauge reading recognition device based on a drone perspective, comprising:

[0040] A data set construction module is used to obtain water level monitoring images taken by a drone and construct a data set, wherein the data set includes a training set and a validation set;

[0041] A model building and training module, which is used to build a target detection model and a water surface semantic segmentation model, and use a training set to train the model. The target detection model is used to identify the water level gauge, numbers and scale marks in the water level monitoring image, and the water surface semantic segmentation model is used to perform semantic segmentation on the water surface in the water level monitoring image;

[0042] Model verification module, used to verify the trained object detection model and water surface semantic segmentation model using the verification set;

[0043] The target recognition module is used to obtain the water level monitoring image to be identified taken by the drone, and use the verified target detection model to identify the water level gauge, numbers and scale marks in the water level monitoring image to be identified to obtain the target recognition result;

[0044] A water surface segmentation module, which is used to perform semantic segmentation on the water surface in the water level monitoring image to be identified using the verified water surface semantic segmentation model to obtain a water surface segmentation result;

[0045] The water level calculation module is used to calculate the water level by combining the target recognition result and the water surface segmentation result to obtain the water level reading of the water level monitoring image to be identified.

[0046] In a third aspect, an embodiment of the present invention provides a computer device, comprising a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the computer device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform any step of the above-mentioned water gauge reading identification method based on the perspective of an unmanned aerial vehicle.

[0047] In a fourth aspect, an embodiment of the present invention provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned water gauge reading recognition methods based on the perspective of an unmanned aerial vehicle are executed.

[0048] The beneficial effects of the technical solution of the embodiment of the present invention are as follows:

[0049] The technical solution of the embodiment of the present invention is a method for identifying water level gauge readings based on the perspective of a drone. By combining target detection and water surface segmentation technology, the water level reading recognition process is optimized. It does not rely on small scales or small digital marks on the water level gauge that are easily contaminated, but is achieved by accurately identifying large scale marks and their numbers; by evaluating the shooting angle and water surface position of the water level gauge, the accuracy of water level calculation is effectively improved, so that the water level can be accurately read in the drone image even when the water level gauge is partially contaminated or blocked. The present invention improves the accuracy of water level readings and the efficiency of the processing flow, and is particularly suitable for water level monitoring in complex and extreme environments.

[0050] The present invention does not rely on identifying the 'E'-shaped mark on the water gauge that is easily contaminated or the small numbers in the small scale marks. Instead, it is achieved by identifying the large and small scale marks of the water gauge and the large numbers in the large scale marks, and combining them with the water surface segmentation technology. It can achieve pixel-level water level monitoring accuracy in complex environments, and is particularly suitable for water level monitoring in complex environments.

[0051] The present invention uses a target detection model to accurately identify the water level gauge, numbers and scale marks in the images taken by the drone, and evaluates the shooting angle of the water level gauge to confirm whether it is vertical, and then uses the segmentation model to perform water surface segmentation, which significantly improves the computational efficiency of the algorithm; combining the water surface segmentation results and the number recognition results, high-precision water level calculation is performed, which can maintain high-precision reading recognition under harsh environmental conditions and when the water level gauge is damaged.

[0052] A device for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to the technical solution of an embodiment of the present invention has the same beneficial effects as a method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to the technical solution of an embodiment of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1is a flow chart of a method for identifying water gauge readings based on a drone's perspective according to an exemplary embodiment;

[0054] Figure 2 is a schematic structural diagram of a device for identifying water gauge readings based on the perspective of a drone according to an exemplary embodiment;

[0055] Figure 3 It is a schematic diagram of a water level gauge according to an exemplary embodiment. DETAILED DESCRIPTION

[0056] In order to more clearly illustrate the technical features of the solution of the present invention, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings.

[0057] like Figure 1 As shown, a method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle provided by an embodiment of the present invention includes the following steps:

[0058] Step S1, obtaining water level monitoring images taken by a drone and constructing a data set, wherein the data set includes a training set and a validation set;

[0059] Step S2, establishing a target detection model and a water surface semantic segmentation model, and using the training set to train the models, the target detection model is used to identify the water level gauge, numbers and scale marks in the water level monitoring image, and the water surface semantic segmentation model is used to perform semantic segmentation on the water surface in the water level monitoring image;

[0060] Step S3, using the validation set to validate the trained object detection model and water surface semantic segmentation model;

[0061] Step S4, obtaining the water level monitoring image to be identified taken by the drone, using the verified target detection model to identify the water level gauge, numbers and scale marks in the water level monitoring image to be identified, and obtaining the target recognition result;

[0062] Step S5, using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, to obtain a water surface segmentation result;

[0063] Step S6, calculating the water level by combining the target recognition result and the water surface segmentation result, and obtaining the water level reading of the water level monitoring image to be recognized.

[0064] As a possible implementation of this embodiment, the step S1, obtaining a water level monitoring image taken by a drone and constructing a data set, includes:

[0065] Step S11, marking water level gauges in a large number of water level monitoring images taken by drones as a target detection data set, wherein the water level gauge markings include a water level gauge, a large scale mark, a small scale mark, and numbers "0" to "9";

[0066] Step S12: annotating water surface areas in a large number of water level monitoring images taken by drones as a water surface segmentation data set.

[0067] As a possible implementation of this embodiment, the step S2, establishing a target detection model and a water surface semantic segmentation model, and using a training set to perform model training, includes:

[0068] Step S21, training the target detection model using the YOLOv10 algorithm based on the target detection data set to obtain a trained target detection model;

[0069] Step S22, training the water surface semantic segmentation model using the Swin-Transformer algorithm based on the water surface segmentation data set to obtain a trained water surface semantic segmentation model.

[0070] As a possible implementation of this embodiment, the step S3, using the verification set to verify the trained object detection model and the water surface semantic segmentation model, includes:

[0071] Step S31, using the validation set in the target detection data set to test the trained target detection model, and based on the test results, iteratively optimizing the trained target detection model, adjusting the hyperparameters, and obtaining a verified target detection model;

[0072] Step S32, using the verification set in the water surface segmentation dataset to test the trained water surface semantic segmentation model, based on the test results, iteratively optimize the trained water surface semantic segmentation model, adjust the hyperparameters, and obtain a verified water surface semantic segmentation model.

[0073] As a possible implementation of this embodiment, in step S4, the water level monitoring image to be identified taken by the drone is obtained, and the water level gauge, numbers and scale marks in the water level monitoring image to be identified are identified using the verified target detection model to obtain a target recognition result;

[0074] Step S41, using the verified target detection model to analyze the water level monitoring image to be identified, and determining whether the water level monitoring image to be identified contains a water level gauge, a large scale mark, and at least two small scale marks at the same time. If yes, proceed to the next step; otherwise, abandon the water level monitoring image to be identified;

[0075] Step S42, by comparing the center point distance between two small scale marks in the water level monitoring image to be identified with the average width of the small scale marks, determine whether the water level ruler is vertical; if the water level ruler is vertical, record the large scale marks and small scale marks of the water level ruler in the water level monitoring image to be identified.

[0076] As a possible implementation of this embodiment, the step S5, using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, to obtain a water surface segmentation result, includes:

[0077] Step S51, checking whether there is water surface in the water level gauge detection frame of the water level monitoring image to be identified, if yes, proceeding to the next step, otherwise abandoning the water level monitoring image to be identified;

[0078] Step S52: using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, and recording the position of the water surface in the water level monitoring image to be identified.

[0079] As a possible implementation of this embodiment, the step S6, combining the target recognition result and the water surface segmentation result to calculate the water level to obtain the water level reading of the water level monitoring image to be recognized, includes:

[0080] Step S61, obtaining image information above the water surface in the water level monitoring image to be identified;

[0081] Step S62, using the water surface mask to calculate the distance min_distance between the large scale mark and the water surface:

[0082]

[0083] Where (x, y) is the coordinate of the lower right corner of the large scale mark, i, j is the coordinate of the pixel with a value of 1 in the water surface mask, representing the position of the water surface;

[0084] Step S63, calculating the actual distance represented by each pixel according to the small scale mark;

[0085] Step S64, obtaining the water level value of the large scale mark through the digital detection result in the large scale mark detection frame;

[0086] Step S65, calculate the water level WaterLeval:

[0087] WaterLeval=H big -d×r

[0088] In the formula, H bigrepresents the water level value of the large scale mark, d is the shortest distance from the lower right corner coordinate of the large scale mark to the water surface mask, and r is the actual distance represented by each pixel, which is determined based on the distance between the small scale marks.

[0089] In a second aspect, an embodiment of the present invention provides a water gauge reading recognition device based on a drone perspective, comprising:

[0090] A data set construction module is used to obtain water level monitoring images taken by a drone and construct a data set, wherein the data set includes a training set and a validation set;

[0091] A model building and training module, which is used to build a target detection model and a water surface semantic segmentation model, and use a training set to train the model. The target detection model is used to identify the water level gauge, numbers and scale marks in the water level monitoring image, and the water surface semantic segmentation model is used to perform semantic segmentation on the water surface in the water level monitoring image;

[0092] Model verification module, used to verify the trained object detection model and water surface semantic segmentation model using the verification set;

[0093] The target recognition module is used to obtain the water level monitoring image to be identified taken by the drone, and use the verified target detection model to identify the water level gauge, numbers and scale marks in the water level monitoring image to be identified to obtain the target recognition result;

[0094] A water surface segmentation module, which is used to perform semantic segmentation on the water surface in the water level monitoring image to be identified using the verified water surface semantic segmentation model to obtain a water surface segmentation result;

[0095] The water level calculation module is used to calculate the water level by combining the target recognition result and the water surface segmentation result to obtain the water level reading of the water level monitoring image to be identified.

[0096] The present invention mainly involves the following aspects in the process of intelligent recognition of water gauge readings from the perspective of an unmanned aerial vehicle.

[0097] S1: Object detection and water surface semantic segmentation dataset construction and model training.

[0098] S11: Create a target detection dataset: This paper uses 2,000 images taken by drones as target detection datasets. The images cover a variety of climate and lighting conditions to ensure data diversity and model robustness. The dataset is labeled with water level gauges, large scale marks, small scale marks, and numbers from "0" to "9", for a total of 13 categories of targets. Each target is accurately labeled in the image in the form of a bounding box, which contains the location and category information of the target. Figure 3 shown.

[0099] S12: Create a water surface segmentation dataset: The water surface segmentation dataset also uses 2,000 images taken by drones in various environments and conditions. The water surface area in each image is labeled in detail for subsequent model training. The main goal of the labeling is to distinguish between water surface and non-water surface areas so that the model can accurately identify and segment the water surface.

[0100] S13: Model training: YOLOv10 is used to train the target detection model. The model performs well in dealing with complex backgrounds and small target detection, and is suitable for fast and accurate water level target detection in a changing environment. Swin-Transformer is used to train the water surface segmentation model. The model uses the self-attention mechanism of Transformer to better process the contextual information in the image, thereby improving the accuracy and detail performance of the segmentation and better distinguishing the water surface and non-water surface areas.

[0101] S14: Model evaluation and optimization: After the model training is completed, it is evaluated through a series of standardized test images in the validation set to improve the performance and adaptability of the model in practical applications. These test images are independent of the training set and cover a wide range of environmental conditions. Based on the test results, the model is iteratively optimized and the hyperparameters are adjusted to improve the performance and adaptability of the model in practical applications. In the end, the comprehensive mAP of the object detection model is 92.53%, and the mIoU of the semantic segmentation model is 95.76%.

[0102] S2: Detection model reasoning and image usability judgment.

[0103] In the inference phase, the object detection model is first used to analyze the input image to determine whether it is necessary to call the segmentation model for further processing. This strategy can effectively improve the processing efficiency of the input image and only perform in-depth segmentation reasoning on valuable images.

[0104] S21: Based on the results of the detection model, determine whether a water gauge, a large scale mark, and at least two small scale marks exist in the image at the same time to determine the usability of the image. If 1 water gauge, 1 large scale mark, 8 small scale marks, and several numbers are detected at the same time, the judgment condition is met and it is suitable for further analysis. If these key elements are not complete, it means that the shooting target in the image is incomplete, so the image is not suitable for further analysis.

[0105] S22: Evaluate whether the water gauge is vertical by comparing the distance between the center points of the leftmost and rightmost small scale marks in the figure with the average width of the small scale marks. Figure 3The center distance between the leftmost and rightmost small scale marks is 6 pixels, which is less than the average width of the small scale marks of 35 pixels. Therefore, the water level gauge is judged to be vertical and the image is suitable for further analysis. If the water level gauge is not vertical, it means that the camera angle of the drone has not been adjusted properly and the image is not suitable for analysis.

[0106] S3: Segmentation model reasoning and image usability judgment.

[0107] After the segmentation model is inferred, the presence of water surface pixels within the water gauge detection box indicates that the image is suitable for further analysis. If no water surface is detected, it means that the drone has not flown to the intended location and the image is not suitable for analysis.

[0108] S4: Water level calculation.

[0109] S41: First, you need to identify and retain the target that is completely above the water surface, including 1 large scale mark, 7 small scale marks and several numbers. Due to the transparency of water, some underwater targets may also be detected. Therefore, you need to identify and retain the target that is completely above the water surface first.

[0110] S42: Calculate the distance between the large scale mark and the water surface. In this step, the coordinates (x, y) of the lower right corner of the large scale mark are determined by image analysis, and the shortest distance from the coordinate to the water surface is calculated using the water surface mask. The shortest distance from the point (x, y) to the water surface mask is calculated using the following formula:

[0111]

[0112] Among them, i,j are the pixel coordinates with a value of 1 in the water surface mask, representing the location of the water surface. The formula first calculates the square of the Euclidean distance from the point (x,y) to all water surface pixels, then finds the minimum value among these distances and calculates its square root to get the shortest distance. The calculation shows that the distance between the large scale mark and the water surface is 447 pixels.

[0113] S43: The height difference between two adjacent small scale marks is 1 meter. Since the average height difference between small scale marks is 65 pixels, the actual distance represented by each pixel is 0.0154 meters.

[0114] S44: The water level value of the large scale mark is obtained by the digital detection result in the large scale mark detection frame, which is 606 meters.

[0115] S45: The water level value of the large scale mark, the shortest pixel distance from the large scale mark to the water surface and the actual distance represented by the pixel are combined to calculate the final water level. The final water level can be calculated by the following formula:

[0116] WaterLeval=H big-d×r

[0117] Where: H big It indicates that the water level value of the large scale mark is 606 meters, d is the shortest distance from the lower right corner coordinate of the large scale mark to the water surface mask, which is 447 pixels, and r is the actual distance represented by each pixel, which is 0.0154 meters.

[0118] Therefore, the water level calculation result of this embodiment is 599.12 meters.

[0119] Compared with the prior art, the present invention has the following characteristics:

[0120] 1) The present invention is particularly suitable for water level monitoring in harsh environments and can accurately identify water levels even when the water gauge is soiled or partially blocked, providing a more reliable water level monitoring solution than the prior art.

[0121] 2) This method is optimized for the characteristics of UAV images. The water surface segmentation model is called only after the water level gauge is confirmed to be vertical, avoiding a comprehensive analysis of all images, thereby reducing unnecessary calculations and significantly improving the efficiency of the processing flow and the response speed of the UAV system.

[0122] In summary, the present invention has stronger robustness and higher efficiency than the prior art, and these advantages will provide a more reliable and stable solution for public safety in waters.

[0123] A computer device provided by an embodiment of the present invention includes a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to perform any step of the above-mentioned water gauge reading identification method based on the perspective of an unmanned aerial vehicle.

[0124] Specifically, the above-mentioned memory and processor can be general-purpose memory and processor, which are not specifically limited here. When the processor runs the computer program stored in the memory, the above-mentioned water level reading recognition method based on the drone perspective can be executed.

[0125] Corresponding to the method for starting the above-mentioned application, an embodiment of the present invention further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for identifying water level readings based on the perspective of an unmanned aerial vehicle are executed.

[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle, characterized in that: The steps include: Step S1, obtaining water level monitoring images taken by a drone and constructing a data set, wherein the data set includes a training set and a validation set; Step S2, establishing a target detection model and a water surface semantic segmentation model, and using the training set to train the models, the target detection model is used to identify the water level gauge, numbers and scale marks in the water level monitoring image, and the water surface semantic segmentation model is used to perform semantic segmentation on the water surface in the water level monitoring image; Step S3, using the validation set to validate the trained object detection model and water surface semantic segmentation model; Step S4, obtaining the water level monitoring image to be identified taken by the drone, using the verified target detection model to identify the water level gauge, numbers and scale marks in the water level monitoring image to be identified, and obtaining the target recognition result; Step S5, using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, to obtain a water surface segmentation result; Step S6, calculating the water level by combining the target recognition result and the water surface segmentation result, and obtaining the water level reading of the water level monitoring image to be recognized.

2. The method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to claim 1 is characterized in that: The step S1, obtaining water level monitoring images taken by a drone and constructing a data set, includes: Step S11, marking water level gauges in a large number of water level monitoring images taken by drones as a target detection data set, wherein the water level gauge markings include a water level gauge, a large scale mark, a small scale mark, and numbers "0" to "9"; Step S12: annotating water surface areas in a large number of water level monitoring images taken by drones as a water surface segmentation data set.

3. The method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to claim 2 is characterized in that: The step S2, establishing a target detection model and a water surface semantic segmentation model, and using the training set to perform model training, includes: Step S21, training the target detection model using the YOLOv10 algorithm based on the target detection data set to obtain a trained target detection model; Step S22, training the water surface semantic segmentation model using the Swin-Transformer algorithm based on the water surface segmentation data set to obtain a trained water surface semantic segmentation model.

4. The method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to claim 3 is characterized in that: The step S3, using the verification set to verify the trained target detection model and the water surface semantic segmentation model, includes: Step S31, using the validation set in the target detection data set to test the trained target detection model, and based on the test results, iteratively optimizing the trained target detection model, adjusting the hyperparameters, and obtaining a verified target detection model; Step S32, using the verification set in the water surface segmentation dataset to test the trained water surface semantic segmentation model, based on the test results, iteratively optimize the trained water surface semantic segmentation model, adjust the hyperparameters, and obtain a verified water surface semantic segmentation model.

5. The method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to claim 1 is characterized in that: The step S4 is to obtain the water level monitoring image to be identified taken by the drone, and use the verified target detection model to identify the water level gauge, numbers and scale marks in the water level monitoring image to be identified to obtain the target recognition result; Step S41, using the verified target detection model to analyze the water level monitoring image to be identified, and determining whether the water level monitoring image to be identified contains a water level gauge, a large scale mark, and at least two small scale marks at the same time. If yes, proceed to the next step; otherwise, abandon the water level monitoring image to be identified; Step S42, by comparing the center point distance between two small scale marks in the water level monitoring image to be identified with the average width of the small scale marks, determine whether the water level ruler is vertical; if the water level ruler is vertical, record the large scale marks and small scale marks of the water level ruler in the water level monitoring image to be identified.

6. The method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to claim 5 is characterized in that: The step S5, using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, to obtain a water surface segmentation result, includes: Step S51, checking whether there is water surface in the water level gauge detection frame of the water level monitoring image to be identified, if yes, proceeding to the next step, otherwise abandoning the water level monitoring image to be identified; Step S52: using the verified water surface semantic segmentation model to perform semantic segmentation on the water surface in the water level monitoring image to be identified, and recording the position of the water surface in the water level monitoring image to be identified.

7. The method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle according to any one of claims 1 to 6, characterized in that: The step S6, combining the target recognition result and the water surface segmentation result to calculate the water level, and obtaining the water level reading of the water level monitoring image to be recognized, includes: Step S61, obtaining image information above the water surface in the water level monitoring image to be identified; Step S62, using the water surface mask to calculate the distance min_distance between the large scale mark and the water surface: Where (x, y) is the coordinate of the lower right corner of the large scale mark, i, j is the coordinate of the pixel with a value of 1 in the water surface mask, representing the position of the water surface; Step S63, calculating the actual distance represented by each pixel according to the small scale mark; Step S64, obtaining the water level value of the large scale mark through the digital detection result in the large scale mark detection frame; Step S65, calculate the water level WaterLeval: WaterLeval=H big -d×r In the formula, H big represents the water level value of the large scale mark, d is the shortest distance from the lower right corner coordinate of the large scale mark to the water surface mask, and r is the actual distance represented by each pixel, which is determined based on the distance between the small scale marks.

8. A water gauge reading recognition device based on the perspective of an unmanned aerial vehicle, characterized in that: include: A data set construction module is used to obtain water level monitoring images taken by a drone and construct a data set, wherein the data set includes a training set and a validation set; A model building and training module, which is used to build a target detection model and a water surface semantic segmentation model, and use a training set to train the model. The target detection model is used to identify the water level gauge, numbers and scale marks in the water level monitoring image, and the water surface semantic segmentation model is used to perform semantic segmentation on the water surface in the water level monitoring image; Model verification module, used to verify the trained object detection model and water surface semantic segmentation model using the verification set; The target recognition module is used to obtain the water level monitoring image to be identified taken by the drone, and use the verified target detection model to identify the water level gauge, numbers and scale marks in the water level monitoring image to be identified to obtain the target recognition result; A water surface segmentation module, which is used to perform semantic segmentation on the water surface in the water level monitoring image to be identified using the verified water surface semantic segmentation model to obtain a water surface segmentation result; The water level calculation module is used to calculate the water level by combining the target recognition result and the water surface segmentation result to obtain the water level reading of the water level monitoring image to be identified.

9. A computer device, characterized in that: It includes a processor, a memory and a bus, the memory stores machine-readable instructions executable by the processor, when the computer device is running, the processor and the memory communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the water gauge reading recognition method based on the perspective of an unmanned aerial vehicle as described in any one of claims 1-7.

10. A storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for identifying water gauge readings based on the perspective of an unmanned aerial vehicle as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Water gauge reading identification method based on semantic segmentation

    CN115880571A

  • Unmanned aerial vehicle-based ship water gauge remote measurement method

    CN117036993A

  • Water level identification method based on semantic segmentation and improved target detection model

    CN118262278A

Cited By

  • Unmanned inspection method and system for open-air tailing pond

    CN121884147A