Oil window liquid level height identification method and system based on deep learning

Through the oil window liquid level recognition method based on deep learning, using image segmentation and processing technology, the problem of poor performance of traditional liquid level detection sensors in extreme environments is solved, and high-precision and robust liquid level height detection is achieved. .

CN119338889AActive Publication Date: 2025-01-21GUANGDONG KEYSTAR INTELLIGENCE ROBOT CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411265553.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2025-01-21
Estimated Expiration
2044-09-10

AI Technical Summary

Technical Problem

Traditional liquid level detection sensors perform poorly in high temperature and high pressure and complex environments, and are limited in layout, making it difficult to meet the high accuracy and robustness requirements of industrial production.

Method used

Adopt a high degree of recognition method based on deep learning oil window liquid levels. By obtaining the detection image of the oil window, the image segmentation model is used to obtain the mask image of the oil window and liquid level, and the calculation liquid level height is processed through the image processing. Infidosis in the environment.

Benefits of technology

It achieves high-precision liquid level detection under high temperature, high pressure and complex environments, has strong robustness and wide adaptability, and avoids sensor performance degradation and application limitations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119338889A_ABST
    Figure CN119338889A_ABST
Patent Text Reader

Abstract

The invention discloses an oil window liquid level height identification method based on deep learning. The method comprises the following steps: obtaining a detection image of an oil window of to-be-detected equipment; inputting the detection image into an image segmentation model, and obtaining an oil window mask image and a liquid level mask image through the image segmentation model; performing image processing on the oil window mask image and the liquid level mask image to obtain a circle and a straight line; and the liquid level height of the to-be-detected equipment is calculated according to the position relation between the straight line and the circle. According to the method, the segmented mask image is used for obtaining the position relation between the circle and the straight line of the liquid level corresponding to the circular oil sight glass, and the height of the current oil level is obtained. Sensing equipment is not needed for detection, and the problem that a sensor cannot work normally in a high-temperature and high-pressure environment is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to an oil window liquid level height recognition method and system based on deep learning. Background Art

[0002] Liquid level recognition algorithms play an indispensable role in modern industrial production and the storage and transportation of fine chemical raw materials, and their importance is becoming increasingly prominent. This key technology is not only directly related to the automation level and efficiency improvement of the production process, but also has a profound impact on the safety and accuracy of raw material management. Traditionally, liquid level detection mainly relies on various sensors. Although these sensors can work effectively under normal conditions, they are often unable to cope with the extreme environments of high temperature and high pressure, diffuse dust, and humid and changeable storage conditions commonly seen in industrial production. Performance degradation or even failure is very likely to occur. In addition, the layout of sensors is often limited to narrow or specially shaped spaces, further limiting their scope of application and effectiveness.

[0003] In view of this, it is particularly urgent to develop a liquid level recognition algorithm that combines high precision and strong robustness and can maintain excellent stability in complex and changing environments. Summary of the invention

[0004] In view of the above-mentioned defects, the purpose of the present invention is to propose an oil window liquid level height recognition method and system based on deep learning, so as to solve the problem that the sensor cannot normally obtain the equipment liquid level temperature under high temperature and high pressure environment.

[0005] To achieve this purpose, the present invention adopts the following technical solution: a method for identifying the oil window liquid level height based on deep learning, comprising the following steps:

[0006] Acquire a detection image of the oil window of the device to be detected;

[0007] The detection image is input into the image segmentation model, and the oil window mask image and the liquid level mask image are obtained through the image segmentation model;

[0008] Performing image processing on the oil window mask image and the liquid level mask image respectively to obtain a circle and a straight line;

[0009] The liquid level height of the device to be detected is calculated through the positional relationship between the straight line and the circle.

[0010] Preferably, before calling the image segmentation model, the image segmentation model needs to be trained, wherein the training process is as follows:

[0011] Acquire training images in different scenes and under different lighting conditions, wherein the training images include images containing oil windows and images containing liquid levels;

[0012] Label each circular oil sight glass and the polygonal area of ​​the liquid level in the training image using the third-party labeling software Labelme, and label the image with the type name information to obtain the training set images;

[0013] Use the established training set images to train the yolov8s-seg image segmentation network to obtain the trained image segmentation models for oil window mask segmentation and liquid level mask segmentation.

[0014] Preferably, the image processing includes circle processing and line processing;

[0015] The circular processing includes the following steps:

[0016] Performing image morphological opening operation on the oil window mask image to obtain a first image;

[0017] Obtaining a minimum circumscribed circle based on edge point pixels in the first image;

[0018] Taking the minimum circumscribed circle as the circle;

[0019] The straight line processing comprises the following steps:

[0020] Obtain the minimum rotation bounding box in the liquid level mask image as the first bounding box;

[0021] Obtain the side with the smallest angle between the first bounding box and the image in the horizontal direction as the first side;

[0022] Taking the center point of the first side as the base point, the first bounding box is reduced to 1 / 2 of the original size to obtain a first processed bounding box;

[0023] Using a first processing bounding box to intercept the content of the liquid level mask image to obtain a first processing mask image;

[0024] Obtaining a minimum rotation bounding box in the first processed mask image as a second bounding box;

[0025] Get the two sides with the smallest angle between the second bounding box and the vertical plane direction of the image, and use them as the second side and the third side respectively;

[0026] The midpoints of the second side and the third side are obtained respectively, and the midpoints of the second side and the third side are connected to obtain the straight line.

[0027] Preferably, the specific steps of calculating the liquid level height of the device to be detected by the positional relationship between the straight line and the circle are as follows:

[0028] Obtaining the center of the circle;

[0029] Determine whether the straight line passes through the center of the circle. If so, the radius R of the circle is used as the current liquid level height;

[0030] If it does not pass through the center of the circle, obtain the vertical distance D from the straight line to the center of the circle to determine whether the straight line is above the center of the circle. If so, take the radius R of the circle plus the vertical distance D as the current liquid level height; if not, take the radius R of the circle minus the vertical distance D as the current liquid level height.

[0031] A deep learning-based oil window level height recognition system, using the deep learning-based oil window level height recognition method, comprising an acquisition module, a segmentation module, a processing module and a calculation module;

[0032] The acquisition module is used to acquire a detection image of the oil window of the device to be detected;

[0033] The segmentation module is used to input the detection image into the image segmentation model, and obtain the oil window mask image and the liquid level mask image through the image segmentation model;

[0034] The processing module is used to perform image processing on the oil window mask image and the liquid level mask image respectively to obtain a circle and a straight line;

[0035] The calculation module is used to calculate the liquid level height of the device to be detected according to the positional relationship between the straight line and the circle.

[0036] Preferably, it also includes a modeling module;

[0037] The modeling module is used to obtain training images in different scenes and different lighting conditions, wherein the training images include images containing oil windows and images containing liquid levels;

[0038] Label each circular oil sight glass and the polygonal area of ​​the liquid level in the training image using the third-party labeling software Labelme, and label the image with the type name information to obtain the training set images;

[0039] Use the established training set images to train the yolov8s-seg image segmentation network to obtain the trained image segmentation models for oil window mask segmentation and liquid level mask segmentation.

[0040] Preferably, the processing module includes a first processing submodule and a second processing submodule;

[0041] The first processing submodule is used to perform image morphological opening operation on the oil window mask image to obtain a first image;

[0042] Obtaining a minimum circumscribed circle based on edge point pixels in the first image;

[0043] Taking the minimum circumscribed circle as the circle;

[0044] The second processing submodule is used to obtain the minimum rotation bounding box in the liquid level mask image as the first bounding box;

[0045] Obtain the side with the smallest angle between the first bounding box and the image in the horizontal direction as the first side;

[0046] Taking the center point of the first side as the base point, the first bounding box is reduced to 1 / 2 of the original size to obtain a first processed bounding box;

[0047] Using a first processing bounding box to intercept the content of the liquid level mask image to obtain a first processing mask image;

[0048] Obtaining a minimum rotation bounding box in the first processed mask image as a second bounding box;

[0049] Get the two sides with the smallest angle between the second bounding box and the vertical plane direction of the image, and use them as the second side and the third side respectively;

[0050] The midpoints of the second side and the third side are obtained respectively, and the midpoints of the second side and the third side are connected to obtain the straight line.

[0051] Preferably, the calculation module performs the following steps:

[0052] Obtaining the center of the circle;

[0053] Determine whether the straight line passes through the center of the circle. If so, the radius R of the circle is used as the current liquid level height;

[0054] If it does not pass through the center of the circle, obtain the vertical distance D from the straight line to the center of the circle to determine whether the straight line is above the center of the circle. If so, take the radius R of the circle plus the vertical distance D as the current liquid level height; if not, take the radius R of the circle minus the vertical distance D as the current liquid level height.

[0055] One of the above technical solutions has the following advantages or beneficial effects: In the present invention, an image recognition algorithm is used to photograph the oil window through a camera, a camera or other equipment to obtain a detection image. In the present invention, the complex problem of liquid level detection is transformed into a deep learning image segmentation problem. The segmented mask image is used to perform the positional relationship between the circular oil sight glass corresponding to the circle and the straight line of the liquid level to obtain the height of the current oil level. There is no need to use a sensing device for detection, which avoids the problem that the sensor cannot work normally in a high temperature and high pressure environment. BRIEF DESCRIPTION OF THE DRAWINGS

[0056] Figure 1 It is a flow chart of an embodiment of the present invention.

[0057] Figure 2 Schematic diagram of a training picture in one embodiment of the present invention.

[0058] Figure 3 is a schematic diagram of an oil window mask image in one embodiment of the present invention.

[0059] Figure 4 is a schematic diagram of a first bounding box in an embodiment of the present invention.

[0060] Figure 5 is a schematic diagram of a first processing bounding box in one embodiment of the present invention.

[0061] Figure 6 4 is a schematic diagram of a first processing mask image structure in one embodiment of the present invention.

[0062] Figure 7 It is a schematic diagram of the structure of an embodiment of the system of the present invention. DETAILED DESCRIPTION

[0063] The embodiments of the present invention are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals represent the same or similar elements or elements having the same or similar functions from beginning to end. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.

[0064] In the description of the embodiments of the present invention, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0065] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, unless otherwise specified, the meaning of "plurality" is two or more. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0066] like Figures 1 to 7 As shown, a method for identifying the oil window liquid level height based on deep learning includes the following steps:

[0067] Acquire a detection image of the oil window of the device to be detected;

[0068] The detection image is input into the image segmentation model, and the oil window mask image and the liquid level mask image are obtained through the image segmentation model;

[0069] Performing image processing on the oil window mask image and the liquid level mask image respectively to obtain a circle and a straight line;

[0070] The liquid level height of the device to be detected is calculated through the positional relationship between the straight line and the circle.

[0071] The present invention adopts an image recognition algorithm, and uses a camera, a video camera and other equipment to shoot the oil window to obtain a detection image. The present invention transforms the complex problem of liquid level detection into a deep learning image segmentation problem. The segmented mask image is used to obtain the circle corresponding to the circular oil sight glass and the straight line corresponding to the liquid level, and then the current oil level is obtained through the geometric position relationship between the circle and the straight line. There is no need to use a sensing device for detection, which avoids the problem of the sensor not being able to work normally under high temperature and high pressure environment.

[0072] On the other hand, using the technical solution of the present invention, the acquired detection image can be sent to the detection personnel, who can perform remote review based on the detection image and the calculated liquid level height, thus providing further guarantee for the oil window liquid level detection.

[0073] Preferably, before calling the image segmentation model, the image segmentation model needs to be trained, wherein the training process is as follows:

[0074] Acquire training images in different scenes and under different lighting conditions, wherein the training images include images containing oil windows and images containing liquid levels;

[0075] Label each circular oil sight glass and the polygonal area of ​​the liquid level in the training image using the third-party labeling software Labelme, and label the image with the type name information to obtain the training set images;

[0076] Use the established training set images to train the yolov8s-seg image segmentation network to obtain the trained image segmentation models for oil window mask segmentation and liquid level mask segmentation.

[0077] like Figure 2 As shown, by collecting training images in different scenes and different lighting conditions, the model can learn the oil window and liquid level characteristics in various complex environments. This diversity ensures the wide adaptability and robustness of the model in practical applications.

[0078] At the same time, the YOLO8S-SEG image segmentation network is used for training, which combines the speed and efficiency of the YOLO series in the field of target detection with the accuracy of image segmentation technology. This enables the model to achieve high-precision oil window and liquid level mask segmentation while maintaining real-time processing speed.

[0079] It is worth noting that in order to improve the accuracy of liquid level mask segmentation, when obtaining training images, different transparent containers can be used to load liquids, and then images are taken to obtain corresponding training images, so that the image segmentation model can effectively analyze the influence of light under different transparent containers, thereby better identifying the liquid level mask.

[0080] Preferably, the image processing includes circle processing and line processing;

[0081] The circular processing includes the following steps:

[0082] Performing image morphological opening operation on the oil window mask image to obtain a first image;

[0083] Obtaining a minimum circumscribed circle based on edge point pixels in the first image;

[0084] Taking the minimum circumscribed circle as the circle;

[0085] In the present invention, the burrs in the oil window mask image are removed by opening the image morphology, making the region boundary smoother, thereby reducing the influence of the burrs in the subsequent minimum circumscribed circle calculation. Figure 3 The first image is shown. Since there are depressions and protrusions in the mask image, although some burrs are removed by opening operation, it is still difficult to confirm the center of the image in this image.

[0086] The edge in the first image can be obtained by fitting, and then 3 points are randomly selected on the edge point to obtain the circumscribed circle, and then different points are repeatedly changed to continue to obtain the circumscribed circle. After obtaining multiple circumscribed circles, the circumscribed circle with the smallest area is obtained, and the smallest circumscribed circle is used as the circle. The final minimum circumscribed circle can intuitively represent the circular boundary of the oil window, which is convenient for subsequent analysis and processing.

[0087] The straight line processing comprises the following steps:

[0088] Obtain the minimum rotation bounding box in the liquid level mask image as the first bounding box;

[0089] Obtain the side with the smallest angle between the first bounding box and the image in the horizontal direction as the first side;

[0090] Taking the center point of the first side as the base point, the first bounding box is reduced to 1 / 2 of the original size to obtain a first processed bounding box;

[0091] Using a first processing bounding box to intercept the content of the liquid level mask image to obtain a first processing mask image;

[0092] Obtaining a minimum rotation bounding box in the first processed mask image as a second bounding box;

[0093] Get the two sides with the smallest angle between the second bounding box and the vertical plane direction of the image, and use them as the second side and the third side respectively;

[0094] The midpoints of the second side and the third side are obtained respectively, and the midpoints of the second side and the third side are connected to obtain the straight line.

[0095] like Figure 4 The first bounding box is shown. In the first bounding box, the liquid level mask image may be affected by the light refraction of the transparent container during recognition. Therefore, the recognized liquid level mask image is not a horizontal straight line. Therefore, the liquid level mask image needs to be fitted so that the liquid level mask image is close to the real straight line of the liquid level.

[0096] Therefore, in the present invention, the side with the smallest angle between the first bounding box and the image in the horizontal direction is first obtained as the first side. Since the first side is a horizontal line, the first bounding box is reduced by the horizontal line to obtain the first processed bounding box, such as Figure 5 The liquid level mask image is intercepted by the first processing bounding box to obtain the first processing mask image, as shown in FIG. Figure 6 As shown, at this time, due to the horizontal scaling and interception, the influence of the liquid level masks on the left and right sides is reduced, so that the first processed mask image approaches a straight line segment;

[0097] After obtaining the first processing mask image, continue to obtain its minimum rotation bounding box, and search for the minimum rotation bounding box (second bounding box) again in the reduced bounding box, so as to locate the specific shape of the liquid level more quickly and avoid time-consuming searching in the entire image. Then, select the second side and the third side in the vertical direction, and obtain a straight line by connecting the midpoints of the second side and the third side. The straight line can better reflect the direction or trend of the liquid level. Even when the shape of the first processing mask image is not close to a straight line segment, the straight line obtained by the midpoints of the second side and the third side can remain stable, so that the straight line can effectively and correctly feedback the position of the equipment liquid level.

[0098] It is worth mentioning that the present invention enhances the robustness of the algorithm by finding the minimum rotation bounding box to adapt to liquid level images at different angles. The acquisition of the minimum rotation bounding box and image cropping can be implemented by tools in existing image processing libraries (such as OpenCV).

[0099] Preferably, the specific steps of calculating the liquid level height of the device to be detected by the positional relationship between the straight line and the circle are as follows:

[0100] Obtaining the center of the circle;

[0101] Determine whether the straight line passes through the center of the circle. If so, the radius R of the circle is used as the current liquid level height;

[0102] If it does not pass through the center of the circle, obtain the vertical distance D from the straight line to the center of the circle to determine whether the straight line is above the center of the circle. If so, take the radius R of the circle plus the vertical distance D as the current liquid level height; if not, take the radius R of the circle minus the vertical distance D as the current liquid level height.

[0103] When a circle and a straight line are obtained, the height of the oil level can be accurately calculated by calculating the geometric relationship between the straight line (representing the oil level line) and the circle (representing the container cross section). The present invention obtains the liquid level height by a geometric method. Compared with other empirical calculations or image information calculations, the geometric method has an intuitive algorithm and high accuracy. The method has a relatively small amount of calculation and can quickly obtain the liquid level height.

[0104] A deep learning-based oil window level height recognition system, using the deep learning-based oil window level height recognition method, comprising an acquisition module, a segmentation module, a processing module and a calculation module;

[0105] The acquisition module is used to acquire a detection image of the oil window of the device to be detected;

[0106] The segmentation module is used to input the detection image into the image segmentation model, and obtain the oil window mask image and the liquid level mask image through the image segmentation model;

[0107] The processing module is used to perform image processing on the oil window mask image and the liquid level mask image respectively to obtain a circle and a straight line;

[0108] The calculation module is used to calculate the liquid level height of the device to be detected according to the positional relationship between the straight line and the circle.

[0109] Preferably, it also includes a modeling module;

[0110] The modeling module is used to obtain training images in different scenes and different lighting conditions, wherein the training images include images containing oil windows and images containing liquid levels;

[0111] Label each circular oil sight glass and the polygonal area of ​​the liquid level in the training image using the third-party labeling software Labelme, and label the image with the type name information to obtain the training set images;

[0112] Use the established training set images to train the yolov8s-seg image segmentation network to obtain the trained image segmentation models for oil window mask segmentation and liquid level mask segmentation.

[0113] Preferably, the processing module includes a first processing submodule and a second processing submodule;

[0114] The first processing submodule is used to perform image morphological opening operation on the oil window mask image to obtain a first image;

[0115] Obtaining a minimum circumscribed circle based on edge point pixels in the first image;

[0116] Taking the minimum circumscribed circle as the circle;

[0117] The second processing submodule is used to obtain the minimum rotation bounding box in the liquid level mask image as the first bounding box;

[0118] Obtain the side with the smallest angle between the first bounding box and the image in the horizontal direction as the first side;

[0119] Taking the center point of the first side as the base point, the first bounding box is reduced to 1 / 2 of the original size to obtain a first processed bounding box;

[0120] Using a first processing bounding box to intercept the content of the liquid level mask image to obtain a first processing mask image;

[0121] Obtaining a minimum rotation bounding box in the first processed mask image as a second bounding box;

[0122] Get the two sides with the smallest angle between the second bounding box and the vertical plane direction of the image, and use them as the second side and the third side respectively;

[0123] The midpoints of the second side and the third side are obtained respectively, and the midpoints of the second side and the third side are connected to obtain the straight line.

[0124] Preferably, the calculation module performs the following steps:

[0125] Obtaining the center of the circle;

[0126] Determine whether the straight line passes through the center of the circle. If so, the radius R of the circle is used as the current liquid level height;

[0127] If it does not pass through the center of the circle, obtain the vertical distance D from the straight line to the center of the circle to determine whether the straight line is above the center of the circle. If so, take the radius R of the circle plus the vertical distance D as the current liquid level height; if not, take the radius R of the circle minus the vertical distance D as the current liquid level height.

[0128] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0129] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.

Claims

1. A method for identifying oil window liquid level height based on deep learning, characterized in that: The steps include: Acquire a detection image of the oil window of the device to be detected; The detection image is input into the image segmentation model, and the oil window mask image and the liquid level mask image are obtained through the image segmentation model; Performing image processing on the oil window mask image and the liquid level mask image respectively to obtain a circle and a straight line; The liquid level height of the device to be detected is calculated through the positional relationship between the straight line and the circle.

2. The method for identifying the oil window level based on deep learning according to claim 1, characterized in that: Before calling the image segmentation model, the image segmentation model needs to be trained. The training process is as follows: Acquire training images in different scenes and under different lighting conditions, wherein the training images include images containing oil windows and images containing liquid levels; Label each circular oil sight glass and the polygonal area of ​​the liquid level in the training image using the third-party labeling software Labelme, and label the image with the type name information to obtain the training set images; Use the established training set images to train the yolov8s-seg image segmentation network to obtain the trained image segmentation models for oil window mask segmentation and liquid level mask segmentation.

3. The method for identifying the oil window level based on deep learning according to claim 1, characterized in that: The image processing includes circle processing and straight line processing; The circular processing includes the following steps: Performing image morphological opening operation on the oil window mask image to obtain a first image; Obtaining a minimum circumscribed circle based on edge point pixels in the first image; Taking the minimum circumscribed circle as the circle; The straight line processing comprises the following steps: Obtain the minimum rotation bounding box in the liquid level mask image as the first bounding box; Obtain the side with the smallest angle between the first bounding box and the image in the horizontal direction as the first side; Taking the center point of the first side as the base point, the first bounding box is reduced to 1 / 2 of the original size to obtain a first processed bounding box; Using a first processing bounding box to intercept the content of the liquid level mask image to obtain a first processing mask image; Obtaining a minimum rotation bounding box in the first processed mask image as a second bounding box; Get the two sides with the smallest angle between the second bounding box and the vertical plane direction of the image, and use them as the second side and the third side respectively; The midpoints of the second side and the third side are obtained respectively, and the midpoints of the second side and the third side are connected to obtain the straight line.

4. The method for identifying oil window level height based on deep learning according to claim 1, characterized in that: The specific steps of calculating the liquid level height of the device to be detected by the positional relationship between the straight line and the circle are as follows: Obtaining the center of the circle; Determine whether the straight line passes through the center of the circle. If so, the radius R of the circle is used as the current liquid level height; If it does not pass through the center of the circle, obtain the vertical distance D from the straight line to the center of the circle to determine whether the straight line is above the center of the circle. If so, take the radius R of the circle plus the vertical distance D as the current liquid level height; if not, take the radius R of the circle minus the vertical distance D as the current liquid level height.

5. An oil window level recognition system based on deep learning, characterized in that: The oil window level height recognition method based on deep learning according to any one of claims 1 to 4 comprises an acquisition module, a segmentation module, a processing module and a calculation module; The acquisition module is used to acquire a detection image of the oil window of the device to be detected; The segmentation module is used to input the detection image into the image segmentation model, and obtain the oil window mask image and the liquid level mask image through the image segmentation model; The processing module is used to perform image processing on the oil window mask image and the liquid level mask image respectively to obtain a circle and a straight line; The calculation module is used to calculate the liquid level height of the device to be detected according to the positional relationship between the straight line and the circle.

6. The oil window level recognition system based on deep learning according to claim 5, characterized in that: Also includes modeling modules; The modeling module is used to obtain training images in different scenes and different lighting conditions, wherein the training images include images containing oil windows and images containing liquid levels; Label each circular oil sight glass and the polygonal area of ​​the liquid level in the training image using the third-party labeling software Labelme, and label the image with the type name information to obtain the training set images; Use the established training set images to train the yolov8s-seg image segmentation network to obtain the trained image segmentation models for oil window mask segmentation and liquid level mask segmentation.

7. The oil window level recognition system based on deep learning according to claim 5, characterized in that: The processing module includes a first processing submodule and a second processing submodule; The first processing submodule is used to perform image morphological opening operation on the oil window mask image to obtain a first image; Obtaining a minimum circumscribed circle based on edge point pixels in the first image; Taking the minimum circumscribed circle as the circle; The second processing submodule is used to obtain the minimum rotation bounding box in the liquid level mask image as the first bounding box; Obtain the side with the smallest angle between the first bounding box and the image in the horizontal direction as the first side; Taking the center point of the first side as the base point, the first bounding box is reduced to 1 / 2 of the original size to obtain a first processed bounding box; Using a first processing bounding box to intercept the content of the liquid level mask image to obtain a first processing mask image; Obtaining a minimum rotation bounding box in the first processed mask image as a second bounding box; Get the two sides with the smallest angle between the second bounding box and the vertical plane direction of the image, and use them as the second side and the third side respectively; The midpoints of the second side and the third side are obtained respectively, and the midpoints of the second side and the third side are connected to obtain the straight line.

8. The oil window level recognition system based on deep learning according to claim 5, characterized in that: The calculation module performs the following steps: Obtaining the center of the circle; Determine whether the straight line passes through the center of the circle. If so, the radius R of the circle is used as the current liquid level height; If it does not pass through the center of the circle, obtain the vertical distance D from the straight line to the center of the circle to determine whether the straight line is above the center of the circle. If so, take the radius R of the circle plus the vertical distance D as the current liquid level height; if not, take the radius R of the circle minus the vertical distance D as the current liquid level height.

Citation Information

Patent Citations

  • Pointer type oil level indicator reading identification method based on deep learning

    CN111368906A

  • Oil level detection method and system

    CN111640151A

  • Method and system for detecting liquid level inside a container

    US20220375191A1