Valve chamber cover leakage detection system and method

By employing multimodal image fusion and deep learning methods, along with cross-polarization imaging technology and semantic segmentation networks, the challenge of detecting minute leaks in valve cover was solved, achieving high-precision automated detection.

CN120976529AInactive Publication Date: 2025-11-18WENZHOU MEIGAI AUTOMOBILE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511098141.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-06
Publication Date
2025-11-18
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify minute leaks in valve cover, especially thin oil films, resulting in low detection efficiency, high costs, and a high false positive rate. Traditional visual methods also perform poorly under low contrast and high light interference.

Method used

A detection scheme combining multimodal image fusion and deep learning is adopted. Cross-polarization imaging technology is used to suppress specular interference. Information-rich feature images are generated by multi-channel fusion of RGB images and cross-polarization images, and deep learning analysis is performed using a semantic segmentation network.

Benefits of technology

It achieves high-precision valve cover leakage detection, accurately identifies irregular thin oil films, improves the automation efficiency and accuracy of detection, and reduces the false judgment rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120976529A_ABST
    Figure CN120976529A_ABST
Patent Text Reader

Abstract

The invention discloses a valve chamber cover leakage detection system and method, relates to the field of valve chamber cover testing, and aims to suppress mirror reflection (highlight) on the surface of a valve chamber cover by using a cross polarization imaging technology and enhance visual difference between an oil film and a background material. A conventional RGB image and a cross polarization image with highlight interference eliminated are subjected to multi-channel fusion, and a feature image with richer information can be generated. And then, deep learning analysis is carried out on the fused image by using a semantic segmentation network (such as U-Net), so that the fused image can accurately learn and locate irregular forms and fine features of the oil film. The method does not depend on traditional threshold or edge detection, but solves the technical problem that tiny leakage is difficult to be stably identified due to low contrast and highlight interference in a data driving mode, so that high-precision automatic detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of valve cover testing, and more particularly, to a valve cover leakage detection system and method. BACKGROUND

[0002] As an important component of the engine, the core function of the valve cover is to seal the valve mechanism and prevent the leakage of lubricating oil. In the field of automobile manufacturing and maintenance, the sealing performance of the valve cover is a key indicator to measure the quality and reliability of the engine. Once leakage occurs, not only will it cause oil loss and pollute the engine compartment, but in severe cases, it may also cause fire risk due to oil dripping onto high-temperature components, directly threatening road safety. Therefore, accurate and efficient leakage detection of the valve cover on the production line is a necessary link to ensure product quality, enhance brand reputation and avoid safety hazards.

[0003] Currently, the detection of valve cover leakage mainly relies on manual visual inspection or traditional machine vision methods. However, these existing solutions generally have identification bottlenecks when dealing with small leaks, especially thin-layer oil films formed by slow infiltration along the sealing gasket. Manual detection is not only inefficient and costly, but the detection results are also easily affected by the subjective experience and fatigue state of the detector, leading to high rates of missed detection and misjudgment. Traditional machine vision algorithms usually make judgments based on color, brightness or edge features. For semi-transparent substances such as thin-layer oil films, the color and brightness differences formed on metal or plastic backgrounds are very weak, resulting in very low image contrast. At the same time, the surface of the valve cover and the oil film itself often produce strong specular reflection (highlights) due to light, and these highlight areas will saturate the image sensor, losing effective texture and color information, making it difficult to distinguish oil films from clean metal reflections in vision. In addition, the morphology of the leaking oil film often spreads irregularly along the gasket edge, lacking a fixed geometric shape, making it difficult for traditional algorithms based on shape matching to reliably detect it. These ambiguities in physical and optical properties collectively make it difficult for existing technologies to reliably and stably identify small leaks.

[0004] Therefore, there is an urgent need for a new detection technology that can overcome low contrast and highlight interference and accurately identify irregular, thin-layer oil films. SUMMARY

[0005] In view of the above problems existing in the prior art, according to an aspect of the present application, a valve cover leakage detection method is provided, which comprises:

[0006] obtaining a valve cover RGB image to be detected and a valve cover cross-polarization image to be detected;

[0007] extracting a region of interest from the valve cover RGB image to be detected to obtain a valve cover gasket ROI mask;

[0008] mask the to-be-detected valve cover RGB image and the to-be-detected valve cover cross-polarization image based on the valve cover gasket ROI mask to obtain a valve cover gasket RGB image and a valve cover gasket cross-polarization image;

[0009] perform multi-channel fusion on the valve cover gasket RGB image and the valve cover gasket cross-polarization image to obtain a valve cover gasket multi-channel image;

[0010] perform semantic segmentation-based leakage positioning on the valve cover gasket multi-channel image to obtain a leakage segmentation mask;

[0011] generate a leakage detection result based on the leakage segmentation mask.

[0012] According to another aspect of the present application, a valve cover leakage detection system is provided, which comprises:

[0013] a to-be-detected valve cover image acquisition module configured to acquire a to-be-detected valve cover RGB image and a to-be-detected valve cover cross-polarization image;

[0014] an RGB image region of interest extraction module configured to perform region of interest extraction on the to-be-detected valve cover RGB image to obtain a valve cover gasket ROI mask;

[0015] a mask operation module configured to mask the to-be-detected valve cover RGB image and the to-be-detected valve cover cross-polarization image based on the valve cover gasket ROI mask to obtain a valve cover gasket RGB image and a valve cover gasket cross-polarization image;

[0016] a multi-channel fusion module configured to perform multi-channel fusion on the valve cover gasket RGB image and the valve cover gasket cross-polarization image to obtain a valve cover gasket multi-channel image;

[0017] a leakage segmentation mask module configured to perform semantic segmentation-based leakage positioning on the valve cover gasket multi-channel image to obtain a leakage segmentation mask;

[0018] a leakage detection result generation module configured to generate a leakage detection result based on the leakage segmentation mask.

[0019] Compared with the prior art, the valve chamber cover leakage detection system and method provided by the application can solve the problem that the traditional visual method is difficult to identify the thin layer oil film leakage under low contrast and high light interference, and proposes a detection scheme combining multi-modal image fusion and deep learning to utilize cross-polarization imaging technology to suppress the specular reflection (high light) on the surface of the valve chamber cover and enhance the visual difference between the oil film and the background material. By multi-channel fusion of the conventional RGB image and the cross-polarization image eliminating the high light interference, a feature image with more information can be generated. Subsequently, a semantic segmentation network (such as U-Net) is used to analyze the fusion image through deep learning, so that it can accurately learn and locate the irregular shape and subtle features of the oil film. This method does not rely on traditional threshold or edge detection, but solves the technical problem that small leakage is difficult to be stably identified due to low contrast and high light interference through data-driven manner, thereby realizing high-precision automatic detection. BRIEF DESCRIPTION OF DRAWINGS

[0020] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description of embodiments of the present application taken in conjunction with the accompanying drawings. The drawings provided in the present application are used to provide a further understanding of embodiments of the present application, and constitute a part of the specification, and are used to explain the present application together with embodiments of the present application, and do not constitute a limitation of the present application. In the drawings, the same reference numerals generally represent the same components or steps.

[0021] Figure 1 A flowchart of the valve chamber cover leakage detection method according to the embodiments of the present application.

[0022] Figure 2 A data flow diagram of the valve chamber cover leakage detection method according to the embodiments of the present application.

[0023] Figure 3 A flowchart of step 6 in the valve chamber cover leakage detection method according to the embodiments of the present application.

[0024] Figure 4 A data flow diagram of step 62 in the valve chamber cover leakage detection method according to the embodiments of the present application.

[0025] Figure 5 A block diagram of the valve chamber cover leakage detection system according to the embodiments of the present application. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described below in greater detail with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that the present disclosure can be more thoroughly and completely understood.

[0027] To solve the above problems in the prior art, the present application provides a valve chamber cover leakage detection method. Figure 1 A flow chart of the valve chamber cover leakage detection method according to an embodiment of the present application. Figure 2 A data flow diagram of the valve chamber cover leakage detection method according to an embodiment of the present application. As shown in Figure 1 and Figure 2 As shown in the above, the valve chamber cover leakage detection method according to an embodiment of the present application comprises: step 1, acquiring a to-be-detected valve chamber cover RGB image and a to-be-detected valve chamber cover cross-polarization image; step 2, performing region of interest extraction on the to-be-detected valve chamber cover RGB image to obtain a valve chamber cover gasket ROI mask; step 3, based on the valve chamber cover gasket ROI mask, performing mask operation on the to-be-detected valve chamber cover RGB image and the to-be-detected valve chamber cover cross-polarization image to obtain a valve chamber cover gasket RGB image and a valve chamber cover gasket cross-polarization image; step 4, performing multi-channel fusion on the valve chamber cover gasket RGB image and the valve chamber cover gasket cross-polarization image to obtain a valve chamber cover gasket multi-channel image; step 5, performing leakage positioning based on semantic segmentation on the valve chamber cover gasket multi-channel image to obtain a leakage segmentation mask; and step 6, based on the leakage segmentation mask, generating a leakage detection result.

[0028] In step 1, the valve cover RGB image to be detected and the valve cover cross-polarization image to be detected are acquired. It should be understood that in the actual scene of valve cover leakage detection, although the conventional RGB color image can provide rich color and texture information, its limitations are also very obvious when facing a small leakage. Especially when a thin oil film is attached to a metal or plastic surface with high light reflection characteristics, the strong specular reflection (i.e. highlight) will cause the local area of the image to be overexposed, so that the weak features of the oil film itself are completely submerged. At the same time, the color and brightness difference between the oil film and the background material is already very small, which further increases the difficulty of recognition for traditional visual algorithms. Therefore, it is difficult to detect such defects stably and reliably by relying solely on the RGB image. Based on this, the present application introduces a cross-polarization image to utilize the physical properties of polarized light, effectively suppress the specular reflection of the object to be detected, thereby eliminating the high light interference and significantly enhancing the contrast between the semi-transparent oil film and the non-metal or metal background, providing high-quality and feature-rich image data sources for subsequent accurate leakage positioning and identification.

[0029] In one feasible embodiment of the present application, the valve cover cross-polarization image to be detected is collected by a monochrome industrial camera, a linear polarized light source and a linear polarizer, which is coaxially arranged with the lens of the monochrome industrial camera. Wherein, during the process of shooting the valve cover cross-polarization image to be detected, the polarization direction of the linear polarized light source and the polarization direction of the linear polarizer are set to be orthogonal. It is worth mentioning that the coaxial arrangement of the linear polarizer and the lens of the monochrome industrial camera is the basic physical configuration for realizing polarization imaging. In this way, it is ensured that all the light entering the camera lens first passes through the polarizer for polarization detection, so that the camera can selectively receive light of a specific polarization direction. This coaxial alignment ensures the consistency of the polarization detection effect in the entire field of view, avoiding image distortion or uneven polarization caused by the inclination or improper position of the polarizer. It should be understood that the polarization characteristics of the reflected light from different material surfaces are different. The specular reflection light (i.e. highlight) reflected from the smooth metal or plastic surface of the valve cover basically maintains the same polarization state. When this light passes through the polarization analyzer with orthogonal polarization direction, most of the energy will be filtered out, thereby greatly weakening the high light interference in the image. On the contrary, when the light is incident on the semi-transparent leakage oil film, scattering and multiple refraction occur, causing the polarization direction to become randomized. Therefore, a part of the scattered light can be captured by the camera through the polarization analyzer. In this way of suppressing the background and highlighting the target, the orthogonal configuration can enhance the image contrast between the oil film and the background, clearly presenting the weak oil stain features that are difficult to distinguish.

[0030] In the above feasible embodiment, the step 1 operates as follows: first, an image acquisition station needs to be built. A set of image acquisition devices is erected above the station, including a color industrial camera and a monochrome industrial camera, which are arranged side by side or at a certain angle to ensure that their fields of view can completely cover the valve cover to be detected. The color industrial camera is used for direct shooting to obtain the RGB image of the valve cover to be detected containing information such as object surface color and texture.

[0031] At the same time, in order to obtain the cross-polarization image of the valve cover to be detected, the monochrome industrial camera and its lighting environment need to be specially configured. Specifically, a linear polarizer is installed at the front end of the lens of the monochrome industrial camera, which is coaxially arranged with the lens of the camera. In the lighting part of the station, a linear polarized light source is used, for example, a surface light source composed of a plurality of LED lamp bead arrays and a large linear polarized film covering them. During shooting, the polarization direction of the linear polarized light source needs to be accurately adjusted to be orthogonal to the polarization direction of the linear polarizer at the front end of the camera lens. For example, the polarization direction of the light source can be adjusted to be horizontal, and the polarization direction of the polarizer at the camera end can be adjusted to be vertical. When the valve cover to be detected is placed on the acquisition station, first, the color industrial camera is started to shoot and output an RGB image of the valve cover to be detected. Then, the linear polarized light source is started and the monochrome industrial camera is triggered to shoot. The polarized light emitted from the linear polarized light source is reflected on the surface of the valve cover. Among them, the specular reflection light from the metal or plastic surface basically maintains its original polarization state, and when it passes through the camera polarizer orthogonal to the polarization direction of the light source, most of the energy will be filtered out, thereby effectively suppressing the highlight. The light irradiated on the oil film will change the polarization state due to scattering, and part of the light can pass through the polarizer at the camera end and be received by the sensor. In this way, the high light area in the image obtained by shooting will become dim, and the oil film area will be relatively highlighted, forming a high-contrast cross-polarization image of the valve cover to be detected.

[0032] In step 2, the region of interest of the valve cover RGB image to be detected is extracted to obtain a valve cover gasket ROI mask. Accordingly, in the entire valve cover leakage detection process, leakage usually occurs in the sealing gasket and its peripheral area. However, a complete valve cover image contains a large amount of background information irrelevant to leakage detection, such as the cover body itself, screw holes, and the background of the image acquisition station. These irrelevant areas not only increase the computational burden of subsequent image processing, reduce the detection efficiency, but also may introduce noise and interference features, which negatively affect the accuracy of leakage positioning. Therefore, before performing fine leakage analysis, it is necessary to accurately locate the core area that needs to be focused on, i.e., the valve cover gasket area. To this end, the present application uses region of interest extraction to focus computing resources and analysis on the gasket area where leakage is most likely to occur, excluding irrelevant background interference, thereby improving the efficiency, robustness and accuracy of the entire detection method.

[0033] In one feasible embodiment of the present application, step 2, the region of interest of the valve cover RGB image to be detected is extracted to obtain a valve cover gasket ROI mask, comprising: inputting the valve cover RGB image to be detected into a trained lightweight target detection model to obtain the valve cover gasket ROI mask, wherein the trained lightweight target detection model is a YOLOv5-s model.

[0034] In the above feasible embodiment, step 2 operates as follows: this embodiment uses a pre-trained lightweight target detection model, specifically a YOLOv5-s model, to achieve efficient extraction of the region of interest. As a small version of the YOLO series algorithm, YOLOv5-s optimizes the network depth and width, significantly optimizing the detection speed and model size, making it extremely easy to deploy on industrial production lines with strict requirements for computing resources and real-time performance, thereby ensuring detection accuracy while

[0035] The specific architecture of the YOLOv5-s model is divided into three core parts that work together: the backbone network, the neck network, and the head network. First, when the valve cover RGB image to be detected is input into the model, it will flow through the backbone network as the core of feature extraction. The backbone network adopts the CSPDarknet53 structure. This structure introduces a cross-stage local fusion module, which splits the basic feature map into two parts in the channel dimension. One part is directly transmitted through the residual connection, and the other part is processed through a series of convolutions and bottleneck layers. Finally, the two parts of the features are fused to efficiently extract multi-scale feature maps from the input RGB image, from shallow to deep. Then, these feature maps containing different levels of information output by the backbone network are sent to the neck network for deep fusion. The neck network combines the structures of the Feature Pyramid Network (FPN) and the Path Aggregation Network (PAN). FPN fuses high-level semantic features such as identifying that this is a gasket with low-level positioning features such as the precise edge of the gasket through a top-down path to enhance the detection ability of small targets. It is worth mentioning that the leakage problem of the valve cover is mostly caused by the sealing failure, that is, the gasket area. The lubricating oil leaks from the places where the gasket and the metal part do not contact tightly, the gasket is aging and cracking, or the gasket is not installed in place. Therefore, the gasket and its adjacent periphery are the highest and most core areas where leakage occurs. Then, the PAN structure adds a bottom-up path to further transmit accurate positioning information from low to high, achieving bidirectional fusion of feature information, generating a fused feature map that has strong representation ability for gaskets of different sizes and shapes. Finally, the processing flow enters the head network, the prediction end. The head network predicts on three different scales of feature maps output by the neck network in parallel. On each scale of feature map, the network divides into a dense grid and predicts multiple bounding boxes for each grid. The prediction result of each bounding box is a vector containing the center point coordinates (x, y) of the bounding box, the width (w), the height (h), the confidence that the target in the box contains, and the probability that the target belongs to the predefined class such as gasket.

[0036] Before application, the YOLOv5-s model needs to be trained specially. The training process includes: preparing a data set containing a large number of valve cover RGB images, and manually labeling the valve cover gasket area in each image accurately to generate a label file containing categories such as gasket and normalized bounding box coordinates. Then, input these labeled image data into the YOLOv5-s network for iterative training. During the training process, the network continuously optimizes and adjusts its internal weight and bias parameters through the back propagation algorithm and the composite loss function until the model can accurately recognize and locate the gasket area in the image.

[0037] In the actual detection process, the RGB image of the valve cover to be detected is taken as the input and directly sent to the YOLOv5-s model which has been trained for forward inference. The model quickly processes the image and outputs a series of dense prediction results through the head network. Then, the original prediction boxes are post-processed by the non-maximum suppression (NMS) algorithm, that is, redundant boxes with too high overlap for the same target are removed, and the best prediction result with a class of gasket and a final confidence score higher than a preset threshold, for example, 0.85, is selected. In particular, the preset threshold is determined by evaluating the precision and recall of the model at different thresholds on the validation set, and selecting the best compromise that balances missed detection and false detection according to the actual production needs. The final bounding box accurately frames the position of the gasket in the image.

[0038] Finally, based on the located bounding box coordinates, a binary mask image with the same size as the original RGB image is generated, that is, the gasket ROI mask of the valve cover. In the mask image, all pixel values in the rectangular region enclosed by the bounding box are set to 1 representing white, indicating the valid region, and all pixel values in the background region outside the bounding box are set to 0 representing black, indicating the invalid region.

[0039] In step 3, based on the gasket ROI mask of the valve cover, the mask operation is performed on the RGB image of the valve cover to be detected and the cross-polarization image of the valve cover to be detected to obtain the gasket RGB image of the valve cover and the gasket cross-polarization image of the valve cover. It can be understood that the approximate region of the gasket of the valve cover has been successfully located by the target detection model, and the corresponding ROI mask has been generated, but the original RGB image and the cross-polarization image are still full-size images containing a large amount of irrelevant background information. These background regions, such as the cover body, screw holes, and workbench, are not only useless for the final leakage judgment, but also become noise sources when the subsequent deep learning model is analyzed. If the full-size image is directly sent to the subsequent processing, the computational load will be greatly increased, and the model learning of the leakage feature may be disturbed. Therefore, before multi-channel fusion and fine leakage positioning, the ROI mask obtained is used to accurately purify the original image to ensure that the subsequent analysis and calculation are completely focused on the gasket region that needs to be detected, thereby significantly improving the processing efficiency and the accuracy of the final detection result.

[0040] In one feasible embodiment of the present application, step 3 is operated as follows: It is worth mentioning that the specific implementation process of the mask operation is essentially a pixel-by-pixel logical AND (AND) operation or multiplication operation on the image. This process is applied to the RGB image and the cross-polarization image in parallel.

[0041] First, the RGB image of the valve cover to be detected is processed. The RGB image is multiplied with the valve cover gasket ROI mask at the pixel level. Specifically, for each pixel coordinate (i, j) in the image, the pixel value of the RGB image at the point (a vector containing R, G, B three components) is multiplied with the pixel value of the ROI mask at the point (0 or 1). When the pixel value of the ROI mask is 1, that is, the point is located in the gasket area, the result of the multiplication of the RGB image pixel value remains unchanged, and the original color information is completely retained. When the pixel value of the ROI mask is 0, that is, the point is located in the background area, the result of the multiplication of any RGB pixel value will be (0, 0, 0), that is, black. After traversal calculation of all pixels, a new image, the valve cover gasket RGB image, is generated. In this new image, only the gasket area retains the original color appearance, and all background areas are set to pure black, thereby effectively shielding irrelevant information.

[0042] At the same time, the cross-polarization image of the valve cover to be detected is processed in the same way. The single-channel grayscale image is multiplied with the same valve cover gasket ROI mask at the pixel level. For each pixel coordinate (i, j), the grayscale value of the cross-polarization image is multiplied with the pixel value of the ROI mask (0 or 1). Similarly, the pixel grayscale value in the gasket area is retained, and the pixel grayscale value in the background area becomes 0 (black). Finally, a new single-channel image, the valve cover gasket cross-polarization image, is obtained, which also retains only the polarized light information of the gasket area and eliminates all background interference.

[0043] In step 4, the valve cover gasket RGB image and the valve cover gasket cross-polarization image are fused in multiple channels to obtain a valve cover gasket multi-channel image. It should be understood that after the background interference problem is solved, the core challenge of the detection task is changed to how to accurately identify the extremely weak oil film leakage from the pure gasket image. Although the RGB image alone provides color information, it has limited representation capability when facing a semi-transparent and low-contrast oil film. While the cross-polarization image alone can effectively suppress highlights and enhance contrast, it also loses color information that may be helpful in distinguishing oil film from certain specific materials (such as rubber gasket itself). Both image modalities have their own advantages and information blind spots. If only one of them is used, it is equivalent to a loss of information, which will limit the upper limit of the recognition accuracy that the subsequent deep learning model can achieve. Therefore, before the data is sent to the final segmentation network, the visual information from the two different sources but complementary to each other needs to be effectively integrated. Therefore, the present application adopts multi-channel fusion to construct a unified data structure with richer information dimension and stronger feature representation capability, providing a full- range perspective containing color, texture and polarization characteristics for the subsequent semantic segmentation model, thereby maximizing its perception and resolution capability for small leaks.

[0044] In one feasible embodiment of the present application, step 4 operates as follows: It can be understood that the valve cover gasket RGB image and the valve cover gasket cross-polarization image are completely aligned in spatial dimension, that is, at the same pixel coordinates (i, j), the visual information of the same point on the object to be measured is described. For example, the size of the two images is 1920x1080 pixels. The valve cover gasket RGB image is a three-dimensional tensor in data structure, with a shape of (1920, 1080, 3), where the third dimension represents the red (R), green (G) and blue (B) three color channels respectively. The valve cover gasket cross-polarization image is a two-dimensional tensor with a shape of (1920, 1080), representing the polarization intensity information of each pixel point.

[0045] The specific implementation process of multi-channel fusion is a stacking operation in channel dimension. First, separate the R, G and B channels of the valve cover gasket RGB image to obtain three independent two-dimensional arrays with a size of 1920x1080, which are denoted as R channel image, G channel image and B channel image respectively. At the same time, the valve cover gasket cross-polarization image with a size of 1920x1080 is essentially a single-channel grayscale image, which is regarded as the fourth information channel and denoted as Pol channel image.

[0046] Next, the four two-dimensional arrays, i.e. the R channel map, the G channel map, the B channel map, and the Pol channel map, are stacked in the new channel dimension. At the data level, this means that for any pixel coordinate (i, j) in the image, its information will no longer be a single RGB vector or a grayscale value, but a four-dimensional vector composed of the values corresponding to the point on the four channel maps. For example, at coordinate (100, 200), the new pixel value will be (R(100, 200), G(100, 200), B(100, 200), Pol(100, 200)).

[0047] After the stacking operation on all pixels, the valve cover gasket multi-channel image is finally generated. The image is a four-dimensional tensor with a shape of (1920, 1080, 4) in data form. Each pixel point in this four-dimensional tensor contains both the color information (described by the R, G, and B components) and the polarization characteristic information (described by the Pol component) of the point.

[0048] In step 5, the valve cover gasket multi-channel image is subjected to semantic segmentation-based leakage positioning to obtain a leakage segmentation mask. Accordingly, after multi-channel fusion, a piece of information-rich image data is obtained, but the positioning of the leakage oil film has not been solved. The morphology of the leakage oil film is often irregular, spreading along the gasket edge, and its area size is variable, which cannot be accurately described by simple geometric shapes (such as rectangular frames). Traditional image processing methods, such as threshold segmentation or edge detection, are prone to produce cracks, adhesion or misclassification when facing such complex and subtle feature targets. Therefore, a more powerful analysis tool is needed to understand the context information of the image and accurately classify each pixel point in the image, so as to realize the pixel-level accurate outlining of the irregular oil film area. For this purpose, the application adopts semantic segmentation-based leakage positioning to utilize the powerful feature learning and pixel-level classification ability of the deep learning network to finely interpret the fused multi-channel image, accurately classify each pixel as background, normal gasket or leakage oil film, and thus generate a segmentation mask that can accurately depict the outline and range of the leakage area.

[0049] In one feasible embodiment of the application, step 5, the valve cover gasket multi-channel image is subjected to semantic segmentation-based leakage positioning to obtain a leakage segmentation mask, comprising: inputting the valve cover gasket multi-channel image into a trained semantic segmentation network to obtain the leakage segmentation mask, wherein the trained semantic segmentation network is a U-Net network.

[0050] In the above feasible embodiment, step 5 operates as follows: in order to achieve pixel-level accurate positioning, this embodiment adopts a specially trained U-Net semantic segmentation network. The U-Net network is named after its symmetrical U-shaped structure and is particularly good at processing medical images and other scenarios that require accurate segmentation. Its structure is very suitable for the fine positioning task of irregular oil film in this application.

[0051] The classic architecture of the U-Net network mainly consists of two parts: an encoder for feature extraction and context information encoding, i.e., the contraction path, and a decoder for accurate positioning and image reconstruction, i.e., the expansion path. The encoder part is composed of a series of consecutive convolution blocks, each of which contains two 3x3 convolution layers, each followed by a ReLU activation function to introduce nonlinearity. After each convolution block, a 2x2 max-pooling operation is performed, which reduces the size of the feature map by half while doubling the number of channels. In this way, the encoder gradually reduces the size of the feature map while increasing the number of channels, allowing it to understand the context of the image on a larger scale. When the valve cover gasket multi-channel image is input into the U-Net network, it is first processed in the encoder path. Since the input is a 4-channel image, the first layer of the network needs to be configured to accept 4-channel input. The image data flows through several convolution blocks and pooling layers, with the size continuously decreasing and the number of channels continuously increasing, eventually forming a highly condensed feature at the bottom of the network, i.e., the valve cover gasket multi-channel feature map, which contains global semantic information about the image content.

[0052] Subsequently, the processing flow enters the decoder path. The decoder gradually restores the spatial resolution of the feature map by performing a series of upsampling operations such as transposed convolution on the valve cover gasket multi-channel feature map. Its characteristic is that after each upsampling, the decoder will splice the feature map obtained by upsampling with the corresponding size feature map in the encoder path through a jump connection. This allows the decoder to directly utilize the high-resolution shallow positioning information preserved by the encoder in the early stages when reconstructing image details. The combination of deep semantic information and shallow detail information greatly improves the accuracy of segmentation, enabling the network to accurately restore the fine boundaries of the oil film. At the end of the decoder path, a 1x1 convolution layer is connected, which maps the multi-channel feature map to the pre-set number of classes. In this embodiment, three classes need to be distinguished: background, normal gasket, and leaking oil film, so the output channel number of this 1x1 convolution layer is 3. Finally, a Softmax activation function is used to generate a probability distribution for each pixel in the three classes.

[0053] The U-Net network also needs to be specially trained before application. The training data set is composed of pairs of valve chamber cover gasket multi-channel images and their corresponding artificially labeled segmentation masks. In the labeled mask, each pixel is assigned a class label, for example: 0 represents the background, 1 represents the normal gasket, and 2 represents the seepage oil film. The network continuously adjusts its weight and bias parameters by optimizing loss functions such as cross-entropy to learn the mapping relationship from the input four-channel image to the output pixel-level class label.

[0054] In actual detection, the multi-channel image of the valve chamber cover gasket to be detected is input into the trained U-Net network for forward inference. The network outputs a probability map containing 3 channels with the same size as the input image. For each pixel position of the probability map, the channel index with the highest probability value is selected as the final class of the pixel. For example, if a pixel has the highest probability of seepage oil film in the third channel, the class label of the pixel is 2. By performing this operation on all pixels, a single-channel leakage segmentation mask is finally generated. Each pixel value (0, 1, or 2) in the mask image clearly indicates the class it belongs to, thereby achieving pixel-level accurate positioning of the seepage oil film area.

[0055] In particular, when processing multi-channel images of valve chamber cover gaskets, a core challenge is faced: there is significant semantic heterogeneity between channels. The standard RGB three channels are highly correlated and jointly carry rich surface features such as color and texture, but these features are easily disturbed by noise such as light and stains. The cross-polarization channel, on the other hand, acts as a high signal-to-noise ratio indicator and is extremely sensitive to the specific target of seepage oil film, providing key strong prior information. If a standard convolutional network is used to process all channels indiscriminately, this prior information can easily be overwhelmed by noise in the RGB channels, resulting in low learning efficiency and difficulty in focusing on weak seepage features. Therefore, before sending the features to the U-Net main network for in-depth analysis, a special fusion mechanism is needed. Based on this, the application adopts a key prior-based correction and fusion strategy, which aims to use the polarization channel as a guide to intelligently guide and correct the noise-filled RGB channels at the very front end of feature extraction, so that the network focuses on suspicious areas confirmed by prior information from the beginning, greatly improving the relevance and accuracy of subsequent feature learning.

[0056] Based on this, in one preferred embodiment of the present application, step 5, inputting the valve cover gasket multi-channel image into the trained semantic segmentation network to obtain the leakage segmentation mask, comprises: step 51, inputting the valve cover gasket multi-channel image into the encoder of the U-Net network to obtain a valve cover gasket multi-channel feature map; step 52, inputting the valve cover gasket multi-channel feature map into the decoder of the U-Net network to obtain the leakage segmentation mask. In particular, the processing process of the decoder here is the same as that of the decoder in the above embodiment.

[0057] It is worth mentioning that in the process of feature extraction performed by the encoder of the U-Net network, the present application does not use its standard first convolutional block, but replaces it with a special attention fusion module. Specifically, when the valve cover gasket multi-channel image is input, this module first splits it into an RGB image and a cross-polarization image along the channel dimension. Subsequently, it uses the key prior information of the cross-polarization image to generate a spatial attention map through convolution and activation operations. This attention map is used to perform pixel-by-pixel weighting modulation and local optimal constraint on the RGB image, thereby generating a modified RGB image with significantly guided and optimized features. Finally, the module point-by-point adds the modified RGB image and the original polarization attention map to form a multi-channel modified image feature map with high information fusion. This feature map functionally replaces the output of the first convolutional block of the traditional U-Net and is input into the subsequent standard convolutional block to continue the downsampling and deep feature extraction in the remaining part of the encoder. Through this replacement, it ensures that the network can accurately focus on the key areas related to leakage in the initial stage of encoding, laying a foundation for the entire semantic segmentation task to be efficient and accurate.

[0058] Specifically, in one embodiment of the present application, step 51, inputting the valve cover gasket multi-channel image into the encoder of the U-Net network to obtain a valve cover gasket multi-channel feature map, comprises:

[0059] Step 511, split the valve cover gasket multi-channel image along the channel dimension to obtain a valve cover gasket RGB image and a valve cover gasket cross-polarization image. It should be understood that in the previous step, the multi-channel image is integrated into a unified data tensor for input. However, since this application requires different processing strategies for different modalities, the unified tensor is first deconstructed. This step performs channel splitting to separate channels with different semantic attributes and information values, preparing for subsequent differentiated and guided processing. Thus, from the input four-channel tensor, the valve cover gasket RGB image (three channels) containing rich apparent features and the valve cover gasket cross-polarization image (single channel) as key prior information are independently obtained, so that subsequent operations can be performed on these two information sources respectively.

[0060] Step 512, the valve cover gasket cross-polarization image is convolved and activated to obtain a valve cover gasket cross-polarization attention map, i.e.:

[0061] M' = ReLU[Cov(M)]

[0062] Where M is the valve cover gasket cross-polarization image, M ∈ R H×W×1 , H and W are the height and width of M, Cov is convolution coding, ReLU is ReLU activation, and M' is the valve cover gasket cross-polarization attention map. Accordingly, it is not enough to have only the original valve cover gasket cross-polarization image, it needs to be converted into an attention signal that can directly guide other channels. That is, the pixel value of the original valve cover gasket cross-polarization image only represents the intensity of a single point, while the convolution operation can aggregate neighborhood information and perceive local spatial patterns, thereby more robustly identifying contiguous leakage areas. This application convolves and activates the polarization image to extract its deep spatial features and converts it into a nonlinear spatial attention weight map. This generates a valve cover gasket cross-polarization attention map, in which the value of each pixel represents the confidence that the location belongs to a suspicious area, and the highlighted area corresponds to high confidence, providing clear spatial weight guidance for subsequent RGB feature extraction.

[0063] Step 513, multiply each channel matrix in the valve cover gasket RGB image by the valve cover gasket cross-polarization attention map to obtain a valve cover gasket RGB enhanced image, i.e.:

[0064] F' = M' ⊙ F

[0065] Where ⊙ is pointwise multiplication, F is the valve cover gasket RGB image, F ∈ R H×W×3, H and W are the height and width of F, 3 is the number of channels of F, i.e. RGB 3 channels, and F' is the cross-polar attention map of the valve cover gasket. It should be understood that after the attention map is obtained, its role is to guide the extraction of RGB features. If the RGB features are not modulated, the network may waste a lot of computing resources on irrelevant background areas, or even be misled by false features. The position-wise point multiplication operation performed in this step is to use the prior knowledge of the polarization channel to weight and modulate the features of the RGB channel, to achieve preliminary fusion and screening of information, and then generate a cross-polar attention map of the valve cover gasket RGB enhanced image. In the cross-polar attention map of the valve cover gasket, the suspicious areas highlighted by the attention map are significantly enhanced in terms of RGB color and texture features; and the features of irrelevant areas are effectively suppressed. This forces the network's attention to be directed to the key areas, achieving preliminary focusing of the features.

[0066] Step 514, performing local optimal constraint based on maximum value normalization on each pixel value in the cross-polar attention map of the valve cover gasket to obtain a modified cross-polar attention map of the valve cover gasket, i.e.

[0067]

[0068] wherein f i ' is each pixel value in F', Norm is maximum value normalization, f max ' is the maximum pixel value in F', exp is the exponential function value with the natural constant e as the base, and f i ” is each pixel value in the modified cross-polar attention map of the valve cover gasket. Accordingly, the enhanced image after direct point multiplication may have problems such as uneven numerical distribution or excessive dynamic range, and the direct combination of different modal information may lead to unbalanced semantic distribution, which is not conducive to subsequent stable feature learning. Therefore, through local optimal constraint, the enhanced RGB features can be fine-tuned once, making the numerical distribution more reasonable and highlighting the class boundary characteristics to adapt to the regression properties of the subsequent semantic segmentation network. That is, through maximum value normalization and exponential transformation, the features are smoothed and remapped to generate a modified cross-polar attention map of the valve cover gasket, and the feature distribution of this image is more stable, which is conducive to the network learning more robust classification boundaries.

[0069] Step 515, performing position-wise point addition on each channel matrix in the modified cross-polar attention map of the valve cover gasket and the cross-polar attention map of the valve cover gasket to obtain a cross-polar attention map of the valve cover gasket multi-channel modified image feature map, i.e.

[0070] F c = M' O F"

[0071] wherein O is position-wise point addition, F” is the modified cross-polar attention map of the valve cover gasket, and Fc is a multi-channel modified image feature map of the valve cover gasket. It should be understood that the modified RGB image of the valve cover gasket has been guided, but the original, strongest prior signal (polar attention map) should also be completely passed to the subsequent network. The dot-plus operation is an effective feature fusion method that can superimpose and jointly act on features from different sources. The position dot-plus operation is used to finally integrate the polar attention information as the benchmark prior and the modified RGB features as auxiliary verification to generate a multi-channel modified image feature map of the valve cover gasket. Each pixel of this feature map fuses two kinds of information: where the focus is provided by the polarization channel and what the focus area looks like provided by the RGB channel, providing highly information-dense and highly structured inputs for subsequent network layers.

[0072] Step 516, input the multi-channel modified image feature map of the valve cover gasket into the subsequent convolutional block in the encoder of the U-Net network to obtain the multi-channel feature map of the valve cover gasket. So far, the entire attention fusion module has replaced the first convolutional block of the U-Net. The output of this module, that is, the high-quality first layer feature prepared for the subsequent processing flow of the entire network. This step sends the feature map to the subsequent network to connect the attention fusion module and the standard encoder structure of the U-Net, so that the network continues to perform hierarchical feature extraction. That is, the encoder of the U-Net starts from the second convolutional block, and the received is no longer the original, unprocessed feature, but a feature map that has been intelligently guided and optimized. This enables the entire network to continuously and efficiently abstract and encode the already focused key information in the subsequent downsampling and convolution process, ultimately forming a multi-channel feature map of the valve cover gasket at the bottom of the network. The feature map has a strong representation ability for leakage features. In particular, the encoding of the subsequent convolutional block is the same as the process of the above embodiment.

[0073] In step 6, a leak detection result is generated based on the leak segmentation mask. That is, after the preceding semantic segmentation processing, a pixel-level leak segmentation mask is obtained, which precisely depicts which pixels in the image belong to the leaking oil film. However, this mask itself is still an image-based, qualitative intermediate result; it shows where the leak is, but does not directly provide a final judgment on whether a leak has occurred. On industrial automated production lines, what is needed is a clear, executable instruction, such as pass or fail. Furthermore, in actual inspection, due to sensor noise or minor model errors, isolated, misjudged pixels that do not constitute actual quality problems may appear. If any detected oil film pixel is indiscriminately considered a defect, it may lead to an excessively high false alarm rate. Therefore, a quantitative, configurable decision mechanism is needed to interpret the segmentation mask. Based on this, this application uses a pixel-based statistical and threshold comparison method to generate the final detection result. The purpose is to transform the pixel-level segmentation result into an objective and quantitative indicator, and make a stable and reliable final judgment based on the indicator, thereby effectively filtering out irrelevant minor noise and outputting a final conclusion that meets industrial production quality standards.

[0074] In one exemplary embodiment of this application, Figure 3 This is a flowchart of step 6 in the valve cover leakage detection method according to an embodiment of this application. Figure 3 As shown, step 6, generating a leakage detection result based on the leakage segmentation mask, includes: step 61, counting the total number of pixels in the leakage segmentation mask that are classified as oil film leakage to obtain the total number of leakage pixels; step 62, comparing the total number of leakage pixels with a preset judgment threshold to obtain the leakage detection result.

[0075] In the above feasible embodiment, step 6 operates as follows: First, step 61 is executed. Specifically, each pixel in the leakage segmentation mask is traversed. During a loop or parallel computation, the label value of each pixel is checked. The counter is incremented if and only if the label value of a pixel is 2. After traversing all pixels, the final value of the counter is the total number of leakage pixels. For example, after processing a 1920x1080 segmentation mask, it is found that there are 580 pixels with a label value of 2, so the total number of leakage pixels is 580. This value objectively quantifies the total area of ​​the image identified as the leaking oil film region.

[0076] Next, step 62 is performed. In one exemplary embodiment of this application, Figure 4 This is a data flow diagram of step 62 in the valve cover leakage detection method according to an embodiment of this application. Figure 4As shown, step 62, comparing the total number of leaked pixels with a preset determination threshold to obtain the leakage detection result, includes: in response to the total number of leaked pixels being greater than the preset determination threshold, determining that the leakage detection result is that there is leakage; in response to the total number of leaked pixels being less than or equal to the preset determination threshold, determining that the leakage detection result is qualified.

[0077] Before that, a determination threshold needs to be set in advance according to the actual production quality standard and process requirements. The setting of this threshold is a key link, which needs to balance the missed detection rate and the false positive rate. For example, it can be determined by analyzing a large number of qualified samples and unqualified samples known to have a small leakage. For example, through experimental calibration, it is determined that when the total number of pixels of the oil film exceeds 500, it can be determined as a quality defect that needs to be paid attention to. Therefore, the preset determination threshold is set to 500.

[0078] When determining, the total number of leaked pixels obtained in the previous step, such as 580, is compared with the preset determination threshold 500. The specific determination logic is as follows: in response to the total number of leaked pixels being greater than the preset determination threshold, that is, 580>500, it is determined that the leakage detection result is that there is leakage. On the contrary, if the total number of leaked pixels obtained by another detection is 320, since the value is less than or equal to the preset determination threshold, that is, 320≤500, in response to this condition, it is determined that the leakage detection result is qualified. The final leakage detection result can be used for product sorting, alarm prompt or quality data recording on the production line.

[0079] In summary, the valve cover leakage detection method based on the embodiments of the present application is illustrated, which aims at the problem that the traditional visual method is difficult to identify the thin layer oil film leakage under low contrast and high light interference, and proposes a detection scheme combining multi-modal image fusion and deep learning to use cross-polarization imaging technology to suppress the specular reflection (high light) on the surface of the valve cover and enhance the visual difference between the oil film and the background material. By multi-channel fusion of the conventional RGB image and the cross-polarization image that eliminates high light interference, a feature image with more information can be generated. Subsequently, a semantic segmentation network (such as U-Net) is used to analyze the fusion image through deep learning, so that it can accurately learn and locate the irregular shape and subtle features of the oil film. This method does not rely on traditional threshold or edge detection, but solves the technical problem that small leakage is difficult to be stably identified due to low contrast and high light interference through data-driven way, thereby realizing high-precision automatic detection.

[0080] Figure 5 The block diagram of the valve cover leakage detection system according to the embodiments of the present application is shown. As shown in FIG. 1, the system includes an image acquisition module 10, an image preprocessing module 20, a feature image generation module 30, a feature image analysis module 40 and a leakage detection result output module 50. Figure 5As shown, the valve cover leakage detection system 100 according to the embodiment of the present application comprises: a valve cover to be detected image acquisition module 110, configured to acquire a valve cover to be detected RGB image and a valve cover to be detected cross-polarization image; an RGB image region of interest extraction module 120, configured to perform region of interest extraction on the valve cover to be detected RGB image to obtain a valve cover gasket ROI mask; a mask operation module 130, configured to perform mask operation on the valve cover to be detected RGB image and the valve cover to be detected cross-polarization image based on the valve cover gasket ROI mask to obtain a valve cover gasket RGB image and a valve cover gasket cross-polarization image; a multi-channel fusion module 140, configured to perform multi-channel fusion on the valve cover gasket RGB image and the valve cover gasket cross-polarization image to obtain a valve cover gasket multi-channel image; a leakage segmentation mask module 150, configured to perform leakage positioning based on semantic segmentation on the valve cover gasket multi-channel image to obtain a leakage segmentation mask; and a leakage detection result generation module 160, configured to generate a leakage detection result based on the leakage segmentation mask.

[0081] As described above, the valve cover leakage detection system 100 according to the embodiment of the present application can be implemented in various wireless terminals, such as a server with a valve cover leakage detection algorithm, and the like. In one possible implementation, the valve cover leakage detection system 100 according to the embodiment of the present application can be integrated into a wireless terminal as a software module and / or a hardware module. For example, the valve cover leakage detection system 100 can be a software module in the operating system of the wireless terminal, or can be an application program developed for the wireless terminal; of course, the valve cover leakage detection system 100 can also be one of the many hardware modules of the wireless terminal.

[0082] Alternatively, in another example, the valve cover leakage detection system 100 and the wireless terminal can also be separate devices, and the valve cover leakage detection system 100 can be connected to the wireless terminal through a wired and / or wireless network, and transmit interactive information in an agreed data format.

[0083] Here, those skilled in the art can understand that the specific operations of each step in the above valve cover leakage detection system have been described in detail above with reference to the description of the valve cover leakage detection method of Figures 1 to 4 Therefore, the repeated description thereof will be omitted.

Claims

1. A method for detecting valve cover leakage, characterized in that, include: Acquire the RGB image and the cross-polarized image of the valve cover to be inspected; The region of interest (ROI) is extracted from the RGB image of the valve cover to be detected to obtain the valve cover gasket ROI mask; Based on the valve cover gasket ROI mask, a masking operation is performed on the RGB image of the valve cover to be detected and the cross-polarized image of the valve cover to be detected to obtain the RGB image of the valve cover gasket and the cross-polarized image of the valve cover gasket. The RGB image of the valve cover gasket and the cross-polarized image of the valve cover gasket are fused in multiple channels to obtain a multi-channel image of the valve cover gasket. Leakage localization is performed on the multi-channel image of the valve cover gasket based on semantic segmentation to obtain a leakage segmentation mask; Based on the leak segmentation mask, a leak detection result is generated.

2. The valve cover leakage detection method according to claim 1, characterized in that, The cross-polarized image of the valve cover to be tested is acquired by a monochrome industrial camera, a linear polarizing light source, and a linear polarizer, wherein the linear polarizer is coaxially set with the lens of the monochrome industrial camera.

3. The valve cover leakage detection method according to claim 2, characterized in that, During the process of capturing the cross-polarized image of the valve cover to be tested, the polarization direction of the linearly polarized light source is set to be orthogonal to the polarization direction of the linear polarizer.

4. The valve cover leakage detection method according to claim 1, characterized in that, The region of interest (ROI) is extracted from the RGB image of the valve cover to be detected to obtain the valve cover gasket ROI mask, including: The RGB image of the valve cover to be detected is input into a trained lightweight object detection model to obtain the ROI mask of the valve cover gasket, wherein the trained lightweight object detection model is the YOLOv5-s model.

5. The valve cover leakage detection method according to claim 1, characterized in that, Leakage localization based on semantic segmentation of the multi-channel image of the valve cover gasket to obtain a leakage segmentation mask includes: inputting the multi-channel image of the valve cover gasket into a trained semantic segmentation network to obtain the leakage segmentation mask, wherein the trained semantic segmentation network is a U-Net network.

6. The valve cover leakage detection method according to claim 5, characterized in that, Based on the leak segmentation mask, a leak detection result is generated, including: The total number of leaking pixels is obtained by counting the total number of pixels in the leak segmentation mask that are classified as oil film. The total number of leaked pixels is compared with a preset judgment threshold to obtain the leak detection result.

7. The valve cover leakage detection method according to claim 6, characterized in that, The leakage detection result is obtained by comparing the total number of leaked pixels with a preset judgment threshold, including: In response to the total number of leaked pixels being greater than the preset judgment threshold, the leak detection result is determined to indicate that a leak exists; If the total number of leaked pixels is less than or equal to the preset judgment threshold, the leak detection result is determined to be qualified.

8. A valve cover leakage detection system, characterized in that, include: The valve cover image acquisition module is used to acquire the RGB image and the cross-polarized image of the valve cover to be inspected. The RGB image region of interest extraction module is used to extract the region of interest from the RGB image of the valve cover to be detected in order to obtain the valve cover gasket ROI mask. The masking module is used to perform masking operations on the RGB image of the valve cover to be detected and the cross-polarized image of the valve cover to be detected based on the ROI mask of the valve cover gasket to obtain the RGB image of the valve cover gasket and the cross-polarized image of the valve cover gasket. A multi-channel fusion module is used to perform multi-channel fusion of the RGB image of the valve cover gasket and the cross-polarized image of the valve cover gasket to obtain a multi-channel image of the valve cover gasket. The leakage segmentation mask module is used to perform semantic segmentation-based leakage localization on the multi-channel image of the valve cover gasket to obtain a leakage segmentation mask; The leakage detection result generation module is used to generate leakage detection results based on the leakage segmentation mask.