A valve sealing surface defect detection method and system based on image recognition
By combining multi-focal length image acquisition, optical flow algorithm and convolutional neural network, the problem of unstable image features caused by differences in light and material in valve sealing surface inspection is solved, realizing high-precision defect detection and 3D modeling, and improving the accuracy and completeness of inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG AILUWEI FLUID TECH CO LTD
- Filing Date
- 2026-02-07
- Publication Date
- 2026-06-23
AI Technical Summary
Existing image recognition technologies are susceptible to light interference and material differences in valve sealing surface inspection, resulting in unstable image feature extraction and difficulty in achieving high-precision defect detection, especially due to insufficient correlation of defect features between layers with different focal lengths.
Multi-focal-length image acquisition combined with optical flow algorithm is used to establish interlayer continuity correlation. Displacement compensation value is calculated by gradient change rate and noise is reduced by convolutional neural network. Boundary sharpness attenuation is fused and defect depth value is calculated iteratively to construct defect tracking chain to generate overall depth model.
It enables precise identification of microscopic defects on valve sealing surfaces, improves the accuracy and stability of detection, provides complete three-dimensional morphology and depth information of defects, and ensures the consistency and traceability of detection results.
Smart Images

Figure CN122265154A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image recognition and defect detection technology, and in particular to a method and system for detecting defects on valve sealing surfaces based on image recognition. Background Technology
[0002] In the industrial manufacturing sector, valves, as core components of fluid control, directly determine the safety and reliability of equipment operation due to the integrity of their sealing surfaces. Even minor defects in the sealing surfaces can lead to serious consequences such as media leakage and system failure; therefore, accurate and efficient defect detection is crucial. Image recognition, as a non-contact, high-efficiency mainstream inspection technology, is widely used in industrial inspection due to its intelligent analysis advantages. Valve sealing surface defect detection based on image recognition not only relates to product quality control before shipment but also has a profound impact on the continuity of industrial production and the optimization of operation and maintenance costs, making it a key link in improving the level of intelligence in industrial inspection.
[0003] However, existing image recognition and detection methods have significant limitations under complex working conditions. Valve sealing surfaces are made of diverse materials with uneven surface reflectivity. Traditional image recognition technologies are easily affected by light interference and material differences, leading to unstable image feature extraction. At the same time, in multi-layer image scanning, shallow images are prone to pixel displacement due to uneven reflectivity, while deep images face problems such as reduced boundary sharpness and noise interference. This makes it difficult to guarantee the correlation of defect features between different focal length layers during image recognition, resulting in insufficient detection accuracy and stability, and failing to meet the high-precision detection requirements of industrial scenarios.
[0004] Therefore, how to accurately compensate for image position deviations in the image recognition process, while maintaining the continuous matching of defect features between layers of different depths, has become a key challenge that image recognition technology urgently needs to overcome in the field of industrial inspection, addressing the core pain point of uneven reflectivity on valve sealing surfaces. Solving this problem directly determines the reliability and practicality of image recognition defect detection. It can not only overcome the challenges of image recognition detection caused by complex surface characteristics, but also provide technical support for image recognition defect detection of industrial valves and even similar precision components, which is of great practical significance for promoting the upgrading of industrial inspection technology. Summary of the Invention
[0005] This invention provides a valve sealing surface defect detection method and system based on image recognition, which specifically addresses the core problems of valve sealing surface reflectivity interference, deep boundary sharpness attenuation, and insufficient accuracy of defect depth detection. It achieves accurate identification and deep modeling of micro-defects, providing technical support for ensuring valve sealing performance and improving equipment operational reliability.
[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a valve sealing surface defect detection method based on image recognition, comprising:
[0007] The valve sealing surface is captured by multi-focal-length images using imaging equipment to obtain the original image sequence;
[0008] Based on the original image sequence, the defect contour is analyzed, and a preset optical flow algorithm is used to track the appearance of the same defect in different focal length layers, and a preliminary inter-layer continuity association is established.
[0009] To address the pixel displacement in shallow images caused by uneven reflectivity, a displacement compensation value is calculated based on the gradient change rate in the preliminary interlayer continuity correlation, and image compensation is performed to obtain a compensated image sequence.
[0010] A convolutional neural network is used to denoise the compensated image sequence, and the gradient change rate is fused to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour.
[0011] Based on the compensated defect contour and the preliminary interlayer continuity correlation, the depth value of the defect is iteratively calculated, and the point data of the compensated image sequence is fused to obtain the depth distribution information of each defect point.
[0012] Based on the depth distribution information, the evolution path of defects in the original image sequence is traced to establish a defect tracing chain;
[0013] Based on the interlayer correlation data of the defect tracking chain, an overall depth model of the microscopic defects on the valve sealing surface is generated, and the final defect tracking result is determined.
[0014] In one optional implementation, the step of acquiring multi-focal-length images of the valve sealing surface using an imaging device to obtain an original image sequence includes:
[0015] The imaging equipment is initialized with parameters. The focal length adjustment step and scanning depth range are preset according to the surface size and material properties of the valve sealing surface, and the focal length adjustment gradient from shallow to deep is determined.
[0016] After initialization, the imaging device is aligned with the detection area of the valve sealing surface. The focal length parameters are adjusted layer by layer according to the preset focal length adjustment step size and the focal length adjustment gradient. The original image of the sealing surface is acquired at each focal length layer and the corresponding focal length parameters are recorded.
[0017] The original images acquired at each focal length layer are time-stamped, and all original images are integrated in the scanning order from shallow to deep focal length to form an ordered sequence of original images.
[0018] In one optional implementation, the step of analyzing the defect contour based on the original image sequence and using a preset optical flow algorithm to track the manifestation of the same defect in different focal length layers to establish a preliminary inter-layer continuity association includes:
[0019] Based on the original image sequence, the defect contour features of the valve sealing surface in each focal length layer image are identified by the edge detection algorithm, and the pixel coordinates and morphological parameters are marked to obtain the defect contour feature points.
[0020] Based on the defect contour feature points, a preset optical flow algorithm is used to calculate the pixel displacement vector of the same defect contour feature point between images of different focal length layers, and then the corresponding feature points of the same defect in each focal length layer are matched to obtain cross-layer matching feature points.
[0021] Using the cross-layer matching feature points as the core, a spatial mapping relationship of defect contours between layers with different focal lengths is constructed, and a preliminary inter-layer continuity association of the same defect in multi-layer images is established.
[0022] In one optional implementation, the step of calculating the displacement compensation value based on the gradient change rate in the preliminary interlayer continuity correlation and performing image compensation to obtain a compensated image sequence includes:
[0023] The gradient change rate of the interlayer defect contours at different focal lengths is extracted from the preliminary interlayer continuity correlation, and the pixel displacement deviation caused by uneven reflectivity in the shallow image is quantified based on the gradient change rate.
[0024] A pixel displacement compensation model is constructed based on the gradient change rate, and the displacement compensation value corresponding to each offset feature point is calculated by substituting the pixel displacement deviation into it, and the appropriate focal length offset calibration parameters are determined simultaneously.
[0025] Based on the displacement compensation value and focal length offset calibration parameters, the offset feature points of the shallow image are calibrated point by point to correct the pixel position deviation caused by uneven reflectivity.
[0026] The coordinate-calibrated shallow layer image is integrated with other focal layer images in an orderly manner according to the scanning level to form the compensated image sequence.
[0027] In one optional implementation, the step of using a convolutional neural network to denoise the compensated image sequence and fusing the gradient change rate to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour includes:
[0028] The compensated image sequence is input into a pre-trained convolutional neural network, and system noise and environmental interference noise are filtered layer by layer through feature extraction layer and noise reduction layer, and defect features of each focal length layer image are extracted.
[0029] The gradient change rate is retrieved and incorporated into the convolutional neural network as a feature enhancement factor to compensate for and enhance the attenuated sharpness of defect boundaries in deep images.
[0030] Based on the sharpness-compensated deep images, the defect features of each focal length layer are aligned to maintain the continuity of defect feature matching between layers.
[0031] The defect features of each focal length layer image are integrated after noise reduction and sharpness compensation, and the defect contours of each focal length layer image are reconstructed to determine the compensated defect contours.
[0032] In one optional implementation, the step of iteratively calculating the depth value of the defect based on the compensated defect contour and the preliminary interlayer continuity correlation, and fusing the point data of the compensated image sequence to obtain the depth distribution information of each defect point, includes:
[0033] Based on the compensated defect contour and combined with the preliminary interlayer continuity correlation, a defect depth calculation model is constructed, and the depth estimate of each defect feature point is initialized.
[0034] The pixel coordinates and focal length parameters of each defect feature point in the compensated image sequence are extracted and incorporated into the defect depth calculation model to iteratively solve the depth value of each defect feature point.
[0035] The convergence of the depth value is verified. If the preset accuracy threshold is not reached, the parameters of the defect depth calculation model are adjusted and iterated again until the depth values of all defect feature points reach the preset accuracy threshold.
[0036] The depth values after convergence and verification are summarized and integrated according to the spatial position mapping relationship of the valve sealing surface to form the depth distribution information of each defect point.
[0037] In one optional implementation, the step of tracing the evolution path of defects in the original image sequence based on the depth distribution information and establishing a defect tracing chain includes:
[0038] Analyze the spatial coordinates and depth values of each defect point in the depth distribution information to locate the same source location of the same defect in images with different focal length layers.
[0039] Using the spatial location of the same defect in each focal length layer as a node, the nodes are sequentially connected in order from shallow to deep focal length to form the complete evolution path of the same defect in the compensated image sequence.
[0040] Based on the node associations of the complete evolution path, an inter-layer mapping link for defect features is constructed, and the preliminary inter-layer continuity associations are integrated to form a defect tracking chain.
[0041] In one optional implementation, the generation of a comprehensive depth model of microscopic defects on the valve sealing surface based on the interlayer correlation data of the defect tracking chain, and the determination of the final defect tracking result, includes:
[0042] The interlayer correlation data of each focal layer in the defect tracking chain is extracted. Based on the curved topology of the valve sealing surface, the interlayer correlation data is mapped to a three-dimensional spatial coordinate system according to the spatial mapping rules to construct a three-dimensional depth framework of the micro-defects of the valve sealing surface.
[0043] The depth distribution information is filled into the three-dimensional depth frame, and the inter-layer correlation of cross-layer matching feature points is fused to generate an overall depth model;
[0044] Based on the overall depth model, the three-dimensional shape, precise spatial location and extension range of the defect are analyzed, and the final defect tracking result including defect type, size parameters and depth distribution is output.
[0045] The interlayer correlation data includes the spatial coordinates, depth values, contour morphology parameters, and cross-layer matching relationship data of the defect feature points.
[0046] Secondly, the present invention also provides a valve sealing surface defect detection system based on image recognition, comprising:
[0047] Multifocal image acquisition module: Acquires multifocal images of the valve sealing surface using imaging equipment to obtain the original image sequence;
[0048] Interlayer correlation establishment module: Analyze the defect contour based on the original image sequence, and use a preset optical flow algorithm to track the appearance of the same defect in different focal length layers to establish preliminary interlayer continuity correlation;
[0049] Image displacement compensation module: For shallow image pixel displacement caused by uneven reflectivity, it calculates displacement compensation value based on the gradient change rate in the preliminary interlayer continuity association and performs image compensation to obtain the compensated image sequence;
[0050] Noise reduction and sharpness compensation module: The convolutional neural network is used to reduce the noise of the compensated image sequence, and the gradient change rate is fused to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour.
[0051] Defect depth calculation module: Based on the compensated defect contour and the preliminary interlayer continuity correlation, iteratively calculate the depth value of the defect, fuse the point data of the compensated image sequence, and obtain the depth distribution information of each defect point.
[0052] Tracing Chain Construction Module: Based on the depth distribution information, traces the evolution path of defects in the original image sequence and establishes a defect tracing chain;
[0053] Final Defect Tracking Module: Based on the interlayer correlation data of the defect tracking chain, it generates an overall depth model of the microscopic defects on the valve sealing surface and clarifies the final defect tracking results.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] (1) A multi-focal-length layered image acquisition scheme is adopted to fully capture the defect features and details of the valve sealing surface from shallow to deep layers, construct a complete original image sequence, avoid the problem of missing small and deep defects by single focal length images, adapt to the multi-dimensional feature presentation requirements of micro-defects on the sealing surface, and lay a comprehensive data foundation for subsequent accurate defect identification and in-depth analysis.
[0056] (2) By using a preset optical flow algorithm to track the manifestation of the same defect in different focal length layers, a preliminary interlayer continuity association of defect features is established, which effectively solves the problem of fuzzy correspondence between defects in different focal length layers, significantly improves the accuracy and stability of cross-layer feature matching, and provides a reliable association basis for subsequent displacement compensation and depth calculation.
[0057] (3) Based on the gradient change rate in the preliminary interlayer continuity association, the pixel displacement deviation is quantified, and the positional shift of the shallow image caused by uneven reflectivity is specifically corrected. The detection interference caused by the surface material characteristics is accurately offset, the defect positioning deviation is avoided, and the accuracy and reliability of the shallow image defect feature extraction are greatly improved.
[0058] (4) By integrating convolutional neural network noise reduction and gradient rate of change sharpness compensation technology, system noise and environmental interference in the compensated image sequence are filtered out simultaneously, and the sharpness of the defect boundary of deep image attenuation is specifically enhanced, solving the problem that traditional methods cannot balance noise reduction and boundary preservation, obtaining defect images with clear outlines and complete features, and improving the recognition and accuracy of defect identification.
[0059] (5) Combine the defect contour after compensation with the interlayer correlation data to iteratively calculate the defect depth value, integrate multi-dimensional point data to generate depth distribution information, break through the limitation of traditional two-dimensional detection that can only identify surface defects, accurately quantify the three-dimensional spatial size and depth characteristics of defects, avoid misjudgment of defect severity due to lack of depth information, and provide comprehensive data support for defect assessment.
[0060] (6) Based on deep distribution information, trace the defect evolution path and build a complete defect tracking chain. Integrate inter-layer correlation data to strengthen the continuity of cross-layer features, effectively avoid the detection discontinuity problem caused by defect feature breakage, improve the defect full-process traceability capability, and ensure the integrity, consistency and traceability of detection results.
[0061] (7) Generate a micro-defect overall depth model by using the inter-layer correlation data of the defect tracking chain, intuitively present the three-dimensional shape, precise spatial location and extension range of the defect, solve the problem of fragmented and incomplete information in traditional detection results, realize the integrated detection of defects from two-dimensional identification to three-dimensional modeling, and provide scientific and accurate technical support for valve sealing surface maintenance plan formulation and risk prediction. Attached Figure Description
[0062] Figure 1 This is a schematic flowchart of a valve sealing surface defect detection method based on image recognition provided in an embodiment of the present invention;
[0063] Figure 2 This is a schematic diagram of a valve sealing surface defect detection system based on image recognition provided in an embodiment of the present invention. Detailed Implementation
[0064] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0065] Reference Figure 1 This invention provides a method for detecting defects on valve sealing surfaces based on image recognition, comprising the following steps:
[0066] S11, Multi-focal distance images of the valve sealing surface are acquired using imaging equipment to obtain the original image sequence;
[0067] S12, Analyze the defect contour based on the original image sequence, and use a preset optical flow algorithm to track the appearance of the same defect in different focal length layers, and establish a preliminary inter-layer continuity association.
[0068] S13, For the shallow image pixel displacement caused by uneven reflectivity, calculate the displacement compensation value according to the gradient change rate in the preliminary interlayer continuity association and perform image compensation to obtain the compensated image sequence.
[0069] S14, a convolutional neural network is used to denoise the compensated image sequence, and the gradient change rate is fused to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour.
[0070] S15, based on the compensated defect contour and the preliminary interlayer continuity correlation, iteratively calculate the depth value of the defect, fuse the point data of the compensated image sequence, and obtain the depth distribution information of each defect point.
[0071] S16, Based on the depth distribution information, trace the evolution path of the defect in the original image sequence and establish a defect tracing chain;
[0072] S17. Based on the interlayer correlation data of the defect tracking chain, generate an overall depth model of the microscopic defects on the valve sealing surface to clarify the final defect tracking result.
[0073] In step S11, the valve sealing surface is captured by an imaging device using multifocal distance imaging to obtain the original image sequence.
[0074] In one embodiment, this example uses a DN50 type stainless steel 304 valve (sealing surface diameter 50mm, curved surface radius of curvature 80mm, surface reflectivity approximately 0.3) as the detection object. The multi-focal-length image acquisition steps are described in detail to provide high-quality raw data support for subsequent image recognition: First, the imaging equipment parameters are initialized. An industrial CCD camera (model: Basler acA2500-14gm, pixel resolution 2592×1944) is selected, paired with an electric zoom microscope lens (focal length adjustment range 10-100mm, zoom accuracy 0.01mm) and a ring LED supplementary light (color temperature 5500K, brightness adjustable range 0-100%). Based on the curved surface dimensions of the valve sealing surface and the reflective characteristics of stainless steel, the preset focal length adjustment step is 0.5mm, and the scanning depth range is 0-5mm. A 10-degree multi-focal-length gradient is determined from shallow to deep. The focal length adjustment gradient (0.5mm, 1.0mm, 1.5mm…5.0mm) corresponds to lens focal length parameters set to 10mm, 15mm, 20mm…55mm. Simultaneously, camera acquisition parameters (exposure time 100μs, ISO sensitivity 100, RAW format storage) and supplementary light brightness (60%) are initialized to ensure the clarity and contrast of defect features required for image recognition. Next, multi-focal length images are acquired layer by layer. The imaging device is fixed on a three-dimensional adjustment platform, ensuring the camera optical axis is perpendicular to the center of the sealing surface (vertical distance 50cm). The host computer controls the lens to switch focal lengths layer by layer according to the preset gradient. After each layer stabilizes for 100ms, three images are acquired, and the focal length parameters, acquisition timestamp, and supplementary light parameters are recorded simultaneously in the format "focal length-acquisition sequence number-timestamp.raw" to ensure traceability of the acquisition conditions of each frame during image recognition. Finally, the original image sequence is integrated, arranged from "light to dark focal length". Based on the core rule, images at the same focal length level are arranged in ascending order by timestamp to form image groups. Then, the image groups at 10 focal length levels are integrated in gradient order to generate an ordered original image sequence containing 30 images. The sequence index format is "level-acquisition number", and it is stored in association with the focal length parameter table and acquisition parameter table. This provides a structured and traceable original data foundation for subsequent defect contour analysis and inter-layer association establishment based on image recognition.
[0075] In step S12, the defect contour is analyzed based on the original image sequence, and a preset optical flow algorithm is used to track the appearance of the same defect in different focal length layers to establish a preliminary inter-layer continuity association.
[0076] In one implementation, following the ordered original image sequence (index format "level-acquisition number") obtained from the aforementioned multi-focal-length image acquisition, the defect contour feature extraction stage in the image recognition process is first initiated. Inter-frame deduplication and fusion processing is performed on the three images at each focal length level (using a mean filtering algorithm to eliminate random noise). Then, the Canny edge detection algorithm (setting a low threshold of 50 and a high threshold of 150) is used to perform defect contour recognition on the fused images at each focal length level, accurately extracting the edge contours of defects such as scratches and dents on the valve sealing surface. Simultaneously, the key feature points on each defect contour (such as contour endpoints, inflection points, and curvature extrema) are labeled using the feature point detection module in image recognition. The pixel coordinates (accurate to 1 pixel) and morphological parameters (including the area, perimeter, and radius of curvature of the contour to which the feature point belongs) of each feature point are recorded, ultimately forming a defect contour feature point set for each focal length level (8-12 key feature points corresponding to each defect). Subsequently, based on the defect contour feature point set extracted by image recognition, a preset Lucas-Kanade algorithm is used... An optical flow algorithm is used to construct a feature point tracking model. Taking images from adjacent focal length layers (e.g., 0.5mm and 1.0mm layers) as input, it calculates the pixel displacement vector (including lateral displacement Δx and vertical displacement Δy, with an accuracy of 0.1 pixels) of the same defect contour feature point between the two layers. Based on the direction consistency and amplitude similarity of the displacement vectors, it accurately matches the corresponding feature points of the same defect in different focal length layers, and selects feature point pairs that meet the matching threshold (displacement vector similarity ≥ 95%) to form a cross-layer matching feature point set. A unique identifier ID is assigned to each cross-layer matching feature point. Finally, using the cross-layer matching feature points obtained from image recognition as the core, and combining the pixel coordinates of each feature point with the corresponding focal length parameters, a spatial mapping matrix based on affine transformation (matrix dimension 3×3) is constructed. This matrix establishes the spatial correspondence of defect contours between different focal length layers. At the same time, the identifier ID, pixel coordinates, focal length parameters, and spatial mapping relationship of the cross-layer matching feature points are integrated into a structured data table, forming a preliminary inter-layer continuity association of the same defect in multiple images, providing a precise feature association basis for displacement compensation and depth calculation in subsequent image recognition.
[0077] In step S13, for the shallow image pixel displacement caused by uneven reflectivity, the displacement compensation value is calculated based on the gradient change rate in the preliminary interlayer continuity association and image compensation is performed to obtain the compensated image sequence.
[0078] In one implementation, following the established preliminary inter-layer continuity correlation structured data table, the gray-level gradient change rate (including horizontal gradient Gx and vertical gradient Gy, with a calculation accuracy of 0.01) of each cross-layer matching feature point between different focal length layers is first extracted from the table. Focusing on shallow images with focal lengths of 0.5-2.0mm, a correlation model (fitting formula) between gradient change rate and pixel displacement is used. Where ΔP represents the feature point pixel displacement deviation, the calibration coefficient k is set to 0.12, Gx is the lateral gradient, and Gy is the longitudinal gradient. Through experiments on 30 sets of DN50 stainless steel 304 valve sealing surface samples (reflectivity 0.2-0.4, artificially created defects 0.1-3mm deep), the actual pixel displacement corresponding to different gradient change rates was statistically analyzed. A correlation coefficient R² = 0.97 was obtained through linear regression fitting, and the calibration coefficient k = 0.12 was determined. This quantifies the feature point pixel displacement deviation caused by the uneven reflectivity of the stainless steel material, ensuring the accuracy of the original data on defect locations in image recognition. Subsequently, using the gradient change rate as the core input, a linear pixel displacement compensation model was constructed (compensation formula...). (α is a scaling factor of 0.98, β is a correction constant of 0.02, and ΔP is the pixel displacement deviation of the feature point). The quantized pixel displacement deviation is substituted into the model to calculate the lateral and longitudinal displacement compensation values (accuracy 0.01 pixels) for each offset feature point. Simultaneously, combined with the focal length parameters of each shallow image, the appropriate focal length offset calibration parameters (range ±0.05mm) are determined through multiple iterations, providing parameter support for accurate correction in image recognition. Next, based on the above focal length offset calibration parameters and displacement compensation values, the offset defect contour feature points in each shallow image are calibrated point-by-point. For example, if the original pixel coordinates of a feature point are (256, 312) and the displacement compensation value is (-1.23, -0.85), the calibrated coordinates are corrected to (254.77, 311.15), thoroughly correcting the pixel position deviation caused by uneven reflectivity and ensuring the consistency of feature point positioning in image recognition. Finally, all shallow images with calibrated coordinates are compared with those with a focal length of 2.5-5.0mm. The mid-to-deep images are integrated one by one according to the original scanning layer order, maintaining the structure of 3 images under each focal length layer, and generating an ordered compensated image sequence. This sequence provides a high-quality image data foundation without positional deviation for subsequent noise reduction processing, sharpness compensation and defect depth calculation in image recognition.
[0079] In step S14, a convolutional neural network is used to denoise the compensated image sequence, and the gradient change rate is fused to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour.
[0080] In one implementation, the compensated image sequence generated above is followed:
[0081] First, the images of each focal length layer in the sequence (each image is 2592×1944 pixels, RAW format converted to RGB channels) are sequentially input into a pre-trained U-Net convolutional neural network. This network is trained based on 10,000 images of defects on the sealing surfaces of industrial valves (including scratches, dents, and cracks, each image with a resolution of 2592×1944 pixels). The training set:validation set:test set = 7:2:1. After 50 iterations, the model achieves a defect recognition accuracy of ≥98.5% on the test set and a boundary extraction error of ≤1 pixel. The network is optimized for industrial valve defect detection scenarios. The input layer uses image normalization (pixel values are mapped to the [0,1] interval). The hidden layer contains 4 feature extraction modules and 2 dedicated noise reduction modules. The feature extraction module uses a 3×3 convolutional kernel (stride 1, padding=1), combined with a max pooling layer (2×2 pooling kernel) to gradually increase the number of feature map channels (from 3 channels to 64). The system uses multiple channels to progressively extract defect features from low-level features (grayscale changes) to high-level features (edge textures). The noise reduction module combines a BatchNorm batch normalization layer with a ReLU activation function, along with a Dropout layer (dropout probability of 0.2) to suppress overfitting. At the same time, it compresses redundant features through 1×1 convolution kernels, efficiently filtering camera sensor thermal noise, ambient light fluctuation interference noise, and salt-and-pepper noise during image transmission, ensuring the purity of output features and providing highly reliable defect feature data for image recognition.
[0082] Subsequently, the gray-level gradient change rates (horizontal gradient Gx, vertical gradient Gy) of the defect contour feature points calculated earlier are retrieved and standardized into feature enhancement factors in the [0,1] interval through a feature fusion layer. These factors are then directionally integrated into the boundary detection module of the convolutional neural network decoder. Specifically, a gradient weighting branch is added to the second layer of the decoder. This branch performs pixel-by-pixel multiplication of the gradient change rate with the feature map of the corresponding region, providing targeted compensation and enhancement for attenuated defect boundaries in deep images with a focal length of 2.5-5.0mm: for the core region of the defect edge with a gradient change rate higher than 0.6, the gray-level contrast is increased by 30% and the gradient magnitude of the edge pixels is enhanced; for the transition region with a gradient change rate between 0.3 and 0.6, a linear weighting method is used to moderately increase the sharpness by 15%-20%; for non-edge regions with a gradient change rate lower than 0.3, the original features are kept unchanged. This effectively alleviates the problem of blurred defect boundaries in deep images and avoids the introduction of new noise interference by over-sharpening, ensuring the feature recognition accuracy and distinctiveness of the image.
[0083] Next, based on the deep image defect features after sharpness compensation, a feature normalization algorithm is used (adjusting the mean of each feature dimension to 0 and the variance to 1) to align the feature dimensions of the same defect in images of different focal length layers. By calculating the Euclidean distance of cross-layer matching feature points (same ID) (setting the matching threshold to 2 pixels), the feature space offset caused by focal length changes is corrected to ensure that the feature points of the same defect in different focal length layers are in the same spatial coordinate system, maintaining the continuity of cross-layer matching of defect features and providing stable support for inter-layer correlation of image recognition.
[0084] Finally, the defect features (including edge point sets, texture matrices, and grayscale distribution curves) of each focal length layer after noise reduction and sharpness compensation are integrated. The least squares method is used to perform polynomial fitting on the defect edge feature points (fitting order is set to 3), and abnormal feature points with fitting errors greater than 1 pixel are removed to reconstruct a complete and smooth defect contour in each focal length layer image. At the same time, morphological closing operations (5×5 rectangular structuring elements, since the roughness of the valve sealing surface defect edge is ≤2 pixels, this size can effectively fill small holes ≤3 pixels and remove edge burrs ≤2 pixels, while avoiding excessive corrosion of the defect contour) are used to fill the small holes inside the contour. Opening operations are used to remove edge burrs of the contour. Finally, the compensated defect contour of each layer image is determined. This contour accurately preserves the boundary shape, size ratio and texture details of the defect, providing a high-precision feature foundation for defect depth calculation and tracking chain construction in subsequent image recognition.
[0085] In step S15, the depth value of the defect is calculated iteratively based on the compensated defect contour and the preliminary interlayer continuity correlation, and the point data of the compensated image sequence is fused to obtain the depth distribution information of each defect point.
[0086] In one implementation, following the compensated defect contours and preliminary interlayer continuity correlation data obtained above, a defect depth calculation model based on the triangulation principle is first constructed, using the compensated defect contours of each focal length layer as the core and combining the spatial mapping relationship and identifier ID of cross-layer matching feature points. The baseline length of the triangulation model is set to 50mm (to match the movement accuracy of the three-dimensional adjustment platform), and the depth calculation formula is as follows: Where z is the defect depth, f is the lens focal length, B is the baseline length, and d is the parallax of feature points between different focal length layers (derived from pixel displacement Δx / Δy, d=Δx×pixel size). The model uses camera intrinsic parameters (focal length f=10-55mm, pixel size 1.4μm) and object distance (vertical distance between camera and sealing surface 50cm) as fixed parameters. The cross-layer matching feature point correspondence in the initial inter-layer continuity association is used as a constraint condition to initialize the depth estimate of each defect feature point (the value is taken as the median value of the corresponding focal length layer, such as the initial estimate of the 0.5mm layer feature point is set to 0.5mm, with an accuracy of 0.01mm), providing basic model support for depth quantization in image recognition. Subsequently, the pixel coordinates (accurate to 0.1 pixels), corresponding focal length parameters (recorded to 0.01 mm), and contour morphology parameters of each defect feature point are accurately extracted from the compensated image sequence. These multi-dimensional point data are integrated into the defect depth calculation model in a structured format, and the depth value of each feature point is solved by iterative least squares method: during the iteration process, the objective function is to minimize the pixel coordinate deviation, and the depth calculation value of the feature point is updated in each iteration (the iteration step size is set to 0.001 mm). At the same time, the calculation weight is dynamically corrected by combining the gradient change rate in the preliminary inter-layer continuity association. For example, edge feature points with a high gradient change rate are given a weight of 1.2 times to ensure that the priority of depth calculation and defect features in image recognition are consistent. Next, the iterative convergence verification process is initiated, with a preset accuracy threshold of ±0.005mm. Based on the requirements of the industrial valve sealing surface micro-defect detection standard (GB / T 30832-2014), it can cover the defect detection needs of ≥0.01mm depth and matches the 0.01mm zoom accuracy of the imaging equipment and the 1.4μm pixel size of the camera, ensuring that the depth calculation accuracy is compatible with the hardware capabilities. The convergence status is determined by calculating the absolute difference of the depth value of the same feature point in two adjacent iterations (Δ depth = | depth n - depth n-1|): if the Δ depth of all feature points is less than or equal to the accuracy threshold, the iteration is considered to have converged; if there are feature points that do not meet the convergence requirements, the triangulation baseline length coefficient in the model is adjusted (adjustment range ±0.02) and the coordinate mapping weight, and the point data is re-substituted for iterative calculation until the depth value of all defect feature points reaches the preset accuracy threshold, ensuring the reliability of depth data in image recognition. Finally, the depth values of all converged and verified defect feature points are summarized. Combined with the curved surface topology of the valve sealing surface (curvature radius 80mm), a polar coordinate mapping algorithm is used, with the center of the sealing surface as the origin, to map the pixel coordinates (x, y) according to the formula... Where k is the pixel size (1.4μm), The actual spatial coordinates of the sealing surface (radial coordinate r, circumferential angle θ) are converted (where (x0, y0) are the pixel coordinates of the sealing surface center in the image). The data is then integrated into a structured dataset according to the correspondence between "spatial coordinates and depth values". The depth data gaps in the defect area are then filled in by an interpolation algorithm (inverse distance weighted interpolation) to generate defect depth distribution information containing two-dimensional spatial position (r, θ) and three-dimensional depth value (z). This information is stored in both heat map and data table formats, providing accurate depth quantification basis for the construction of defect tracking chain and the generation of overall depth model in subsequent image recognition.
[0087] In step S16, the evolution path of the defect in the original image sequence is traced based on the depth distribution information to establish a defect tracing chain.
[0088] In one implementation, receiving the generated defect depth distribution information (including two-dimensional spatial coordinates (r, θ), three-dimensional depth values (z), and a structured data table), the process of filtering common feature points is first initiated: the three-dimensional spatial coordinates (r, θ, z), depth values, and unique identifiers (IDs) of defect feature points in each focal length layer are analyzed. Based on the continuity of the depth distribution and the correlation of spatial location, dual filtering conditions are set—a depth deviation threshold of ±0.01mm (to ensure consistent depth trends of common feature points) and spatial coordinate deviation. (Where T is the spatial coordinate deviation, Δr is the radial deviation, Δθ is the circumferential angle deviation, and r is the radial coordinate of the feature point), a spatial coordinate deviation threshold of ±0.5mm is set (to ensure the spatial continuity of the same source feature points). Simultaneously, combined with the cross-layer matching feature point ID correspondence in the preliminary inter-layer continuity association, the same source feature points of the same defect in different focal length layers are accurately located (e.g., feature point ID101 at the 0.5mm level, with a depth value of 1.23mm and spatial coordinates (15.2mm, 30.5°), and in the 1.0mm level, feature points with a depth value of 1.22mm and spatial coordinates (15.3mm, 30.5°) are selected). Feature point ID203 (30.6°) is identified as a homologous feature point. Subsequently, a defect evolution path is constructed: using focal length from shallow to deep (0.5mm→1.0mm→…→5.0mm) as the time axis, all homologous feature points of the same defect are sequentially connected layer by layer to form an independent evolution path for each defect. The path records key information for each node (feature point): identifier ID, 3D spatial coordinates, depth value, corresponding focal length parameters, and contour morphology parameters (such as curvature and side length). The path's depth change trend (such as increasing, decreasing, or fluctuating) and spatial extension direction (such as radial or circumferential along the sealing surface) are also marked. Finally, a defect tracking chain is formed: all independent evolution paths of defects are globally integrated, and a path index table is established (recording the path ID, starting focal length level, ending focal length level, and number of feature points for each defect). The continuity of paths between different focal length levels is strengthened by cross-layer matching of feature point IDs, while abnormal paths (such as those with fewer than 3 feature points) are eliminated. (Paths with depth deviations exceeding a threshold) are identified, ultimately constructing a complete and reliable defect tracking chain. This chain not only clarifies the evolution trajectory of the same defect across multiple layers of images but also integrates multi-dimensional correlation data of feature points, providing accurate correlation indexes and data support for subsequent inter-layer data fusion of 3D depth models.
[0089] In step S17, based on the interlayer correlation data of the defect tracking chain, an overall depth model of the microscopic defects on the valve sealing surface is generated to clarify the final defect tracking result.
[0090] In one implementation, building upon the aforementioned defect tracing chain (including path index table and associated data of common feature points) and the depth distribution information of each defect location, a panoramic extraction of inter-layer association data is first performed: Core inter-layer association data for each focal length layer is comprehensively extracted from the defect tracing chain, covering node information (feature point identifier ID, 3D spatial coordinates (r, θ, z), depth value, precise depth value, contour morphology parameters), path association information (correspondence of common feature point IDs, depth change trend, spatial extension direction), and filtering and verification data (depth deviation value, spatial coordinate deviation value), ensuring that the data covers the complete feature dimensions of the defect from shallow to deep layers. Subsequently, a 3D depth framework is constructed: using the curved surface topology of the DN50 valve sealing surface (curvature radius 80mm, diameter 50mm) as the physical basis, a Cartesian 3D spatial coordinate system is established (origin set as the center of the sealing surface, xy plane aligned with the sealing surface, z-axis perpendicular to the sealing surface pointing outwards), according to "pixel coordinates - spatial coordinates". The mapping rules (mapping formulas are derived based on camera intrinsic parameters (focal length f=10-55mm, principal point coordinates (1296, 972)) and object distance (50cm) to satisfy the pinhole imaging model) group the extracted interlayer correlation data by path ID and map them one by one to the three-dimensional coordinate system to construct a three-dimensional depth framework of micro-defects that perfectly matches the actual shape of the sealing surface. The framework reserves feature data interfaces for each path node to ensure the accuracy of subsequent data filling. Then, model data fusion and optimization are performed: the defect depth distribution information (including heat map data and structured data table) generated above is accurately filled into the three-dimensional depth framework according to the correspondence between path ID and three-dimensional spatial coordinates. At the same time, the interlayer correlation in the defect tracking chain is fused—based on the depth consistency weight of the same feature points (weight = 1 / (Δ depth + 0.001), Δ The depth is the depth deviation value after iterative convergence (the smaller the deviation, the higher the weight). Weighted fusion of depth data from different focal length layers is performed to eliminate data redundancy and minor deviations between layers. For defect edge regions and path node gaps, a cubic spline interpolation algorithm is used to fill in depth data gaps, ensuring the continuity and smoothness of depth information within the framework. Simultaneously, morphological smoothing (Gaussian filtering, standard deviation 0.5) optimizes the model's surface texture, ultimately generating a complete and accurate overall depth model of the valve sealing surface micro-defects. This model clearly restores the three-dimensional morphology, depth gradient, and extension trajectory of the defect in three-dimensional space, perfectly meeting the three-dimensional quantization requirements of image recognition. Finally, defect feature analysis and result output are performed: based on the overall depth model, a surface curvature analysis algorithm (curvature threshold) is used... Determined as a crack-type defect, curvature threshold The system accurately identifies defects (scratches / dents) using a morphological matching algorithm (matching with a preset defect template library, with a matching threshold of 90%). It then measures the defect's three-dimensional dimensions (length, width, maximum depth, average depth, with a measurement accuracy of 0.01 mm) using a spatial distance calculation tool (based on the Euclidean distance formula in a three-dimensional coordinate system). Combined with coordinate system positioning, it determines the defect's precise spatial location (radial distance from the center of the sealing surface, circumferential angle range, and focal length level range) and its extension range (diffusion trajectory along the curved surface of the sealing surface, depth variation amplitude). Finally, it outputs standardized final defect tracking results, including a defect type classification table, a detailed list of dimensional parameters, a depth distribution heatmap (z-axis depth color mapping), a three-dimensional model visualization file (supporting rotation and sectioning), and a defect risk level assessment (based on depth and dimensional parameters). These results provide comprehensive and accurate image recognition technology support for valve sealing performance evaluation, maintenance plan development (such as targeted grinding and sealing surface replacement), and risk prediction, achieving a complete closed loop from two-dimensional detection of micro-defects to precise three-dimensional quantification, and from feature extraction to risk assessment.
[0091] In summary, this invention addresses core technical issues such as image feature shift caused by uneven reflectivity of valve sealing surfaces, broken defect associations in multi-focal-length images, blurred boundaries in deep images, and missing depth information. It constructs a complete image recognition technology system encompassing "multi-source data acquisition - cross-layer feature association - precise compensation optimization - 3D depth modeling." Its core principles are as follows: First, multi-focal-length layered image acquisition covers all dimensions of defect features on the sealing surface from shallow to deep layers, providing a complete data foundation for image recognition and avoiding missed defects due to single focal lengths. Next, using Canny edge detection and the Lucas-Kanade optical flow algorithm, defect contour feature points are extracted from the original image sequence, and cross-layer matching relationships are established, constructing preliminary inter-layer continuity associations to solve the problem of blurred corresponding defect features at different focal lengths. For pixel displacement in shallow images caused by uneven reflectivity, the deviation is quantified based on the gradient change rate in the inter-layer association data, and a compensation model is constructed to achieve precise calibration of feature point coordinates, eliminating interference from surface material characteristics on image recognition. Finally, through an optimized U-Net design… A convolutional neural network simultaneously performs image denoising and deep defect boundary sharpness compensation, filtering out noise interference while preserving defect details, thus improving the feature recognition accuracy of image recognition. A depth calculation model is constructed based on the principle of triangulation, and the depth value is iteratively solved by fusing the compensated defect contour and inter-layer correlation data, breaking through the limitation of traditional two-dimensional image recognition that can only identify surface defects, and realizing three-dimensional quantization of defects. By screening for homologous feature points and connecting paths, a defect tracking chain is constructed to strengthen the continuity of cross-layer features and provide accurate correlation indexes for three-dimensional modeling. Finally, based on the topology of the sealed surface, the tracking chain data and depth distribution information are fused to generate a complete three-dimensional depth model, realizing a closed loop of the entire process from image recognition feature extraction to three-dimensional morphology quantization of defects.
[0092] This invention can accurately overcome the interference of complex surface characteristics on image recognition, significantly improve the accuracy and stability of defect location, contour recognition and depth quantization, and at the same time, take into account the efficiency and safety of industrial scenarios with non-contact detection, provide a scientific basis for valve maintenance decisions, and also provide a technical solution that can be used for defect detection of similar precision components.
[0093] refer to Figure 2 The second embodiment of the invention provides a valve sealing surface defect detection system based on image recognition, comprising:
[0094] Multifocal image acquisition module: Acquires multifocal images of the valve sealing surface using imaging equipment to obtain the original image sequence;
[0095] Interlayer correlation establishment module: Analyze the defect contour based on the original image sequence, and use a preset optical flow algorithm to track the appearance of the same defect in different focal length layers to establish preliminary interlayer continuity correlation;
[0096] Image displacement compensation module: For shallow image pixel displacement caused by uneven reflectivity, it calculates displacement compensation value based on the gradient change rate in the preliminary interlayer continuity association and performs image compensation to obtain the compensated image sequence;
[0097] Noise reduction and sharpness compensation module: The convolutional neural network is used to reduce the noise of the compensated image sequence, and the gradient change rate is fused to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour.
[0098] Defect depth calculation module: Based on the compensated defect contour and the preliminary interlayer continuity correlation, iteratively calculate the depth value of the defect, fuse the point data of the compensated image sequence, and obtain the depth distribution information of each defect point.
[0099] Tracing Chain Construction Module: Based on the depth distribution information, traces the evolution path of defects in the original image sequence and establishes a defect tracing chain;
[0100] Final Defect Tracking Module: Based on the interlayer correlation data of the defect tracking chain, it generates an overall depth model of the microscopic defects on the valve sealing surface and clarifies the final defect tracking results.
[0101] It should be noted that the image recognition-based valve sealing surface defect detection system provided in this embodiment of the invention is used to execute all the process steps of the image recognition-based valve sealing surface defect detection method in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0102] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for detecting defects on valve sealing surfaces based on image recognition, characterized in that, include: The valve sealing surface is captured by multi-focal-length images using imaging equipment to obtain the original image sequence; Based on the original image sequence, the defect contour is analyzed, and a preset optical flow algorithm is used to track the appearance of the same defect in different focal length layers, and a preliminary inter-layer continuity association is established. To address the pixel displacement in shallow images caused by uneven reflectivity, a displacement compensation value is calculated based on the gradient change rate in the preliminary interlayer continuity correlation, and image compensation is performed to obtain a compensated image sequence. A convolutional neural network is used to denoise the compensated image sequence, and the gradient change rate is fused to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour. Based on the compensated defect contour and the preliminary interlayer continuity correlation, the depth value of the defect is iteratively calculated, and the point data of the compensated image sequence is fused to obtain the depth distribution information of each defect point. Based on the depth distribution information, the evolution path of defects in the original image sequence is traced to establish a defect tracing chain; Based on the interlayer correlation data of the defect tracking chain, an overall depth model of the microscopic defects on the valve sealing surface is generated, and the final defect tracking result is determined.
2. The method for detecting valve sealing surface defects based on image recognition according to claim 1, characterized in that, The process of acquiring multi-focal-length images of the valve sealing surface using an imaging device to obtain an original image sequence includes: The imaging equipment is initialized with parameters. The focal length adjustment step and scanning depth range are preset according to the surface size and material properties of the valve sealing surface, and the focal length adjustment gradient from shallow to deep is determined. After initialization, the imaging device is aligned with the detection area of the valve sealing surface. The focal length parameters are adjusted layer by layer according to the preset focal length adjustment step size and the focal length adjustment gradient. The original image of the sealing surface is acquired at each focal length layer and the corresponding focal length parameters are recorded. The original images acquired at each focal length layer are time-stamped, and all original images are integrated in the scanning order from shallow to deep focal length to form an ordered sequence of original images.
3. The method for detecting defects in valve sealing surfaces based on image recognition according to claim 1, characterized in that, The step of analyzing defect contours based on the original image sequence and using a preset optical flow algorithm to track the appearance of the same defect in different focal length layers to establish preliminary inter-layer continuity relationships includes: Based on the original image sequence, the defect contour features of the valve sealing surface in each focal length layer image are identified by the edge detection algorithm, and the pixel coordinates and morphological parameters are marked to obtain the defect contour feature points. Based on the defect contour feature points, a preset optical flow algorithm is used to calculate the pixel displacement vector of the same defect contour feature point between images of different focal length layers, and then the corresponding feature points of the same defect in each focal length layer are matched to obtain cross-layer matching feature points. Using the cross-layer matching feature points as the core, a spatial mapping relationship of defect contours between layers with different focal lengths is constructed, and a preliminary inter-layer continuity association of the same defect in multi-layer images is established.
4. The method for detecting valve sealing surface defects based on image recognition according to claim 1, characterized in that, The step of calculating displacement compensation values based on the gradient change rate in the preliminary interlayer continuity correlation and performing image compensation to obtain a compensated image sequence includes: The gradient change rate of the interlayer defect contours at different focal lengths is extracted from the preliminary interlayer continuity correlation, and the pixel displacement deviation caused by uneven reflectivity in the shallow image is quantified based on the gradient change rate. A pixel displacement compensation model is constructed based on the gradient change rate, and the displacement compensation value corresponding to each offset feature point is calculated by substituting the pixel displacement deviation into it, and the appropriate focal length offset calibration parameters are determined simultaneously. Based on the displacement compensation value and focal length offset calibration parameters, the offset feature points of the shallow image are calibrated point by point to correct the pixel position deviation caused by uneven reflectivity. The coordinate-calibrated shallow layer image is integrated with other focal layer images in an orderly manner according to the scanning level to form the compensated image sequence.
5. The method for detecting defects in valve sealing surfaces based on image recognition according to claim 1, characterized in that, The step of using a convolutional neural network to denoise the compensated image sequence and fusing the gradient change rate to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour includes: The compensated image sequence is input into a pre-trained convolutional neural network, and system noise and environmental interference noise are filtered layer by layer through feature extraction layer and noise reduction layer, and defect features of each focal length layer image are extracted. The gradient change rate is retrieved and incorporated into the convolutional neural network as a feature enhancement factor to compensate for and enhance the attenuated sharpness of defect boundaries in deep images. Based on the sharpness-compensated deep images, the defect features of each focal length layer are aligned to maintain the continuity of defect feature matching between layers. The defect features of each focal length layer image are integrated after noise reduction and sharpness compensation, and the defect contours of each focal length layer image are reconstructed to determine the compensated defect contours.
6. The method for detecting defects in valve sealing surfaces based on image recognition according to claim 1, characterized in that, The method involves iteratively calculating the depth value of the defect based on the compensated defect contour and the preliminary interlayer continuity correlation, and fusing the point data of the compensated image sequence to obtain the depth distribution information of each defect point, including: Based on the compensated defect contour and combined with the preliminary interlayer continuity correlation, a defect depth calculation model is constructed, and the depth estimate of each defect feature point is initialized. The pixel coordinates and focal length parameters of each defect feature point in the compensated image sequence are extracted and incorporated into the defect depth calculation model to iteratively solve the depth value of each defect feature point. The convergence of the depth value is verified. If the preset accuracy threshold is not reached, the parameters of the defect depth calculation model are adjusted and iterated again until the depth values of all defect feature points reach the preset accuracy threshold. The depth values after convergence and verification are summarized and integrated according to the spatial position mapping relationship of the valve sealing surface to form the depth distribution information of each defect point.
7. The method for detecting defects in valve sealing surfaces based on image recognition according to claim 1, characterized in that, The step of tracing the evolution path of defects in the original image sequence based on the depth distribution information and establishing a defect tracing chain includes: Analyze the spatial coordinates and depth values of each defect point in the depth distribution information to locate the same source location of the same defect in images with different focal length layers. Using the spatial location of the same defect in each focal length layer as a node, the nodes are sequentially connected in order from shallow to deep focal length to form the complete evolution path of the same defect in the compensated image sequence. Based on the node associations of the complete evolution path, an inter-layer mapping link for defect features is constructed, and the preliminary inter-layer continuity associations are integrated to form a defect tracking chain.
8. The method for detecting defects in valve sealing surfaces based on image recognition according to claim 1, characterized in that, Based on the interlayer correlation data of the defect tracing chain, an overall depth model of the microscopic defects on the valve sealing surface is generated, clarifying the final defect tracing results, including: The interlayer correlation data of each focal layer in the defect tracking chain is extracted. Based on the curved topology of the valve sealing surface, the interlayer correlation data is mapped to a three-dimensional spatial coordinate system according to the spatial mapping rules to construct a three-dimensional depth framework of the micro-defects of the valve sealing surface. The depth distribution information is filled into the three-dimensional depth frame, and the inter-layer correlation of cross-layer matching feature points is fused to generate an overall depth model; Based on the overall depth model, the three-dimensional shape, precise spatial location and extension range of the defect are analyzed, and the final defect tracking result including defect type, size parameters and depth distribution is output. The interlayer correlation data includes the spatial coordinates, depth values, contour morphology parameters, and cross-layer matching relationship data of the defect feature points.
9. A valve sealing surface defect detection system based on image recognition, characterized in that, include: Multifocal image acquisition module: Acquires multifocal images of the valve sealing surface using imaging equipment to obtain the original image sequence; Interlayer correlation establishment module: Analyze the defect contour based on the original image sequence, and use a preset optical flow algorithm to track the appearance of the same defect in different focal length layers to establish preliminary interlayer continuity correlation; Image displacement compensation module: For shallow image pixel displacement caused by uneven reflectivity, it calculates displacement compensation value based on the gradient change rate in the preliminary interlayer continuity association and performs image compensation to obtain the compensated image sequence; Noise reduction and sharpness compensation module: The convolutional neural network is used to reduce the noise of the compensated image sequence, and the gradient change rate is fused to compensate for the boundary sharpness attenuation of the deep image to obtain the compensated defect contour. Defect depth calculation module: Based on the compensated defect contour and the preliminary interlayer continuity correlation, iteratively calculate the depth value of the defect, fuse the point data of the compensated image sequence, and obtain the depth distribution information of each defect point. Tracing Chain Construction Module: Based on the depth distribution information, traces the evolution path of defects in the original image sequence and establishes a defect tracing chain; Final Defect Tracking Module: Based on the interlayer correlation data of the defect tracking chain, it generates an overall depth model of the microscopic defects on the valve sealing surface and clarifies the final defect tracking results.