A method for identifying water level based on YOLO network and image registration technology

Through the method based on YOLO network and image registration technology, the problems of low efficiency, low accuracy and high cost in water level identification are solved, and fast and accurate positioning of the water level boundary box is achieved, which is suitable for remote areas that are difficult to handle. Regional monitoring.

CN114663741BActive Publication Date: 2024-10-18SHENZHEN ENERGY STORAGE POWER GENERATION CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210258970.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-16
Publication Date
2024-10-18
Estimated Expiration
2042-03-16

AI Technical Summary

Technical Problem

In the existing technology, water level identification has the problems of low efficiency, low accuracy and high monitoring cost. Moreover, due to the influence of the shooting angle, the image deformation and the ruler position are not fixed, making it difficult to use a linear relationship to obtain the reading of the water level.

Method used

The water level identification method based on YOLO network and image registration technology is adopted. Through data enhancement and feature matching algorithms, images from different perspectives are registered so that they are located in the same coordinate system. Combined with the YOLO network model, the water level can be quickly identified. The bounding box of the liquid surface.

Benefits of technology

It improves the efficiency and accuracy of water level identification, reduces monitoring costs, and solves reading difficulties caused by image deformation and unstable ruler position.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114663741B_ABST
    Figure CN114663741B_ABST
Patent Text Reader

Abstract

The invention discloses a method for identifying water level of accumulated water based on YOLO network and image registration technology, which belongs to the technical field of water level identification of accumulated water, and comprises the following steps: S1, taking out a batch of pictures from a data set, and randomly reading a picture in the batch each time; S2, performing operations such as flipping, scaling, and color gamut change on the picture, and restoring the picture to the original pixel size after the operation is completed; S3, labeling the data set after amplification with Lableme, and sending it to the YOLO network for training; S4, matching the reference image and the thread image with a feature matching algorithm, and mapping the scale information in the reference image to the thread image; S5, calling the YOLO network model trained in S3; S6, calculating the category confidence C of the bounding box, S7, processing and sorting the category confidence; S8, finding the bounding box where the accumulated water level is located according to the confidence. The invention solves the problems of low efficiency, low precision, and high monitoring cost in the existing water level identification project of accumulated water.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of accumulated water level recognition, and in particular relates to an accumulated water level recognition method based on a YOLO network and image registration technology. Background Art

[0002] With the development of artificial intelligence and deep learning, the use of deep learning technology for industrial site monitoring and detection is becoming more and more widespread. In recent years, with the development of urbanization, various places have accelerated the construction of subways and tunnels. Due to the low terrain of the tunnel, there is often a large amount of water accumulation in the low-lying areas of the tunnel. The water accumulation phenomenon seriously affects the safe operation of the tunnel and the strength of the supporting structure. In addition, the water level of the flood control reservoir is also closely related to water conservancy scheduling, people's domestic water, industrial water, and agricultural water. However, the water level to be detected is often distributed in remote areas, with inconvenient transportation, which is not conducive to the identification and monitoring of the water level. The water level not only consumes a lot of manpower and material resources, but also has poor real-time and reliability monitoring.

[0003] Currently, in actual meters, due to the influence of shooting angle, the image will be deformed, the positions of accumulated water and the scale in the scene are not fixed, and it is difficult to use linear relationships to solve the readings of accumulated water. At the same time, the existing accumulated water level identification projects still have problems such as low efficiency, low accuracy and high monitoring costs. Summary of the invention

[0004] The purpose of the present invention is to provide a method for identifying water level of accumulated water based on YOLO network and image registration technology to solve the problems raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solution: a method for identifying water level based on YOLO network and image registration technology, comprising the following steps:

[0006] S1, take a batch of pictures from the dataset and randomly read one picture in the batch each time;

[0007] S2, flip, scale, change the color gamut, etc. on the image, and restore the image to its original pixel size after the operation is completed;

[0008] S3, label the amplified data set with Labelme and send it to the YOLO network for training;

[0009] S4, matching the reference graph and the thread graph using a feature matching algorithm, mapping the scale information in the reference graph to the thread graph;

[0010] S5 calls the YOLO network model trained in S3, reads in the RGB image of water accumulation + ruler of size 676×507, and divides the image into several small grids of size 13×13, where each small grid predicts two bounding boxes, and finally outputs a 13×13×11 matrix, where 11 is 5+5+1, 5 is the center coordinate, length, width and predicted probability value of the bounding box, and 1 represents the number of categories to be predicted in the image;

[0011] S6, calculate the category confidence C of the bounding box, the calculation formula is as follows:

[0012]

[0013] Among them, Pr(Object) represents the probability of whether there is an object in the current bounding box. Indicates the value of the intersection-and-union ratio between the box predicted by the model and the real box where the object is located when there is an object in the bounding box;

[0014] S7, sorting the category confidences, determining a value and category with the largest confidence value in the column of the matrix corresponding to the bounding box, if the value is greater than 0, drawing the category in the image, if the value is less than 0, ignoring it, and continuing until the last bounding box;

[0015] S8, finding the bounding box of the water surface according to the confidence level.

[0016] Preferably, in S2, the actual operation of flipping is: rotating the water accumulation + ruler image from 0 degree to ±45 degrees;

[0017] The actual operation of translation is: translate the water accumulation + ruler image in one direction, fill the remaining space with a constant value, or fill it with random or Gaussian noise, and retain the spatial dimension after image enhancement;

[0018] The actual operation of zooming is to enlarge or reduce the water accumulation + ruler image.

[0019] Preferably, in S4, feature matching includes four parts: feature detection, feature description, feature matching and parameter optimization.

[0020] Preferably, in S4, the step of mapping the scale information in the reference graph to the thread graph is as follows:

[0021] S401, first use the RANSAC algorithm to screen matching points and find a homography matrix that can represent the correspondence between feature points of the thread graph and the reference graph;

[0022] S402, marking the position of the ruler in the reference image and determining the positions of the starting point and the end point;

[0023] S403, mapping the scale information in the reference graph to the thread graph using a homography matrix.

[0024] Preferably, in S4101, the homography matrix describes the pixel correspondence between two images taken at different viewing angles. When the two images are perspective transformed, the homography matrix, that is, the perspective transformation matrix H, is defined as follows:

[0025]

[0026] Then the pixel correspondence between the base image and the thread image is:

[0027] The technical effects and advantages of the present invention are as follows: the method for identifying the accumulated water level based on the YOLO network and the image registration technology transforms images under different viewing angles through the image registration technology so that they are located in the same coordinate system for convenience of subsequent image processing and analysis, thereby solving the problem in the prior art that due to the influence of the shooting angle, the image will be deformed, the positions of the accumulated water and the ruler in the scene are not fixed, and it is difficult to use a linear relationship to solve the reading of the accumulated water. At the same time, the YOLO network model is used to quickly and efficiently find the bounding box of the accumulated water surface, thereby solving the problems of low efficiency, low precision and high monitoring cost in the existing accumulated water level identification project. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a test flow chart of the present invention;

[0029] Figure 2 This is a flowchart of the image registration of the present invention. DETAILED DESCRIPTION

[0030] 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.

[0031] The present invention provides Figure 1 The method for identifying the water level of accumulated water based on the YOLO network and image registration technology shown in the figure comprises the following steps:

[0032] S1, take out a batch of pictures from the dataset and randomly read one picture in the batch each time.

[0033] S2, performs operations such as flipping, scaling, and color gamut change on the image, and restores the image to its original pixel size after the operations are completed.

[0034] Flipping, scaling, and color gamut changes on this image are all data enhancements. When the training data set is feature-rich and evenly distributed, the generalization performance of the deep learning model is better. When the training data set is small, the deep learning model will be underfitted, resulting in poor generalization ability. Although there are many water accumulation detection scenes, the training set shooting workload is large, and the dataset labeling workload is also large. In order to expand the data set and improve the generalization ability of the deep learning model, data augmentation is widely used to expand the data volume of the training set.

[0035] The actual operation of flipping in data enhancement is: rotating the water accumulation + ruler image from 0 to ±45 degrees;

[0036] The actual operation of translation is: translate the water accumulation + ruler image in one direction, fill the remaining space with a constant value, or fill it with random or Gaussian noise, and retain the spatial dimension after image enhancement;

[0037] The constant value here is 0 or 255;

[0038] The actual operation of zooming is to enlarge or reduce the water accumulation + ruler image.

[0039] S3, label the amplified data set with Labelme and send it to the YOLO network for training;

[0040] S4, using a feature matching algorithm to match the reference graph and the thread graph, and mapping the scale information in the reference graph to the thread graph.

[0041] In actual meters, due to the influence of the shooting angle, the image will be deformed, the position of the accumulated water and the scale in the scene is not fixed, and it is difficult to use a linear relationship to solve the reading of the accumulated water. In order to solve this problem, we proposed image registration technology. Image registration technology can transform images from different perspectives so that they are in the same coordinate system to facilitate subsequent image processing and analysis. The feature-based image registration method converts the analysis and processing of the image into the analysis and processing of the image features. Since the amount of data contained in the feature is much smaller than the amount of data of the entire image, and the image features have stronger adaptability to grayscale changes, image geometric deformation, etc., therefore, feature-based image registration technology is a popular image registration technology.

[0042] In this solution, feature matching includes four parts: feature detection, feature description, feature matching and parameter optimization. The feature matching process is as follows: Figure 2 shown.

[0043] The reading program of the water level recognition robot is determined by matching the thread map and the reference map. The RANSAC algorithm is used to screen the matching points and calculate the homography matrix that can represent the correspondence between the thread map and the reference map feature points. The position of the ruler is marked in the reference map and the starting and ending positions are determined. The ruler information in the reference map is mapped to the thread map using the homography matrix.

[0044] The homography matrix describes the pixel correspondence between two images taken at different viewing angles. If the two images are perspective transformed, the homography matrix, that is, the perspective transformation matrix H, is defined as follows:

[0045]

[0046] Then the pixel correspondence between the base image and the thread image is:

[0047] Therefore, at least 4 pairs of matching points are required to obtain the 8 parameters in the homography matrix H, as shown below:

[0048]

[0049] Since there are mismatched points in the feature matching points, the RANSAC algorithm is used to filter the matching points. The principle of removing mismatched points is as follows:

[0050] Each time, select 4 pairs of feature points from all matching points and calculate the homography matrix H;

[0051] Set the distance threshold t, select the homography matrix with the largest number of inliers as the final result, and the distance calculation method is as follows:

[0052]

[0053] Since the homography matrix can represent the pixel correspondence between the base image and the thread image, it is as follows:

[0054]

[0055] Therefore, the position of the ruler in the reference graph is determined, so the information on the ruler can be mapped to the thread graph through the homography matrix.

[0056] S5 calls the YOLO network model trained in S3, reads in an RGB image of water accumulation + ruler of size 676×507, and divides the image into several small grids of size 13×13, where each small grid predicts two bounding boxes. The final output is a 13×13×11 matrix, where 11 is 5+5+1, 5 is the center coordinate, length, width and predicted probability value of the bounding box, and 1 represents the number of categories to be predicted in the image.

[0057] S6, calculate the category confidence C of the bounding box, the calculation formula is as follows:

[0058]

[0059] Among them, Pr(Object) represents the probability of whether there is an object in the current bounding box. Indicates the value of the intersection-over-union ratio between the box predicted by the model and the real box where the object is located when there is an object in the bounding box.

[0060] S7, process and sort the category confidences, determine the value and category with the largest confidence value in the column of the matrix corresponding to the bounding box, if this value is greater than 0, draw this category in the image, if the value is less than 0, ignore it, and continue until the last bounding box.

[0061] S8, finding the bounding box of the water surface according to the confidence level.

[0062] Finally, it should be noted that the above is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for identifying water level based on YOLO network and image registration technology, characterized in that: The following steps are involved: S1, take a batch of pictures from the dataset and randomly read one picture in the batch each time; S2, flip, scale, and change the color gamut of the image, and restore the image to its original pixel size after the operations are completed; S3, label the amplified data set with Labelme and send it to the YOLO network for training; S4, matching the reference graph and the thread graph using a feature matching algorithm, mapping the scale information in the reference graph to the thread graph; S5 calls the YOLO network model trained in S3, reads in the RGB image of water accumulation + ruler of size 676×507, and divides the image into several small grids of size 13×13, where each small grid predicts two bounding boxes, and finally outputs a 13×13×11 matrix, where 11 is 5+5+1, 5 is the center coordinate, length, width and predicted probability value of the bounding box, and 1 represents the number of categories to be predicted in the image; S6, calculate the category confidence C of the bounding box, the calculation formula is as follows: Among them, Pr(Object) represents the probability of whether there is an object in the current bounding box. Indicates the value of the intersection-and-union ratio between the box predicted by the model and the real box where the object is located when there is an object in the bounding box; S7, sorting the category confidences, determining a value and category with the largest confidence value in the column of the matrix corresponding to the bounding box, if the value is greater than 0, drawing the category in the image, if the value is less than 0, ignoring it, and continuing until the last bounding box; S8, finding the bounding box of the water surface according to the confidence level; In S4, the steps of mapping the scale information in the reference graph to the thread graph are as follows: S401, first use the RANSAC algorithm to screen matching points and find a homography matrix that can represent the correspondence between feature points of the thread graph and the reference graph; S402, marking the position of the ruler in the reference image and determining the positions of the starting point and the end point; S403, mapping the scale information in the reference graph to the thread graph using a homography matrix; In S4101, the homography matrix describes the pixel correspondence between two images taken at different viewing angles. When the two images are perspective transformed, the homography matrix, that is, the perspective transformation matrix H, is defined as follows: Then the pixel correspondence between the base image and the thread image is:

2. According to claim 1, a method for identifying water level based on YOLO network and image registration technology is characterized in that: In S2, the actual operation of flipping is: rotating the water accumulation + ruler image from 0 to ±45 degrees; The actual operation of translation is: translate the water accumulation + ruler image in one direction, fill the remaining space with a constant value, or fill it with random or Gaussian noise, and retain the spatial dimension after image enhancement; The actual operation of zooming is to enlarge or reduce the water accumulation + ruler image.

3. The method for identifying water level based on YOLO network and image registration technology according to claim 1 is characterized in that: In S4, feature matching includes four parts: feature detection, feature description, feature matching and parameter optimization.

Citation Information

Patent Citations

  • Touch screen control operation method for deep learning and visual servo of central control room of power plant

    CN111144401A

  • Three-dimension (3D) assisted personalized home object detection

    WO2020155522A1