Semantic line detection-based oil level gauge oil level identification method and device

Directly identifying the oil level line through the semantic line detection network, solving the problem of low detection accuracy of the oil level meter in the prior art, and achieving higher oil level line detection accuracy and simplified calculation process.

CN119131324APending Publication Date: 2024-12-13SHENZHEN TIEYUE ELECTRIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411023163.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-29
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

The existing oil level meter detection technology has problems in the oil level line detection link that the graph cannot be directly positioned after semantic segmentation, the fitting deviation occurs, and the linear detection algorithm is inaccurately read in a changing environment.

Method used

采用基于语义线检测的方法,通过语义线检测网络直接识别油位线,计算油位占比,减少后处理环节,提高检测精度。

Benefits of technology

It improves the detection accuracy of the oil level line, reduces fitting errors, enhances the detection accuracy in variable environments, and simplifies the calculation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119131324A_ABST
    Figure CN119131324A_ABST
Patent Text Reader

Abstract

The invention discloses an oil level gauge oil level recognition method and device based on semantic line detection. The recognition method comprises the steps that an image of an oil level gauge is obtained; target identification is carried out according to the image of the oil level gauge, and a dial plate area image of the oil level gauge and an oil level gauge body image in the image are obtained; the coordinates of an oil level line in the dial plate area image are recognized based on a semantic line detection network, and the total height of the oil level gauge is calculated according to the dial plate body image of the oil level gauge and the oil level line; and calculating an oil level proportion according to the height of the oil level line and the total height of the oil level gauge, and outputting oil level data according to the oil level proportion. The coordinate of the oil level line is directly detected, the oil level line does not need to be fitted, so that the oil level reading precision is improved, the influence of a post-processing link is reduced, the oil level proportion is directly calculated through the height of the oil level line, oil level data are output, and the method is simple, convenient and higher in efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of oil level detection of an oil level gauge, and in particular to an oil level recognition method and device of an oil level gauge based on semantic line detection. Background Art

[0002] When performing intelligent inspections of sensitive areas in substations, if the oil level of the voltage transformer and current transformer oil level gauge under the substation is too low or too high, there is a risk of equipment damage. There are two intelligent detection technologies in the prior art.

[0003] One is an oil level gauge reading algorithm based on target detection and semantic segmentation. Using the segmented result map, a straight line is fitted to the upper edge of the oil area to obtain the segmentation result map of the oil level line, and then the position relationship between the oil level line and the upper and lower limit scale lines is calculated.

[0004] The disadvantage of the above method is that semantic segmentation technology is used in the oil level line detection link. The image after semantic segmentation cannot directly locate the oil level line, and the oil level line needs to be fitted. Moreover, in the scenario of the oil level gauge, this technology often leads to burrs in the segmentation result due to the blurred boundary between the oil-free part and the oil-containing part of the oil level gauge, which will cause deviations in the subsequent oil level line fitting; and this method cannot output the height ratio of the oil level.

[0005] The other is an oil level gauge reading algorithm based on traditional image algorithms. First, feature extraction is performed on the captured image. The feature extraction unit is used to obtain the size, position and direction of feature points in the oil level image and the oil level gauge template image using the SIFT feature extraction method, and the Euclidean distance is used as the similarity measure to obtain the target candidate area of ​​the oil level gauge. The target candidate area is converted to the same size as the oil level gauge template image through affine transformation to obtain the liquid level area image. After the oil level gauge target is located, the oil level gauge target is cropped, and the cropped oil level gauge image is grayed and binarized. The oil level line and the upper and lower limit marking scale lines are detected by using traditional straight line detection algorithms, such as canny edge detection and Hough transform detection of straight lines, and then the positional relationship between the oil level line and the upper and lower limit scale lines is calculated.

[0006] The disadvantage of the above method is that the oil level gauge target in the image is affected by lighting and shooting angle, and when there is a large difference with the template, the target of the oil level gauge cannot be located; and because there is a lot of interference in the oil-free part of the oil gauge, the traditional straight line detection algorithm will detect multiple oil level lines, and the threshold cannot be adaptively adjusted, which often leads to inaccurate oil level readings in changeable outdoor scenes.

[0007] Therefore the prior art needs further development. Summary of the invention

[0008] In view of the above technical problems, the present invention provides an oil level recognition method and device for an oil level gauge based on semantic line detection, which directly detects the oil level line and can improve the detection accuracy of the oil level.

[0009] A first aspect of the present invention provides an oil level recognition method for an oil level gauge based on semantic line detection, comprising:

[0010] Get an image of the oil level gauge;

[0011] Performing target recognition based on the image of the oil level gauge, acquiring a dial area image of the oil level gauge and an image of the oil level gauge body in the image;

[0012] Identify the coordinates of the oil level line in the dial area image based on a semantic line detection network, and calculate the total height of the oil level gauge according to the dial image and the oil level line of the oil level gauge;

[0013] The oil level ratio is calculated according to the height of the oil level line and the total height of the oil level gauge, and the oil level data is output according to the oil level ratio.

[0014] In one embodiment, the performing target recognition according to the image of the oil level gauge to obtain the dial area image of the oil level gauge and the body image of the oil level gauge in the image includes:

[0015] Performing target recognition according to the image of the oil level gauge, obtaining a first recognition frame of a dial area of ​​the oil level gauge, and cropping the image of the oil level gauge according to the first recognition frame to obtain an image of the dial area;

[0016] Target recognition is performed based on the image of the oil level gauge to obtain a second recognition frame of the oil level gauge body, and the image of the oil level gauge is cropped based on the second recognition frame to obtain the image of the oil level gauge body.

[0017] In one embodiment, before acquiring the dial area image of the oil level gauge and the body image of the oil level gauge in the image, the method further includes:

[0018] The dial area image is subjected to difference processing with the oil level gauge body image, and the difference set part of the image is taken as a scale line sub-image, and the scale line sub-image is used to verify the recognition accuracy of the oil level line in the dial area image.

[0019] In one embodiment, before acquiring the dial area image of the oil level gauge and the body image of the oil level gauge in the image, the method further includes:

[0020] The oil level line and the scale lines in the scale line sub-image are annotated using annotation software, and the semantic line coordinates of the oil level line and the semantic line coordinates of the scale lines are obtained based on a semantic line detection network.

[0021] In one embodiment, the calculating the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and outputting the oil level data according to the oil level ratio, further includes:

[0022] The accuracy of current oil level line recognition is determined based on whether the oil level line is between the maximum value and the minimum value of the scale line.

[0023] In one embodiment, judging the accuracy of current oil level line recognition according to whether the oil level line is between the maximum value and the minimum value of the scale line includes:

[0024] Whether the angle between the oil level line and the scale line is less than a preset threshold value is considered to be a false detection. If the angle is less than the preset threshold value, the oil level line is correctly identified. If the angle is not less than the preset threshold value, the oil level line is identified as a false detection and the oil level result is not output;

[0025] When the oil level line is identified correctly, the height of the center point of the oil level line in the dial area is taken as the oil level height, the height of the target frame of the oil level gauge body is taken as the total height, and the corresponding oil level gauge oil level ratio is output.

[0026] In one embodiment, the calculating the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and outputting the oil level data according to the oil level ratio, includes:

[0027] The oil level ratio is calculated according to the height of the center point of the oil level line and the height of the first identification frame of the oil level gauge body.

[0028] A second aspect of the present invention provides an oil level recognition device for an oil level gauge based on semantic line detection, comprising:

[0029] An acquisition module, used for acquiring an image of the oil level gauge;

[0030] A target recognition module, used for performing target recognition based on the image of the oil level gauge, and obtaining a dial area image of the oil level gauge and an image of the oil level gauge body in the image;

[0031] A height calculation module, used for identifying the coordinates of the oil level line in the dial area image based on a semantic line detection network, and calculating the total height of the oil level gauge according to the dial image and the oil level line of the oil level gauge;

[0032] The output module is used to calculate the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and output the oil level data according to the oil level ratio.

[0033] According to a third aspect of the present invention, there is provided an electronic device, comprising:

[0034] At least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method described in the first aspect of the embodiment of the present invention.

[0035] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a computer, the method according to the first aspect of the embodiment of the present invention is executed.

[0036] The present invention directly detects the height of the oil level line, thereby improving the detection accuracy of the oil level line, eliminating the need to fit the oil level line, reducing the impact of post-processing links, and directly using the oil level line height to calculate the oil level ratio and output oil level data, which is simple, convenient and more efficient.

[0037] The upper and lower limit scale lines are detected by using the difference set subgraph method, which improves the accuracy of the alarm. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The figure is a flow chart of an oil level recognition method of an oil level gauge based on semantic line detection in an embodiment of the present invention.

[0039] Figure 2 Schematic diagram of the oil level gauge body in an embodiment of the present invention.

[0040] Figure 3 Schematic diagram of the oil level gauge dial in an embodiment of the present invention.

[0041] Figure 4 Schematic diagram of the oil level gauge scale in an embodiment of the present invention.

[0042] Figure 5 Schematic diagram of a module of an oil level recognition device for an oil level gauge based on semantic line detection in an embodiment of the present invention. DETAILED DESCRIPTION

[0043] 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 those skilled in the art without creative work are within the scope of protection of the present invention.

[0044] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0045] See also Figure 1 The present invention provides an oil level recognition method for an oil level gauge based on semantic line detection, which includes the following steps.

[0046] S10: Acquire an image of the oil level gauge.

[0047] The images corresponding to the oil level gauges of several transformers can be obtained through the preset camera points, and the collected images are RGB color images. Of course, the images corresponding to the oil level gauges of several transformers can also be obtained by drone photography.

[0048] S20: Perform target recognition based on the image of the oil level gauge, and obtain the dial area image of the oil level gauge and the oil level gauge body image in the image.

[0049] Specifically, a target detection model can be used to identify the target of the oil level gauge image. The target detection model can be trained using a YOLOv5 (You Only Look Once) model, which is a target detection model built based on a deep learning framework PyTorch model and is defined by a set of basic neural network parameters and a specific model structure.

[0050] Through on-site collection, network collection and other methods, such as collecting at different times, different weather conditions and different angles to enrich the oil level gauge samples, a sufficient number of oil level gauge image scenes are obtained, and the target frames are annotated in the oil level gauge images through labelme annotation software. The annotated target frame categories are oil level gauge body, full oil level gauge body, empty oil level gauge body and oil level gauge body. The annotated data is used to train the YOLOv5 model to obtain the target detection model.

[0051] The target detection model infers the image of the oil level gauge to obtain the frame coordinates and category of the corresponding target, including: the detection frame of the dial area of ​​the oil level gauge, the detection frame of the oil level gauge body, the dial area image of the oil level gauge, and the oil level gauge body image.

[0052] S30: Identify the coordinates of the oil level line in the dial area image based on the semantic line detection network, and calculate the total height of the oil level gauge according to the dial image and the oil level line of the oil level gauge.

[0053] In an embodiment of the present invention, the semantic line detection network adopts the DeepHough model. The DeepHough model is a semantic line detection model built based on the deep learning framework PyTorch model, and is defined by a set of basic neural network parameters and a specific model structure. The oil level line in the dial area image can be identified through the semantic detection network. Compared with the method of segmenting the oil level gauge using semantic segmentation technology, this method does not require oil level line fitting to detect the oil level line of the oil level gauge, thereby avoiding the influence of the edge burrs of the semantic segmentation map on the oil level line fitting, thereby improving the accuracy of the oil level ratio reading of the oil level gauge. Of course, other straight line detection models can also be used to detect the oil level line.

[0054] In some embodiments, the oil level gauge body and the oil level line are labeled with the oil level line and the scale line through labelme labeling software, and the semantic line detection network can identify and label the oil level gauge body and the oil level line during recognition. In other embodiments, the scale line of the oil level gauge body can also be identified and labeled.

[0055] In an embodiment of the present invention, the total height of the oil level gauge calculated from the oil level gauge body image may also be calculated using the semantic detection network.

[0056] Specifically, it can be calculated by obtaining the coordinate height of the oil level line and the coordinate height of the oil level gauge.

[0057] S40: Calculate the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and output the oil level data according to the oil level ratio.

[0058] For example, the oil level ratio is calculated according to the following formula.

[0059]

[0060] The present invention uses a deep learning-based model in both the target detection and oil level line reading steps of the oil level gauge, so it has a strong generalization ability for the target detection of the oil level gauge in different scenarios, and the detection of the oil level line can also adapt to different environments. The use of the semantic line detection network can accurately detect the oil level line when the oil level line boundary is not obvious, without the need to manually adjust the parameters many times.

[0061] Furthermore, in the above step S20, target recognition is performed based on the image of the oil level gauge to obtain the dial area image of the oil level gauge and the oil level gauge body image in the image, which specifically includes the following steps.

[0062] S21: performing target recognition based on the image of the oil level gauge, obtaining a first recognition frame of a dial area of ​​the oil level gauge, and cropping the image of the oil level gauge based on the first recognition frame to obtain the dial area image.

[0063] S22: performing target recognition according to the image of the oil level gauge, obtaining a second recognition frame of the oil level gauge body, and cropping the image of the oil level gauge according to the second recognition frame to obtain the image of the oil level gauge body.

[0064] The YOLOv5 model is used to identify the dial area and the oil level gauge body, and obtain the corresponding two identification frames. The YOLOv5 model outputs the coordinates of the two identification frames, and the oil level gauge body area and the oil level gauge body area are cropped on the input image; thereby obtaining the oil level gauge body image and the

[0065] Furthermore, before obtaining the dial area image and the oil level gauge body image of the oil level gauge in the image, the oil level gauge body area is subtracted from the oil level gauge body area, the difference set part is taken, and the rest is filled with black pixels, thereby obtaining the dial image and scale line sub-image.

[0066] The scale line sub-image is obtained by taking the difference set between the oil level gauge body area and the dial area of ​​the oil level gauge. Only the scale line area is retained and the dial area with more interference is eliminated, thereby improving the detection accuracy of the scale line. The semantic line detection technology is used on the scale line sub-image to obtain the scale line of the oil level gauge. The scale line and the oil level line are used for mutual verification, which further improves the accuracy of the oil level reading.

[0067] For details, please refer to Figure 2 , Figure 3 and Figure 4 As shown, the dial area image and the oil level gauge body image are subjected to difference processing, and the difference set part of the image is taken as the scale line sub-image, and the scale line sub-image is used to verify the recognition accuracy of the oil level line in the dial area image.

[0068] Figure 2 It is a schematic diagram of the oil level gauge body, which includes the oil level line and scale lines. Figure 3 Schematic diagram of the oil level gauge dial, including the oil level in the black area and the scale lines on the outside. Figure 4It is a schematic diagram of the oil level gauge scale line, which includes the Max scale line and the Min scale line. For the oil area, only the two end points of the oil level line need to be marked. Compared with the prior art of marking the oil area as a polygonal area, the effect is better.

[0069] The present invention adopts the difference set between the oil level gauge body and the oil level gauge dial as a scale line sub-graph, detects the upper and lower limit marking scale lines with the scale line sub-graph, and uses the scale lines and the oil level line for verification.

[0070] At this time, we can use the semantic line detection network to Figure 3 and Figure 4 Since the semantic line detection network training data is annotated by using annotation software to annotate the oil level line and the scale lines in the scale line sub-image, the semantic line coordinates of the oil level line and the semantic line coordinates of the scale lines can be obtained based on the semantic line detection network.

[0071] The semantic line detection network obtains the semantic line coordinates of the oil level gauge dial and the oil level gauge body, where the semantic line coordinates of the oil level gauge dial (i.e., the oil level line) are the endpoint coordinates of the oil level line, and the semantic line coordinates of the oil level gauge body are the endpoint coordinates of the scale line.

[0072] When the scale line and the oil level line are used for verification, the accuracy of the current oil level line recognition is determined based on whether the oil level line is between the maximum value and the minimum value of the scale line.

[0073] Specifically, whether it is a false detection is determined based on whether the angle between the oil level line and the scale line is less than a preset threshold. If the angle is less than the preset threshold, the oil level line is correctly identified; if the angle is not less than the preset threshold, the oil level line is identified as a false detection and the oil level result is not output.

[0074] When the oil level line is correctly identified, the height of the center point of the oil level line in the dial area is taken as the oil level height, the height of the target frame of the oil level gauge body is taken as the total height, and the oil level percentage of the corresponding oil level gauge is output. For example, the oil level percentage is calculated based on the height of the center point of the oil level line and the height of the first identification frame of the oil level gauge body.

[0075] For example, the coordinates of the endpoints of the oil level line and the endpoints of the scale line are compared, and the angle between the oil level line and the scale line is used to determine whether the oil level line is reasonable. If the angle is less than a certain threshold, the oil level line is determined to be reasonable, otherwise it is unreasonable, that is, it is a false detection, and the oil level result is not output; if the oil level line is determined to be reasonable, the height of the center point of the oil level line in the dial area is taken as the oil level height, and the height of the target frame of the oil level gauge dial is taken as the total height, and the oil level ratio of the corresponding oil level gauge is output according to the oil level ratio calculation formula.

[0076] Determine whether the oil level line is between the Max scale line and the Min scale line. If the oil level line is outside the two scale lines, output the corresponding oil level gauge alarm information.

[0077] The present invention obtains a scale line sub-image by taking a difference set between the oil level gauge body area and the dial area of ​​the oil level gauge, retains only the scale line area, eliminates the dial area with more interference, improves the detection accuracy of the scale line, uses semantic line detection technology on the scale line sub-image to obtain the scale line of the oil level gauge, and uses the scale line and the oil level line to verify each other, further improving the accuracy of the oil level reading.

[0078] In the above embodiment of the present invention, the YOLOV5 model obtains the target frame coordinates of the dial area of ​​the oil level gauge and the oil level gauge body. If a full or empty oil level gauge dial is detected, the corresponding oil level gauge oil level is directly output as 100% or 0%. If it is detected that the oil level gauge dial is not full or empty, the above-mentioned image cropping is performed and the oil level ratio of the oil level gauge is calculated.

[0079] See also Figure 5 The present invention also provides an oil level recognition device based on semantic line detection, comprising:

[0080] An acquisition module 51 is used to acquire an image of the oil level gauge;

[0081] A target recognition module 52 is used to perform target recognition based on the image of the oil level gauge, and obtain an image of a dial area of ​​the oil level gauge and an image of the oil level gauge body in the image;

[0082] A height calculation module 53, used for identifying the coordinates of the oil level line in the dial area image based on a semantic line detection network, and calculating the total height of the oil level gauge according to the dial image and the oil level line of the oil level gauge;

[0083] The output module 54 is used to calculate the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and output the oil level data according to the oil level ratio.

[0084] The present invention also provides an electronic device, comprising:

[0085] At least one processor; and at least one memory in communication with the processor, wherein: the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the above-mentioned oil level gauge oil level identification method based on semantic line detection.

[0086] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the oil level identification method of the oil level gauge based on semantic line detection is implemented.

[0087] It can be understood that computer-readable storage media may include: any entity or device capable of carrying a computer program, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc. A computer program includes computer program code. The computer program code may be in source code form, object code form, executable file, or some intermediate form, etc. A computer-readable storage medium may include: any entity or device capable of carrying a computer program code, recording media, USB flash drives, mobile hard disks, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), and software distribution media, etc.

[0088] In certain embodiments of the present invention, the device may include a controller, which is a single-chip microcomputer chip that integrates a processor, a memory, a communication module, etc. The processor may refer to the processor included in the controller. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.

[0089] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present invention belong.

[0090] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0091] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for identifying oil level of an oil level gauge based on semantic line detection, characterized in that: include: Get an image of the oil level gauge; Performing target recognition based on the image of the oil level gauge, acquiring a dial area image of the oil level gauge and an image of the oil level gauge body in the image; Identify the coordinates of the oil level line in the dial area image based on a semantic line detection network, and calculate the total height of the oil level gauge according to the dial image of the oil level gauge and the coordinates of the oil level line; The oil level ratio is calculated according to the height of the oil level line and the total height of the oil level gauge, and the oil level data is output according to the oil level ratio.

2. The oil level recognition method of oil level gauge based on semantic line detection according to claim 1 is characterized in that: The performing target recognition according to the image of the oil level gauge to obtain the dial area image of the oil level gauge and the body image of the oil level gauge in the image includes: Performing target recognition according to the image of the oil level gauge, obtaining a first recognition frame of a dial area of ​​the oil level gauge, and cropping the image of the oil level gauge according to the first recognition frame to obtain an image of the dial area; Target recognition is performed based on the image of the oil level gauge to obtain a second recognition frame of the oil level gauge body, and the image of the oil level gauge is cropped based on the second recognition frame to obtain the image of the oil level gauge body.

3. The oil level recognition method of oil level gauge based on semantic line detection according to claim 2 is characterized in that: Before acquiring the dial area image of the oil level gauge and the body image of the oil level gauge in the image, the method further includes: The dial area image is subjected to difference processing with the oil level gauge body image, and the difference set part of the image is taken as a scale line sub-image, and the scale line sub-image is used to verify the recognition accuracy of the oil level line in the dial area image.

4. The oil level recognition method of oil level gauge based on semantic line detection according to claim 3 is characterized in that: Before acquiring the dial area image of the oil level gauge and the body image of the oil level gauge in the image, the method further includes: The oil level line and the scale lines in the scale line sub-image are annotated using annotation software, and the semantic line coordinates of the oil level line and the semantic line coordinates of the scale lines are obtained based on a semantic line detection network.

5. The oil level recognition method of oil level gauge based on semantic line detection according to claim 4 is characterized in that: The calculating the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and outputting the oil level data according to the oil level ratio, further comprises: The accuracy of current oil level line recognition is determined based on whether the oil level line is between the maximum value and the minimum value of the scale line.

6. The oil level recognition method of oil level gauge based on semantic line detection according to claim 5 is characterized in that: The determining of the accuracy of the current oil level line recognition according to whether the oil level line is between the maximum value and the minimum value of the scale line comprises: Whether the angle between the oil level line and the scale line is less than a preset threshold value is considered to be a false detection. If the angle is less than the preset threshold value, the oil level line is correctly identified. If the angle is not less than the preset threshold value, the oil level line is identified as a false detection and the oil level result is not output; When the oil level line is identified correctly, the height of the center point of the oil level line in the dial area is taken as the oil level height, the height of the target frame of the oil level gauge body is taken as the total height, and the corresponding oil level gauge oil level ratio is output.

7. The oil level recognition method of oil level gauge based on semantic line detection according to claim 5 is characterized in that: The calculating the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and outputting the oil level data according to the oil level ratio, comprises: The oil level ratio is calculated according to the height of the center point of the oil level line and the height of the first identification frame of the oil level gauge body.

8. An oil level recognition device for an oil level gauge based on semantic line detection, characterized in that: include: An acquisition module, used for acquiring an image of the oil level gauge; A target recognition module, used to perform target recognition based on the image of the oil level gauge, and obtain a dial area image of the oil level gauge and an image of the oil level gauge body in the image; A height calculation module, used for identifying the coordinates of the oil level line in the dial area image based on a semantic line detection network, and calculating the total height of the oil level gauge according to the dial image and the oil level line of the oil level gauge; The output module is used to calculate the oil level ratio according to the height of the oil level line and the total height of the oil level gauge, and output the oil level data according to the oil level ratio.

9. An electronic device, characterized in that: include: at least one processor; And at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the oil level identification method of the oil level gauge based on semantic line detection as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the oil level identification method of an oil level gauge based on semantic line detection as claimed in any one of claims 1 to 7 is executed.