A comprehensive defect detection method and system for valve oil seal industry defects
By combining traditional methods with a comprehensive defect detection approach based on deep learning, multi-angle image acquisition and twin network model recognition are performed on valve stem seals. This solves the problems of insufficient training dataset and multiple defect recognition in visual defect detection of valve stem seals, and achieves high-precision full-process quality inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JILIN UNIVERSITY
- Filing Date
- 2022-06-29
- Publication Date
- 2026-05-08
AI Technical Summary
Existing visual defect detection methods for valve stem seals suffer from limitations such as insufficient training datasets to cover all defects, inadequate sample types, and the inability of single defect identification algorithms to meet the high-precision detection requirements of multiple defects, making it difficult to achieve the quality inspection requirements of the entire process.
A comprehensive defect detection method combining traditional methods with deep learning is adopted. By collecting top, side and bottom view images of valve stem seals, and combining them with a twin network deep model, multi-angle detection and identification are performed on parts such as the lip rubber head, metal skeleton, and lower spring seat. The twin network deep model is then used for defect prediction and judgment.
It achieves high-precision detection of various defects in valve stem seals, solves the problem of insufficient samples, improves the robustness and accuracy of detection, meets the quality inspection needs in actual production, and reduces the risk of repeated manual inspection.
Smart Images

Figure CN115358964B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of machine vision technology and relates to the detection of surface defects in products. It is a comprehensive defect detection method and system for valve oil seals in the industry. Background Technology
[0002] Defect detection is a crucial part of industrial production, and its quality significantly impacts the final product quality and even a company's market reputation. In traditional industrial production, defect detection is often performed by human eyes, which has several drawbacks: significant subjective influence, high risk of missed or incorrect detections due to repetitive tasks, high labor costs, and the harsh working conditions for quality inspectors, which can be harmful to workers' health. Therefore, machine vision can replace human eyes for defect detection, reducing costs, improving accuracy, and enhancing the working environment for workers.
[0003] This machine vision algorithm is developed based on a complementary hardware detection optical path and a relatively stable darkroom working environment. Traditional machine vision algorithms for defect detection are often based on feature extraction. The extracted feature operators are often low-order and easily affected by environmental changes and deformations, but the algorithms are flexible, fast, and do not rely on datasets. Deep learning has achieved excellent results in image feature extraction, ensuring the ability to identify complex defects with high accuracy, but it requires sufficient datasets of images as support. Therefore, an algorithm that integrates both approaches can better solve the problem.
[0004] Existing literature on visual defect detection of valve stem seals includes methods such as using deep convolutional neural networks to detect partial defects on the valve stem seal surface, classifying the defects, and then using target detection or classification models for identification; and directly using traditional machine vision edge extraction and pattern recognition to detect single defects. However, these methods for visual defect identification of valve stem seals present two problems in practical industrial inspection applications:
[0005] 1. It is difficult to create a training dataset that covers all defects in valve stem seals;
[0006] In practical problems, the types of defects in the training samples are always too few. Considering the actual production process of valve stem seals, it is particularly difficult to obtain a sufficient dataset of defect samples, which greatly limits the detection capability and accuracy of deep models for defects.
[0007] Second, single-defect identification algorithms cannot meet the inspection needs in actual production. The quality inspection requirement for valve oil seals is zero defects. For a practically applicable full-process algorithm, it is required to have the ability to identify multiple defects and high-precision identification of complex defects, so as to achieve effective classification of qualified and unqualified products.
[0008] To address the problems existing in the practical application of the above-mentioned valve stem seal defect detection methods, this invention proposes a comprehensive defect detection method for valve stem seals in the industry, which effectively detects a variety of defects by combining traditional methods with deep learning. Summary of the Invention
[0009] In view of the technical problems existing in the related technologies, the present invention provides a comprehensive defect detection method for valve stem seal industrial defects, and on the other hand, provides a comprehensive defect detection system for valve stem seal industrial defects.
[0010] This invention is implemented as follows:
[0011] A comprehensive defect detection method for valve stem seals, which inspects the valve stem seal lip, the surface of the metal skeleton, and the lower spring seat, includes the following steps:
[0012] Step 1: Collect a top view image of the valve stem seal, obtain the lip radius and lower spring seat radius data from the front-end interface, and perform regional positioning and detection of the lip rubber head and lower spring seat;
[0013] Step 2: Acquire a side view image of the valve stem seal, obtain the height of the metal frame and the height of the lip from the front-end interface, and locate and detect the metal frame, the bottom edge of the lip, and the compression spring.
[0014] Step 3: Acquire a bottom view image of the valve stem seal, locate and inspect the lower spring seat area;
[0015] Step 4: Integrate the detection information obtained in Steps 1, 2, and 3 to determine whether the products are qualified or unqualified.
[0016] Furthermore, the positioning of the lip rubber head and lower spring seat area in step 1 involves contour detection of the top view image described in step 1, positioning the oil seal by the outermost circumscribed rectangle, and cropping the lip rubber head ROI and the top view lower spring seat ROI using the known parameters from step 1.
[0017] Furthermore, step 1, lip and mouth glue tip detection and lower spring seat detection, includes: lip and mouth skeleton segmentation, burr recognition, lip and mouth glue tip detection, and lower spring seat detection, as detailed below:
[0018] 3-1) Lip skeleton segmentation: Perform contour detection on the top view image of the valve oil seal acquired in step 1, perform polygon fitting on the obtained contour, and obtain the skeleton contour of the lip rubber head image after certain conditions. Oil seals whose contour level does not meet the corresponding level are judged to be defective.
[0019] 3-2) Lip and mouth glue tip detection: The ROI of the lip and mouth glue tip is predicted using a Siamese network deep model, and the result of whether it is qualified is output;
[0020] 3-3) Lower Spring Seat Inspection: After preprocessing the top-view lower spring seat ROI, convex hull identification is performed. The area and grayscale moment of the convex hull are calculated. Convex hulls that do not meet the threshold are judged as glue drip points, which are unqualified products.
[0021] Furthermore, the training method for the classifier in the Siamese network deep model is as follows:
[0022] 3-2-1): Divide the preprocessed ROI dataset of the lip glue head into two parts: positive examples and negative examples, and divide them into training set, validation set and test set;
[0023] 3-2-2): The dataset is fed into a VGG-based Siamese network deep model for training;
[0024] 3-2-3): The trained model predicts the image to be detected and obtains the similarity between the image to be detected and the image of the qualified product. If the similarity is low, it is judged as a qualified product.
[0025] Furthermore, the positioning of the metal skeleton, lip bottom edge, and compression spring area in step 2 includes: obtaining the valve stem seal width, obtaining the valve stem seal height, and cutting, as detailed below:
[0026] 4-1) Valve seal width acquisition: The upper half of the image is cropped along the 1 / 2 position of the side view image, and the width value of the horizontal valve seal metal skeleton is detected after preprocessing;
[0027] 4-2) Valve oil seal height acquisition: Perform double threshold binarization on the image, divide the binarized image into N equal parts along the horizontal direction, perform an OR operation on the N equal parts of the image, and then perform outer horizontal line recognition to obtain the vertical valve oil seal metal skeleton height.
[0028] 4-3) Cutting: The compression spring ROI, metal skeleton ROI, and lip bottom edge ROI are obtained by cutting the data in the steps.
[0029] Furthermore, the metal skeleton detection in step 2 involves convex hull identification of the metal skeleton ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue drop points, which are considered defective products.
[0030] Furthermore, in step 2, the lip underside edge detection involves predicting the lip underside edge ROI using a Siamese network deep model. The Siamese network classifier training method is as follows:
[0031] 6-1): Divide the preprocessed ROI dataset of the oil seal shoulder into two parts: positive examples and negative examples, and divide them into training set, validation set and test set;
[0032] 6-2): Feed the dataset into a VGG-based Siamese network deep model for training;
[0033] 6-3): The trained model described in step 6-2) predicts the image to be detected and obtains the similarity between the image to be detected and the image of the qualified product. If the similarity is low, it is judged as a qualified product.
[0034] Furthermore, the spring detection in step 2 includes: precise positioning, stripe gap identification, and stripe amplitude distribution change identification, as detailed below:
[0035] 7-1) Precise positioning: Perform convex hull identification on the compression spring ROI, and fit the position of the horizontal line where the zero-order moment of the convex hull is densely distributed to obtain the accurate position of the spring area to be identified;
[0036] 7-2) Stripe gap recognition: After precise positioning, the image is opened in the horizontal direction to obtain an image that only focuses on the stripe distance information. The distance between the stripes is identified. If the distance exceeds the specified threshold, it is judged that the spring is broken, that is, the product is unqualified.
[0037] 7-3): Identification of stripe amplitude distribution changes: Binarize the compression spring ROI, then perform left and right folding operations. If there is a white stripe area with an excessively large area, it proves that the amplitude change is asymmetrical and is judged as defective, i.e., unqualified product.
[0038] Furthermore, in step 3, the positioning of the lower spring seat area involves performing contour detection on the bottom view image described in step 3, positioning the oil seal using the outermost circumscribed rectangle, and cropping the bottom view lower spring seat ROI using the known parameters from step 1.
[0039] Furthermore, in step 3, the lower spring seat detection involves identifying the convex hull of the lower spring seat ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue dripping points, which are considered unqualified products.
[0040] Compared with the prior art, the beneficial effects of this invention are as follows:
[0041] 1) Using a Siamese network deep model to identify the rubber head of the oil seal solves the problems of many types of rubber head defects, large number, varying degrees of defects, and small defect features. It achieves high-precision detection with a small defect dataset, and solves the difficulties of training deep models with insufficient samples and uneven positive and negative samples. It can effectively solve the pain points of the quality inspection process in practical applications.
[0042] 2) The ROI extraction algorithm is highly robust and has good recognition performance. Based on the actual image sampling situation, the corresponding algorithm is designed for each part, which is efficient and effective. The spring recognition algorithm is more innovative and has more accurate detection capabilities. It is innovative and different from previous recognition algorithms. It provides a new solution for the common defect of valve stem spring.
[0043] 3) It features a groundbreaking, systematic detection system for various valve stem seal defects. The system comprehensively detects a wide range of defects and provides effective solutions for many challenging quality control issues encountered in actual production. This significantly reduces the risks associated with manual re-inspection and has practical application value. It is capable of detecting different valve stem seal models, boasts good system compatibility and robust algorithms, aligns well with quality control requirements, and effectively meets customer needs. Attached Figure Description
[0044] Figure 1 This is a diagram of the valve stem seal structure;
[0045] Figure 2 This is a schematic flowchart of the method steps of the present invention;
[0046] Figure 3 This is a top-view sampled image of the valve stem seal processed by the method of the present invention, showing the effect after sampling.
[0047] Figure 4 This is a bottom-view sampled image of the valve stem seal processed by the method of the present invention, showing the effect after sampling.
[0048] Figure 5 This is a side-view sampled image of the valve stem seal processed by the method of the present invention, showing the effect after sampling. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0050] Table 1 provides an overview of the types of defects encountered in the actual production of valve stem seals, and also addresses the issues addressed by the method of this invention.
[0051] Table 1:
[0052]
[0053] This invention's method operates on a valve stem seal quality inspection line. The relevant equipment includes a high-precision industrial camera, an industrial computer, a glass turntable, an LED ring light source, and an LED surface light source. The industrial camera transmits information to the computer via USB to acquire images. All inspection equipment is housed in a darkroom to eliminate interference from unstable ambient light. The industrial camera is controlled by a PLC; when the valve stem seal reaches the inspection position, a hardware trigger controls the camera to sample. Inspection positions include top-down, side-down, and bottom-up views. The acquired surface image of the valve stem seal is transmitted to the host computer, where software calculations are used to perform the inspection.
[0054] The method of this invention requires a certain number of sampled images for the construction of traditional algorithms and as a dataset for the Siamese network. Specifically, these are grayscale images of different sizes, defect locations, and acquisition angles to achieve the goal of encompassing all aspects and various types of defects in valve stem seals. The grayscale image resolution is 1292*964, ensuring that the acquired images can clearly and completely represent valve stem seal defects.
[0055] See Figure 2 As shown, the defect detection method of the present invention includes the following steps:
[0056] Step 1: Acquire a top-view image of the valve stem seal (see...) Figure 3 The lip radius and lower spring seat radius data are obtained from the front-end interface, and the lip rubber head and lower spring seat are located and detected in the region.
[0057] Step 2: Acquire a side view image of the valve stem seal (see...) Figure 5 The system obtains the height of the metal skeleton and the height of the lip from the front-end interface, and performs regional positioning and detection of the metal skeleton, the bottom edge of the lip, and the compression spring.
[0058] Step 3: Acquire a bottom view image of the valve stem seal (see...) Figure 4 The lower spring seat is located and inspected in the relevant area.
[0059] Step 4: Integrate the detection information obtained in Steps 1, 2, and 3 to determine whether the products are qualified or unqualified.
[0060] In step 1, the localization of the lip rubber head and the lower spring seat area involves contour detection of the top view image, positioning the oil seal using the outermost circumscribed rectangle, and cropping the lip rubber head ROI and the top-view lower spring seat ROI (ROI being the region of interest) using known parameters.
[0061] The inspection of the lip and mouthpiece rubber tip and the lower spring seat includes: lip and mouthpiece skeleton segmentation, lip and mouthpiece rubber tip inspection, and lower spring seat inspection, as detailed below:
[0062] Lip and oil seal skeleton segmentation: Canny edge detection and then contour detection are performed on the acquired top view image of the valve oil seal. Polygon fitting is performed on the obtained contour. After certain conditions are selected, the skeleton contour of the lip and oil seal image is obtained. Oil seals whose contour level does not meet the corresponding level are judged to be defective.
[0063] Lip and mouth glue tip detection: The ROI of the lip and mouth glue tip is predicted using a Siamese network deep model, and the result of whether it is qualified is output. The training method of the Siamese network classifier is as follows: 1) The lip and mouth glue tip is segmented into a circular glue tip region, the background is blacked out, and a dataset is made and divided into positive and negative examples. Training set, validation set and test set are also divided; 2) The dataset is fed into a Siamese network deep model based on VGG for training; 3) The trained model predicts the image to be detected and obtains the similarity between the image to be detected and the qualified product image. If the similarity is low, it is judged as unqualified.
[0064] Lower spring seat inspection: After preprocessing the top-view lower spring seat ROI, convex hull identification is performed, the area and grayscale moment of the convex hull are calculated, and convex hulls that do not meet the threshold are judged as glue drip points, which are unqualified products.
[0065] Acquire side view images of valve stem seals, obtain metal skeleton height and lip height data from the front-end interface, and locate and detect the metal skeleton, lip bottom edge, and compression spring.
[0066] The positioning of the metal skeleton, lip bottom edge, and compression spring area includes: obtaining the valve stem seal width, obtaining the valve stem seal height, and cutting, as detailed below:
[0067] Valve seal width acquisition: The upper half of the image is cropped along the 1 / 2 position of the side view image, the grayscale image is binarized, the edges are smoothed, and a clear binarized image of the metal skeleton width is obtained. The width value of the valve seal metal skeleton in the horizontal direction is detected.
[0068] Valve seal height acquisition: Perform double threshold binarization on the image, divide the binarized image into N equal parts along the horizontal direction, perform an OR operation on the N equal parts of the image, and then perform outer horizontal line recognition to obtain the vertical valve seal metal skeleton height.
[0069] Extraction: The compression spring ROI, metal skeleton ROI, and lip bottom edge ROI are extracted using known data;
[0070] Metal skeleton detection involves identifying the convex hull of the metal skeleton ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue drop points, which are considered unqualified products.
[0071] Lip underside edge detection involves predicting the ROI of the lip underside edge using a Siamese network. The training method for the Siamese network classifier is as follows:
[0072] The oil seal shoulder was edge-identified using the Sobel operator along both the longitudinal and transverse directions. The identification results in both directions were then superimposed according to a ratio of 0.9:0.1. The resulting ROI dataset was divided into positive and negative examples, and training, validation and test sets were also defined.
[0073] The dataset is fed into a VGG-based Siamese network deep model for training;
[0074] The trained model is used to predict the image to be detected, and the similarity between the image to be detected and the image of the qualified product is obtained. If the similarity is low, the image is judged as unqualified.
[0075] The methods for detecting compression springs include: precise positioning, stripe gap identification, and stripe amplitude distribution change identification, as detailed below:
[0076] Precise positioning: The convex hull of the compression spring ROI is identified, the zero-order moment of the convex hull is fitted, its coordinate distribution is obtained, and the position of the densely distributed vertical coordinates is calculated, thus obtaining the accurate position of the spring area to be identified.
[0077] Stripe gap recognition: Perform a horizontal opening operation on the above image to obtain an image that only focuses on the stripe distance information. Identify the distance between the stripes. If the distance exceeds the specified threshold abruptly, it is judged that the spring is broken, i.e., it is a defective product.
[0078] Stripe amplitude distribution variation identification: Binarize the compression spring ROI, then perform left and right folding and AND operations. The resulting image has white band areas with excessively large areas, which proves that the amplitude variation is asymmetrical and is judged as defective, i.e., unqualified product.
[0079] Acquire a bottom view image of the valve stem seal, locate and inspect the lower spring seat area;
[0080] The lower spring seat area positioning involves contour detection of the bottom view image, positioning the oil seal using the outermost circumscribed rectangle, and cropping the bottom view lower spring seat ROI using the known parameters from step 3.1.
[0081] The lower spring seat detection involves identifying the convex hull of the lower spring seat ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue dripping points, which are considered unqualified products.
[0082] The detection information obtained from steps 1, 2, and 3 is integrated. By inspecting different parts through these steps, the defective parts can be identified, and qualified and unqualified products can be determined.
[0083] This invention provides a comprehensive defect detection system for valve stem seals in industrial applications. The system includes:
[0084] The data acquisition unit collects top, side, and bottom views of the valve stem seal, and obtains data on the lip radius, lower spring seat radius, metal frame height, and lip height from the front-end interface.
[0085] The region positioning unit locates the lip rubber head and lower spring seat region, as well as the metal skeleton, lip bottom edge and compression spring region, based on the acquired data and images. Among them, the lip rubber head and lower spring seat region positioning is to perform contour detection on the top view image, locate the oil seal by the outermost circumscribed rectangle, and cut out the lip rubber head ROI and the top view lower spring seat ROI according to the known parameters in step 1.
[0086] The positioning of the metal skeleton, lip bottom edge, and compression spring area includes: obtaining the valve stem seal width, obtaining the valve stem seal height, and cutting, specifically including:
[0087] Valve seal width acquisition module: The upper half of the image is cropped along the 1 / 2 position of the side view image, and the width value of the valve seal metal skeleton in the horizontal direction is detected after preprocessing;
[0088] Valve seal height acquisition module: Performs double threshold binarization on the image, divides the binarized image into N equal parts along the horizontal direction, performs an OR operation on the N equal parts of the image, and then performs outer horizontal line recognition to obtain the vertical valve seal metal skeleton height.
[0089] The interception module intercepts the compression spring ROI, the metal skeleton ROI, and the bottom edge ROI.
[0090] The lower spring seat area positioning is achieved by performing contour detection on the bottom view image, positioning the oil seal by the outermost circumscribed rectangle, and cropping the bottom view lower spring seat roi using known parameter proportions.
[0091] The detection unit performs detection on the lip rubber head, lower spring seat, metal frame, lip bottom edge, and compression spring based on the area positioning results; among which:
[0092] The detection of the lip and mouth glue tip and the lower spring seat includes: lip and mouth skeleton segmentation, burr recognition, lip and mouth glue tip detection, and lower spring seat detection, which are specifically implemented through the following modules:
[0093] Lip and oil seal skeleton segmentation: Contour detection is performed on the acquired top view image of the valve oil seal, polygon fitting is performed on the obtained contour, and the skeleton contour of the lip and oil seal image is obtained after certain conditions are selected. Oil seals whose contour level does not meet the corresponding level are judged to be defective.
[0094] Lip and mouth glue tip detection: The ROI of the lip and mouth glue tip is predicted using a Siamese network deep model, and the result of whether it is qualified is output;
[0095] Lower spring seat inspection: After preprocessing the top-view lower spring seat ROI, convex hull identification is performed, the area and grayscale moment of the convex hull are calculated, and convex hulls that do not meet the threshold are judged as glue drip points, which are unqualified products;
[0096] Metal skeleton detection involves identifying the convex hull of the metal skeleton ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue drop points, which are considered unqualified products.
[0097] Lip underside edge detection involves predicting the ROI of the lip underside using a Siamese network deep model.
[0098] Compression spring detection includes: precise positioning, stripe gap identification, and stripe amplitude distribution change identification, as detailed below:
[0099] Precise positioning: The convex hull of the compression spring ROI is identified, and the position of the horizontal line with the dense distribution of the zero-order moment of the convex hull is fitted to obtain the accurate position of the spring area to be identified;
[0100] Stripe gap recognition: After precise positioning, the image is opened in the horizontal direction to obtain an image that only focuses on the stripe distance information. The distance between the stripes is identified. If the distance exceeds the specified threshold, it is judged that the spring is broken, that is, the product is unqualified.
[0101] Stripe amplitude distribution variation identification: Binarize the compression spring ROI, then fold it left and right. If there is a white stripe area with an excessively large area, it indicates that the amplitude variation is asymmetrical and is judged as defective, i.e., unqualified product.
[0102] The lower spring seat inspection involves identifying the convex hull of the lower spring seat ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue dripping points, which are considered unqualified products.
[0103] Judgment unit: Determines whether a product is qualified based on the test results.
[0104] The detection unit also includes a Siamese network deep model module. The Siamese network deep model module divides the ROI dataset into positive and negative examples, and sets training, validation and test sets. The dataset is then trained. The trained Siamese network deep model predicts the image to be detected and obtains the similarity between the image to be detected and the qualified product image. If the similarity is low, the image is judged as unqualified.
[0105] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A comprehensive defect detection system for valve stem seals in industrial applications, characterized in that, The system includes: The data acquisition unit collects top, side, and bottom views of the valve stem seal, and obtains data on the lip radius, lower spring seat radius, metal frame height, and lip height from the front-end interface. The region positioning unit locates the lip rubber head and lower spring seat region, as well as the metal skeleton, lip bottom edge, and compression spring region, based on the acquired data and images. Among them, the lip rubber head and lower spring seat region positioning involves contour detection of the top view image, positioning the oil seal by the outermost circumscribed rectangle, and cropping the lip rubber head ROI and the top view lower spring seat ROI with known parameters and proportions. The positioning of the metal skeleton, lip bottom edge, and compression spring area includes: obtaining the valve stem seal width, obtaining the valve stem seal height, and cutting, as detailed below: Valve seal width acquisition: The upper half of the image is cropped along the 1 / 2 position of the side view image, and the width value of the horizontal valve seal metal skeleton is detected after preprocessing; Valve seal height acquisition: Perform double threshold binarization on the image, divide the binarized image into N equal parts along the horizontal direction, perform an OR operation on the N equal parts of the image, and then perform outer horizontal line recognition to obtain the vertical valve seal metal skeleton height. Cutting: The compression spring ROI, the metal skeleton ROI, and the bottom edge ROI are cut off; The lower spring seat area positioning is performed by contour detection of the bottom view image, positioning the oil seal by the outermost circumscribed rectangle, and cropping the bottom view lower spring seat roi using the known parameters in step 1. The detection unit performs detection on the lip rubber head, lower spring seat, metal frame, lip bottom edge, and compression spring based on the area positioning results; among which: The detection of the lip and mouth glue tip and the lower spring seat includes: lip and mouth skeleton segmentation, burr recognition, lip and mouth glue tip detection, and lower spring seat detection, as detailed below: Lip and oil seal skeleton segmentation: Contour detection is performed on the acquired top view image of the valve oil seal, polygon fitting is performed on the obtained contour, and the skeleton contour of the lip and oil seal image is obtained after certain conditions are selected. Oil seals whose contour level does not meet the corresponding level are judged to be defective. Lip and mouth glue tip detection: The ROI of the lip and mouth glue tip is predicted using a Siamese network deep model, and the result of whether it is qualified is output; Lower spring seat inspection: After preprocessing the top-view lower spring seat ROI, convex hull identification is performed, the area and grayscale moment of the convex hull are calculated, and convex hulls that do not meet the threshold are judged as glue drip points, which are unqualified products; Metal skeleton detection involves identifying the convex hull of the metal skeleton ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue drop points, which are considered unqualified products. Lip underside edge detection involves predicting the ROI of the lip underside using a Siamese network deep model. Compression spring detection includes: precise positioning, stripe gap identification, and stripe amplitude distribution change identification, as detailed below: Precise positioning: The convex hull of the compression spring ROI is identified, and the position of the horizontal line with the dense distribution of the zero-order moment of the convex hull is fitted to obtain the accurate position of the spring area to be identified; Stripe gap recognition: After precise positioning, the image is opened in the horizontal direction to obtain an image that only focuses on the stripe distance information. The distance between the stripes is identified. If the distance exceeds the specified threshold, it is judged that the spring is broken, that is, the product is unqualified. Stripe amplitude distribution variation identification: Binarize the compression spring ROI, then fold it left and right. If there is a white stripe area with an excessively large area, it indicates that the amplitude variation is asymmetrical and is judged as defective, i.e., unqualified product. The lower spring seat inspection involves identifying the convex hull of the lower spring seat ROI, calculating the area and grayscale moment of the convex hull, and identifying convex hulls that do not meet the threshold as glue dripping points, which are considered unqualified products. Judgment unit: Determines whether a product is qualified based on the test results.
2. A comprehensive defect detection method for valve stem seals in the automotive industry, employing the comprehensive defect detection system for valve stem seals as described in claim 1, characterized in that... The method for inspecting the valve stem seal lip, the surface of the metal frame, and the lower spring seat includes the following steps: Step 1: Collect a top view image of the valve stem seal, obtain the lip radius and lower spring seat radius data from the front-end interface, and perform regional positioning and detection of the lip rubber head and lower spring seat; Step 2: Acquire a side view image of the valve stem seal, obtain the height of the metal frame and the height of the lip from the front-end interface, and locate and detect the metal frame, the bottom edge of the lip, and the compression spring. Step 3: Acquire a bottom view image of the valve stem seal, locate and inspect the lower spring seat area; Step 4: Integrate the detection information obtained in Steps 1, 2, and 3 to determine whether the products are qualified or unqualified.
3. The comprehensive defect detection method for valve stem seals according to claim 2, characterized in that, The training method for the classifier in a Siamese network deep model is as follows: 3-2-1): Divide the preprocessed ROI dataset of the lip glue head into two parts: positive examples and negative examples, and divide them into training set, validation set and test set; 3-2-2): The dataset is fed into a VGG-based Siamese network deep model for training; 3-2-3): The trained model predicts the image to be detected and obtains the similarity between the image to be detected and the image of the qualified product. If the similarity is low, it is judged as a qualified product.
4. The comprehensive defect detection method for valve stem seals according to claim 2, characterized in that, Step 2, lip underside edge detection, involves predicting the lip underside edge ROI using a Siamese network deep model. The Siamese network classifier training method is as follows: 6-1): Divide the preprocessed ROI dataset of the oil seal shoulder into two parts: positive examples and negative examples, and divide them into training set, validation set and test set; 6-2): Feed the dataset into a VGG-based Siamese network deep model for training; 6-3): The trained model described in step 6-2) predicts the image to be detected and obtains the similarity between the image to be detected and the image of the qualified product. If the similarity is low, it is judged as a qualified product.