Part defect automatic detection method based on machine vision
By obtaining the three-dimensional geometric parameters and multispectral feature extraction of parts, combined with multi-level detection network layer scanning and cross-level correlation fusion, the problems of missed detection and false detection in the defect detection of complex parts by existing machine vision inspection methods are solved, and efficient and accurate defect detection is achieved.
Patent Information
- Application Number
- CN202511330084.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-17
- Publication Date
- 2025-10-24
- Estimated Expiration
- 2045-09-17
AI Technical Summary
Existing machine vision inspection methods are difficult to achieve efficient and accurate detection when faced with diverse and complex component defects. In particular, when dealing with multiple defects, missed detections or false detections are prone to occur, and traditional two-dimensional image inspection cannot fully present the three-dimensional geometric features of components.
By obtaining the three-dimensional geometric parameters of the target parts, matching the historical defect sample set to cluster the defect types, performing multi-spectral feature extraction and multi-level detection network layer scanning, generating multi-scale defect feature maps, and performing cross-level correlation fusion, finally generating a fused defect feature map.
It achieves high-precision and comprehensive detection of defects in complex parts, reduces missed detections and false detections, improves the orderliness and accuracy of detection, and takes into account both detection efficiency and precision.
Smart Images

Figure CN120833332A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of component detection, in particular to a component defect automatic detection method based on machine vision. BACKGROUND
[0002] In modern manufacturing industry, quality detection of components is an important link to ensure product performance and reliability. With the development of industrial production towards automation and high precision, higher requirements are put forward for the efficiency and accuracy of component defect detection. Traditional component defect detection relies on manual visual inspection, and detection personnel judge the possible defects on the surface and inside of the components through magnifying glass, caliper and other tools. This method not only consumes a lot of labor cost, but also the detection result is easily affected by the experience, fatigue degree and subjective judgment of the detection personnel, resulting in unstable detection accuracy, which is difficult to meet the quality control demand of large-scale production.
[0003] With the rise of machine vision technology, defect detection methods based on two-dimensional images have been gradually applied in industrial detection field. This kind of method acquires two-dimensional images of components through camera, and identifies the defect area in the image by using image processing algorithm. However, two-dimensional images can only reflect the planar information of the component surface, and cannot fully present its three-dimensional geometric characteristics. For some three-dimensional defects caused by structural deformation, size deviation and other reasons, it is often difficult to accurately identify.
[0004] The existing detection method based on machine vision adopts single spectral band for image acquisition when extracting defect features, which is difficult to cope with the differences in spectral characteristics of different types of defects. For example, some fine cracks are not easy to be detected in the visible light band, but obvious features will be presented in the infrared band. In addition, the traditional detection method lacks effective classification and fusion mechanism when dealing with multiple defects on the surface of complex components, which is easy to cause missed detection or false detection, especially when multiple defects exist simultaneously and interfere with each other, the detection accuracy decreases significantly.
[0005] The scanning strategy of the existing detection network model adopts fixed step length, which cannot realize adaptive fine scanning for defects of different sizes and different diffusion ranges, resulting in insufficient resolution when detecting small defects, and low efficiency when detecting large defects. The existence of these problems makes the existing machine vision detection method difficult to achieve ideal detection effect when facing diversified and complex component defects, which restricts the further improvement of manufacturing quality control level. SUMMARY
[0006] The purpose of the present application is to provide a component defect automatic detection method based on machine vision to solve the problems raised in the background.
[0007] To achieve the above object, the application provides a kind of based on machine vision's spare part defect automatic detection method, the method comprises: The three-dimensional geometric parameters of the target spare part are obtained, and the historical defect sample set is matched in the vision sample library based on the three-dimensional geometric parameters; The historical defect sample set is clustered and divided by defect type to generate a plurality of defect category sub-sets; The plurality of defect category sub-sets are processed one by one to perform multispectral feature extraction operation, and the reference detection area and defect diffusion range parameter corresponding to each defect category are obtained; The scanning step of the multi-level detection network layer is configured using the defect diffusion range parameter, and the multi-scale defect feature map is generated by performing hierarchical feature analysis on the target spare part surface scanning image sequence through the multi-level detection network layer. The cross-level correlation fusion operation is performed on the plurality of scale defect feature maps to generate a fusion defect feature map, and the fusion defect feature map is output as the final defect detection result.
[0008] Preferably, the plurality of defect category sub-sets are processed one by one to perform multispectral feature extraction operation, comprising: A set of surface deformation image sequences is extracted from each defect category sub-set; The local curvature mutation position in the set of surface deformation image sequences is identified, and a set of reference deformation region coordinates is located; The texture spectrum analysis operation is performed on the set of reference deformation region coordinates to generate a set of reference defect feature vectors; The set of reference defect feature vectors is used as an index to perform regional diffusion calculation in the corresponding set of surface deformation image sequences to determine the defect correlation radius parameter of each reference deformation region, and the defect correlation radius parameter is used to represent the pixel span from the defect core region to the edge attenuation region.
[0009] Preferably, the set of reference deformation region coordinates is located, comprising: The set of surface deformation image sequences is processed in real time using a curvature mutation detection model to output high-curvature fluctuation region coordinates; The spatial density clustering operation is performed on the high-curvature fluctuation region coordinates to generate a candidate reference deformation region; The gray scale gradient difference value of the candidate reference deformation region and the adjacent region is calculated, and when the gray scale gradient difference value exceeds a preset mutation threshold, the candidate reference deformation region is included in the set of reference deformation region coordinates.
[0010] Preferably, the set of reference defect feature vectors is generated, comprising: The feature encoding operation is performed on the set of reference deformation region coordinates using a defect probability prediction model. extracting a deep feature tensor output by the defect probability prediction model, performing channel attention weighting processing on the deep feature tensor; calculating a channel feature mean value through the weighted feature tensor to generate an initial reference feature vector; iteratively extracting a local feature block in the deep feature tensor based on a preset sliding window, and when the aggregation density of the local feature block is less than the aggregation density of the initial reference feature vector, taking the initial reference feature vector as a reference defect feature vector set element.
[0011] Preferably, the determination of the defect correlation radius parameter of each reference deformation region comprises: performing a pixel diffusion operation from the reference deformation region coordinate set using a region growing algorithm; setting a gray scale similarity tolerance threshold to control the pixel diffusion boundary and recording the diffusion termination position coordinates; calculating the Euclidean distance between the center coordinates of the reference deformation region and the diffusion termination position coordinates to generate an original defect correlation radius; performing a weighted average calculation on all original defect correlation radii to output a corrected defect correlation radius parameter.
[0012] Preferably, the cross-level correlation fusion operation on the plurality of scale defect feature maps comprises: selecting a coarse-grained defect feature map and a fine-grained defect feature map from the multi-level detection network layer output; calculating a spatial correlation matrix of the coarse-grained defect feature map and the fine-grained defect feature map; performing a normalization mapping operation on the spatial correlation matrix to generate a feature correlation weight distribution map; performing a weighted fusion operation on the fine-grained defect feature map using the feature correlation weight distribution map to generate a cross-level enhanced feature map; repeating the weighted fusion operation until all scale defect feature maps are fused to generate the fused defect feature map.
[0013] Preferably, the generation of the feature correlation weight distribution map comprises: performing an up-sampling operation on the coarse-grained defect feature map using a three-dimensional convolution kernel to match the resolution of the fine-grained defect feature map; calculating a pixel-by-pixel similarity between the up-sampled feature map and the fine-grained defect feature map; constructing an initial correlation weight matrix through the similarity value and performing a Gaussian smoothing process on the initial correlation weight matrix; normalizing the weight matrix after the smoothing process by dividing by the maximum weight value to generate the feature correlation weight distribution map.
[0014] Preferably, the method further comprises: Resolving the defect distribution parameters in the fusion defect feature map to generate a defect quantification list; Performing field interference strength analysis operation based on the defect quantification list, outputting multi-level compensation strategy strength parameters; Constructing a defect compensation network containing multi-level adsorption thresholds; Adjusting the adsorption thresholds of the defect compensation network dynamically according to the real-time collected ambient light parameters; Performing secondary scanning operation on the target part using the adjusted defect compensation network, and updating the fusion defect feature map.
[0015] Preferably, the generation of the defect quantification list comprises: Statistically counting the number and area of connected regions in the fusion defect feature map; Calculating the shape irregularity and texture complexity of each connected region; Inputting the shape irregularity and texture complexity into a defect level classification model; Outputting a structured list containing defect type codes, area weights, and risk coefficients.
[0016] Preferably, the method further comprises: Constructing a device adaptation layer to resolve the parameter differences of different optical acquisition devices; Converting the output features of the multi-level detection network layer into a coordinate encoding format supported by the target device; Maintaining the spatial correspondence of cross-level features during the conversion process; Injecting the distortion correction parameters of the target device to generate a device-independent defect detection protocol.
[0017] Compared with the prior art, the beneficial effects of the present application are: By obtaining the three-dimensional geometric parameters of the target part and matching the historical defect sample set, the three-dimensional structure features of the part and the historical defect data can be fully combined to provide more comprehensive reference for subsequent defect detection. The sample matching method based on three-dimensional geometric parameters breaks through the limitation of relying only on planar information in traditional two-dimensional image detection, and can more accurately locate the historical defects related to the structure of the target part, making the detection process more targeted.
[0018] Defect type clustering and division are performed on the historical defect sample set to generate multiple defect category sub-sets, which helps to systematically classify complex and diverse defects, facilitating subsequent special detection according to the characteristics of different categories of defects. This classification processing method can avoid the mutual interference of different types of defect features, making the detection of each type of defect more independent and accurate, especially when dealing with complex parts containing multiple defects, it can effectively improve the orderliness of detection.
[0019] The multi-spectral feature extraction operation is performed on each defect category subset, the reference detection area and the defect diffusion range parameter corresponding to each defect category are obtained, and the feature differences of different defects under multi-spectrum are fully utilized. Through multi-spectral extraction, the defect features that are difficult to appear under single spectrum can be captured, the coverage of defect detection is expanded, and the determination of the reference detection area and the defect diffusion range parameter provides specific spatial range reference for subsequent accurate scanning, so that the detection is more targeted.
[0020] The scanning step of the multi-level detection network layer is configured by using the defect diffusion range parameter, and adaptive adjustment of the scanning strategy is realized. For defects with different diffusion ranges, corresponding scanning steps are set, a larger step can be used when detecting defects with a larger diffusion range to improve efficiency, and a smaller step can be used when detecting defects with a smaller diffusion range to ensure accuracy, so that the efficiency and accuracy of detection are considered, and the problems of resource waste and insufficient accuracy under fixed step scanning are avoided.
[0021] The multi-level detection network layer performs layered feature analysis on the target part surface scanning image sequence to generate a plurality of scale defect feature maps, which can capture the feature information of the defects from different levels and different scales. This layered analysis method can simultaneously consider the overall condition and local details of the part surface, neither overemphasizing details to ignore overall defect distribution nor focusing on the whole to miss subtle defects, so that the extraction of defect features is more comprehensive.
[0022] The cross-level associated fusion operation is performed on the plurality of scale defect feature maps to generate a fusion defect feature map, which can organically integrate defect features of different scales and different levels. Through associated fusion, the limitations of single-scale feature maps can be eliminated, effective information of each level can be utilized, the association between overall features and local details of defects is highlighted, the final output of the defect detection result is more complete and accurate, the missed detection and false detection are effectively reduced, and the recognition ability of complex defects is improved. BRIEF DESCRIPTION OF DRAWINGS
[0023] Figure 1 The working principle diagram of the machine vision-based part defect automatic detection method is described. Figure 2 The flowchart of the multi-spectral feature extraction operation is described. Figure 3 The flowchart of the defect correlation radius parameter calculation is described. Figure 4 The flowchart of the feature correlation weight distribution map generation is described. Figure 5 The flowchart of the defect compensation and secondary scanning is described. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the scope of protection of the present application.
[0025] Please refer to Figure 1 The present application provides a kind of based on machine vision's spare part defect automatic detection method, described method includes: Based on machine vision's spare part defect automatic detection method realizes high-precision defect identification by multi-level feature fusion and dynamic compensation mechanism.The method first obtains the three-dimensional geometric parameters of target spare part, and matches historical defect sample set in vision sample library.Defect type clustering division is carried out to historical defect sample set, and multiple defect category sub-sets are generated.For each defect category sub-set, multi-spectral feature extraction operation is carried out, and reference detection area and defect diffusion range parameter are obtained.Defect diffusion range parameter is used to dynamically configure the scanning step of multi-level detection network layer, and multi-scale defect feature map is generated by hierarchical feature analysis.Finally, cross-level correlation fusion is carried out to multi-scale defect feature map, and the fusion defect feature map is output as the detection result.
[0026] Embodiment 1: refer to Figure 2 In the defect feature extraction stage, the system first extracts a surface deformation image sequence set from each defect category sub-set.These image sequences are derived from historical detection data and contain images of the surface of the spare part under different angles and lighting conditions.After preprocessing, the image sequences are analyzed and processed using a curvature mutation detection model.The model is based on the principles of differential geometry of surfaces and identifies the coordinate positions where the curvature values in the surface deformation region fluctuate significantly by calculating the curvature changes in the pixel neighborhood.
[0027] Spatial clustering analysis is performed on the identified high-curvature fluctuation coordinate points using a density-based clustering algorithm.The algorithm first calculates the distance distribution of each coordinate point and its neighboring points, and according to the density accessibility principle, coordinates with similar spatial positions are grouped into the same cluster.After several iterations, a number of candidate reference deformation regions are formed.Each candidate region needs to be further verified for its effectiveness by calculating the gray gradient change of the region and its adjacent regions.The horizontal and vertical gradient components are extracted using an edge detection operator, and the gradient amplitude is calculated synthetically.When the gradient amplitude of a certain region exceeds the preset mutation threshold, the region is confirmed as an effective reference deformation region and is included in the final reference deformation region coordinate set.
[0028] The texture spectrum analysis stage performs more in-depth feature extraction on the confirmed reference deformation region. The system uses a multi-directional and multi-scale filter bank to process the deformation region image, which includes filter kernels of different directions and frequencies. Each filter kernel is convolved with the deformation region image in the spatial domain, outputting a response map for the corresponding frequency band. By statistically analyzing the response maps of each frequency band, frequency domain parameters that can represent the defect texture features are extracted. These parameters are reduced in dimension to form a compact numerical vector representation, constituting a set of reference defect feature vectors.
[0029] The region diffusion calculation is guided by the reference defect feature vectors and is performed in the corresponding surface deformation image sequence. The diffusion algorithm starts from the center position of the reference deformation region and gradually expands to the surrounding region. During the diffusion process, the algorithm dynamically evaluates the similarity of the current pixel to the seed region, including comparisons of gray value, texture features, and other aspects. The similarity evaluation uses an adaptive threshold strategy, with an initially loose threshold that gradually tightens as the diffusion range expands. The diffusion process continues until a boundary pixel that does not meet the similarity condition is encountered.
[0030] After the diffusion terminates, the system records the farthest boundary position reached by the diffusion. The spatial distance from the center of the deformation region to the diffusion boundary is determined through geometric calculation, and this distance serves as the original defect correlation radius. Due to possible differences in lighting or angle in different image sequences, the directly calculated original radius may have some fluctuations. Therefore, statistical processing is needed on the radius set obtained from multiple image sequences, and a weighted average method is used to eliminate the influence of outliers. The weight distribution considers factors such as image quality and lighting conditions, and finally outputs the corrected defect correlation radius parameter.
[0031] The entire feature extraction process adopts a hierarchical and progressive processing strategy. From the initial curvature discontinuity detection to the reference region confirmation, and then to the texture feature extraction and region diffusion calculation, each link is built on the output of the previous link. The system maintains data consistency between links during processing to ensure the accuracy and reliability of feature extraction. Multi-spectral feature extraction not only considers spatial domain deformation features, but also combines frequency domain texture information to form a comprehensive description of the defect region.
[0032] When implementing the system, a modular design is adopted, with each processing link encapsulated as an independent functional module. Modules exchange data through standard interfaces, facilitating function extension and algorithm update. The intermediate data generated during processing all have time stamps and version identifiers, supporting traceability and reproducibility of the processing flow. For large-scale data processing needs, the system uses a parallel computing architecture, fully utilizing the multi-core processor and GPU acceleration capabilities to ensure processing efficiency.
[0033] Quality control mechanisms are implemented throughout the entire process. A confidence threshold is set during the curvature anomaly detection phase to filter out low-reliability results. The benchmark area verification step introduces a manual review mechanism to confirm secondary cases. The feature extraction process monitors data distribution changes in real-time, and automatically triggers a recalculation when abnormal fluctuations are detected. The final output of the defect correlation radius parameter is subjected to multiple rounds of cross-validation to ensure its accuracy and stability.
[0034] The system automatically records processing logs at each stage, including input data features, processing parameters, running time, and other detailed information. These log data are used for subsequent system optimization and algorithm improvement. The system supports flexible configuration of detection parameters for different types of parts, and users can adjust the sensitivity and accuracy requirements of each stage according to actual needs. The entire implementation focuses on practicality and reliability, ensuring detection accuracy while considering system running efficiency and maintainability.
[0035] Example 2: see Figure 3 The defect feature encoding stage uses a deep convolutional neural network architecture to process benchmark deformation region image data. The network input is a standardized 256x256 pixel image block, which is preprocessed including grayscale normalization and local contrast enhancement. The main structure of the network includes multiple residual connection blocks, each consisting of a convolution layer, a normalization layer, and an activation function. During forward propagation, the network gradually extracts multi-scale features from low to high levels, with shallow networks capturing local features such as edges and textures, and deep networks extracting more semantic global features.
[0036] The channel attention mechanism is integrated into the key levels of the network, dynamically weighting the intermediate feature tensors. This mechanism first compresses spatial features into channel descriptors through global average pooling, then generates importance weights for each channel through a two-layer fully connected network. The weighting process uses a channel-by-channel multiplication operation to enhance the response of useful feature channels and suppress the interference of noise or irrelevant features. The weighted feature tensor is averaged in the channel dimension to generate a representative initial benchmark feature vector. This vector integrates multi-level feature information from the deformation region and serves as a reference for subsequent processing.
[0037] The sliding window mechanism performs local feature analysis on the feature tensor using a fixed-size square window that slides across the feature map. The window moves using an overlap strategy, maintaining a certain percentage of overlap between adjacent windows to avoid losing boundary features. At each window position, the distribution density index of the internal feature points is calculated, which reflects the degree of local feature aggregation. By comparing this index with the density reference value of the initial benchmark feature vector, the consistency of the current window region is determined. When the local density is lower than the reference threshold, it indicates that the feature distribution in this region is abnormal and the benchmark feature representation needs to be updated.
[0038] The region growing algorithm starts from the center of the reference deformation region and performs pixel-level diffusion analysis. The algorithm initializes a set of seed points, including the core pixel positions of the deformation region. The diffusion process uses an eight-neighbor connection method, and each iteration step examines the adjacent pixels in the eight directions around the current pixel. The similarity judgment considers multiple dimensions such as gray value difference, texture feature distance, and spatial position relationship. The tolerance threshold uses a dynamic adjustment strategy, setting a relatively loose similarity condition in the initial stage, and gradually increasing the similarity requirement as the diffusion range expands.
[0039] The diffusion termination condition is determined by multiple factors, including reaching the maximum number of iterations, the similarity of adjacent pixels being lower than the threshold, or encountering the image boundary. When terminated, the farthest boundary position reached by the diffusion is recorded, and the geometric distance from the center of the deformation region is calculated. Due to fluctuations in the directly measured distance under different image conditions, a statistical-based method is used to process the original distance set. The distance correction process considers factors such as image quality score, lighting condition coefficient, and material characteristic parameters, and obtains a stable defect correlation radius parameter through weighted averaging and curve fitting.
[0040] The network training phase uses a large-scale defect sample dataset for supervised learning. The training process uses a combined loss function, including classification loss and feature reconstruction loss. The optimization algorithm uses the adaptive moment estimation method to dynamically adjust the learning rate. To prevent overfitting, multiple regularization techniques are applied during training, including random dropout of some network connections and batch normalization processing. The network parameter update uses the mini-batch gradient descent strategy to balance training efficiency and convergence stability.
[0041] Multiple levels of quality control measures are implemented during feature encoding. The network forward propagation monitors the distribution of feature activation values in real time, and automatically triggers the diagnosis process when abnormal fluctuations are found. The generation process of channel attention weights introduces sparsity constraints to avoid extreme weight allocation. The sliding window analysis sets a minimum effective feature point threshold to filter local regions with insufficient information. The region growing algorithm implements a boundary check mechanism to prevent the diffusion process from exceeding the reasonable image range.
[0042] The system records detailed processing logs during operation, including feature distribution statistics of each layer of the network, attention weight change trend, and region growing process parameters. These running data are used for offline analysis and algorithm optimization. For different types of defect features, the system supports dynamic adjustment of network parameters, and can switch different pre-trained models according to real-time detection requirements. The feature encoding module uses a distributed computing architecture, supporting multi-GPU parallel processing, and meeting the high-throughput industrial detection requirements.
[0043] The algorithm implementation focuses on balancing computational efficiency and accuracy. The network structure design uses efficient operation methods such as depth separable convolution to reduce the number of parameters while maintaining feature extraction capability. The channel attention mechanism adopts a lightweight design to improve feature selection performance without significantly increasing computational burden. The sliding window analysis optimizes memory access patterns and uses cache mechanisms to speed up repeated calculations. The region growing algorithm uses a priority queue to manage pending pixels, improving the execution efficiency of the diffusion process.
[0044] The calculation of defect correlation radius takes into account various complex situations in actual industrial detection. For high-reflective surface materials, an optical correction coefficient is introduced to adjust the distance measurement value. For non-uniform material parts, a segmented calculation strategy is adopted, with different parameter settings applied in different regions. The distance correction algorithm is implemented with robustness processing to ensure the stability of parameter estimation through median filtering and outlier rejection. The final output of the defect correlation radius parameter is accompanied by a confidence score for reference in the subsequent processing stage.
[0045] The system maintenance aspect establishes a regular calibration mechanism to verify the performance stability of the feature encoding module through standard test samples. The network model supports online updates, allowing new defect sample data to be continuously integrated to improve detection capability. The algorithm parameter configuration file uses version management, making it easy to trace modification history and revert to previous stable versions. Multiple checkpoints are set in the processing flow, allowing the calculation to be restarted from intermediate links, improving system fault tolerance.
[0046] The module interface design follows standardized principles, with uniform and standardized input and output data formats. The image data received by the feature encoding module is accompanied by complete meta-information, including acquisition device parameters, lighting conditions, and material properties. The output feature vector and radius parameter are packaged in a structured data format for easy parsing and use by downstream modules. The system provides detailed application program interface documents to support the integration and invocation of third-party systems.
[0047] Real-time monitoring of system running state, dynamic adjustment of computing resource allocation. When detecting that the feature encoding module processing delay increases, automatically start load balancing strategy. System resource usage is visualized in real time, helping operation and maintenance personnel to master the overall running state. Key performance indicators set warning thresholds, abnormal conditions trigger alarm notification. Maintenance tools integrate diagnosis functions, which can quickly locate performance bottlenecks or abnormal reasons.
[0048] The experience data accumulated during implementation forms a knowledge base, which is used to guide parameter configuration in new scenarios. For different industry part detection needs, the system provides verified parameter templates. When deploying new production lines, migration learning can be used to quickly adapt to local feature distribution. The knowledge base supports continuous updating, constantly enriching defect feature models and optimal processing strategies. System version upgrade adopts a gray release mechanism, gradually expanding the application range of new algorithms.
[0049] Example 3: refer to Figure 4 The cross-level feature fusion stage extracts feature representations from different depths of the multi-level detection network. The network architecture contains five main levels, and the feature maps output by each level have different receptive fields and spatial resolutions. The coarse-grained feature map output by the fourth level has a size of 1 / 16 of the input image, contains high-level semantic information but loses fine spatial details. The fine-grained feature map output by the second level has a size of 1 / 4 of the input image, retains more local features but has lower semantic abstraction. The goal of feature fusion is to integrate these two complementary feature representations to form a fused feature representation that combines semantic accuracy and spatial precision.
[0050] The coarse-grained feature map is upscaled in spatial resolution through an upsampling operation, implemented using a learnable deconvolution kernel. The deconvolution kernel size is set to 4x4, with a stride of 2 and symmetric padding. The upsampling process can be represented as: ; wherein represents the coarse-grained feature map, is the learnable upsampling kernel parameter, denotes the upsampling operation, is the feature map after upsampling. The upscaled feature map is spatially aligned with the fine-grained feature map, and the coordinate offset is fine-tuned through bilinear interpolation.
[0051] The spatial correlation calculation uses a local window matching strategy, calculating feature similarity position by position within a local area of 64x64 pixels. The similarity measure uses an improved cosine similarity, introducing a spatial weight coefficient to balance the importance difference between the center and edge regions. Boundary processing is implemented during the generation of the correlation matrix, and the edge region of the feature map is expanded using mirror padding. The initial generated weight matrix has noise interference, which is smoothed through two-dimensional Gaussian filtering with a Gaussian kernel standard deviation of 1.5 pixel units.
[0052] Normalization maps the weight values to a standard interval, using the maximum and minimum value scaling method. The relative size relationship of the original values is preserved during weight distribution adjustment, avoiding changes to the structural relationships between features. The normalized weight map is multiplied by the fine-grained feature map at the channel level, enhancing the response of regions with high correlation to coarse-grained features. The fusion operation uses element-wise weighted summation to retain useful information from both levels of features.
[0053] The pyramid fusion architecture starts from the deepest network layer and progressively passes the fusion results upwards. After each fusion, a 1x1 convolution is used to adjust the channel dimension and maintain the compatibility of the feature tensor. The deep layer feature fusion focuses on semantic information transmission, while the shallow layer feature fusion focuses on detail supplementation. The fusion process adopts a progressive strategy, gradually reducing the feature difference between adjacent layers to avoid discontinuity caused by information jumping.
[0054] Feature map resolution matching uses multi-scale alignment technology to solve the problem of different sampling rates between different layers. The alignment process takes into account the receptive field changes of each layer of the network and adapts to feature position shifts through deformable convolution. When the channel numbers are inconsistent, projection connection is used to unify the feature dimension using linear transformation. Spatial position correction introduces an attention mechanism to dynamically adjust the correspondence of feature points.
[0055] The fusion process implements dynamic quality control to monitor the transmission efficiency of feature information in real time. A feature energy threshold is set to filter out useless information in low response areas. The channel selection mechanism automatically adjusts the fusion weights of each channel according to task requirements to highlight key feature expressions. The spatial attention map guides the regional focus during the fusion process, enhancing the feature strength in defect dense areas.
[0056] Computational resource allocation uses an adaptive strategy to dynamically adjust the processing precision according to the feature complexity. High information content areas use full-precision calculation, while flat areas appropriately reduce computational overhead. Memory management uses a block processing mechanism to divide large-sized feature maps into multiple sub-blocks for separate processing. Parallel computing architecture fully utilizes multi-core processor resources to accelerate the fusion process of large-scale feature data.
[0057] Fusion result verification uses a multi-angle evaluation method, including feature consistency check and information integrity test. Consistency check compares the statistical distribution difference between fused features and original features, controlling within a reasonable range. Information integrity test verifies the preservation degree of key features to ensure that no important information is lost. Abnormal situations trigger a re-fusion process, and after adjusting the parameters, the fusion operation is executed again.
[0058] The system implementation uses modular design, with each fusion stage encapsulated as an independent processing unit. Units are connected through high-speed data buses, supporting pipeline operation mode. Intermediate results are cached to dedicated memory to reduce data transfer overhead. Hardware accelerators optimize matrix operation performance to improve the efficiency of large-scale feature fusion.
[0059] Maintenance tools provide complete debugging functions, allowing single-step execution of the fusion process and viewing of intermediate states. Performance analysis tools identify computing hotspots to guide optimization directions. Visualization tools display the feature map change process to help understand the fusion effect. Remote diagnosis function supports online analysis of problems by experts to shorten troubleshooting time.
[0060] Version management adopts strict change control processes, and any algorithm update is thoroughly tested and verified. Version rollback mechanisms ensure quick recovery to a stable state. Compatibility tests cover various edge cases to prevent new issues introduced by updates. Documentation updates are synchronized with code changes to maintain the accuracy of system descriptions.
[0061] The user interface provides an intuitive operation experience, allowing real-time adjustment of fusion parameters and observation of effect changes. Parameter adjustment ranges are set with reasonable constraints to prevent invalid input values. The effect preview function helps users quickly understand the impact of parameters. Preset parameter templates simplify configuration work in common scenarios, reducing the use threshold.
[0062] System integration supports multiple industrial communication protocols, allowing easy access to existing production lines. Data interfaces are compatible with industry standard formats, reducing custom development workload. Performance indicators meet real-time processing requirements, maintaining stable frame rates in typical industrial scenarios. Reliability design takes into account continuous operation loads to ensure long-term stability.
[0063] Security mechanisms protect the system from malicious attacks and misoperations. Data input implements strict verification to prevent malicious data injection. The calculation process performs integrity checks to detect abnormal calculation behavior. Access control is based on role-based permission management, limiting unauthorized operations. Audit logs record key operations to support security incident investigations.
[0064] Example 4: Refer to Figure 5 , the dynamic compensation stage extracts quantitative indicators from the fusion defect feature map to establish a complete defect feature description system. Taking the detection of a certain type of engine turbine blade as an example, the system first performs connected region analysis on the fusion feature map. The analysis process uses an 8-neighborhood labeling algorithm to traverse all foreground pixel points and assign region numbers. Each connected region records its minimum bounding rectangle coordinates, pixel area, and perimeter value. Shape irregularity is obtained by calculating the ratio of perimeter square to area, reflecting the complexity of the defect edge. Texture complexity analysis uses the local binary pattern operator to calculate the texture feature entropy value in a 16x16 pixel sub-window.
[0065] The defect quantification list contains multiple dimensional feature parameters, and the following table shows typical defect features in turbine blade detection.
[0066] Table 1: Shows typical defect features in turbine blade detection.
[0067] Defect Number Type Code Area (mm2) Irregularity Texture Entropy Risk Level D-1024 C-3 2.56 1.87 4.32 2 D-1025 B-1 0.93 3.45 5.21 3 D-1026 A-2 5.12 2.13 3.78 1 D-1027 C-1 1.24 4.56 6.02 4 The defect level classification model adopts the gradient boosting decision tree algorithm, and the input features include all the parameters in the quantization list. The model is trained using historical detection samples and their corresponding repair records to establish a mapping relationship between feature parameters and actual risk levels. For the turbine blade application scenario, the model output is divided into five risk levels, and the higher the level value, the higher the defect hazard level. The special nature of different defect types is considered in the classification process, for example, even if the area of a crack defect is small, it may still obtain a high risk level.
[0068] The external interference analysis module monitors the changes in the detection environment in real time. In the case of turbine blade detection, the system collects parameters such as ambient light intensity, color temperature, vibration amplitude, and temperature. The light sensor is installed around the detection station, and the reading is updated every 500 ms. The interference intensity analysis uses multi-dimensional parameter joint evaluation, mapping the environmental parameters to an interference index interval of 0-100. According to the interference index, the compensation strategy strength is automatically selected, and the compensation strength is divided into three levels: mild compensation only adjusts the image enhancement parameters; moderate compensation activates the noise reduction algorithm; severe compensation triggers the system to reacquire data.
[0069] The defect compensation network adopts a multi-threshold adsorption mechanism, and each adsorption threshold corresponds to an environmental interference level. In the case of turbine blade detection, three adsorption thresholds are set: the basic threshold is suitable for standard laboratory environments; the medium threshold is used for regular detection in the workshop; and the relaxed threshold is used to deal with harsh working conditions such as strong vibration and high dust. The threshold parameters are stored in a configurable file, which can be adjusted according to specific application scenarios. When the ambient light parameters change, the system dynamically calculates the matching degree of the current environment and each threshold, and selects the closest threshold configuration.
[0070] The secondary scanning operation is started immediately after the compensation network is adjusted. For defect areas with a risk level ≥ 3, the system uses a multi-angle reinspection strategy to collect supplementary images from different angles. The scanning path planning algorithm automatically calculates the optimal viewing angle sequence based on the defect location to ensure that all key areas are covered. The reinspection images are registered and fused with the original data to update the parameter information in the defect feature map. In the case of turbine blade edge area defect detection, the system specifically adds a 45-degree inclined scanning angle to solve the blind area problem under the conventional normal viewing angle.
[0071] The quality control subsystem monitors the effectiveness of the entire compensation process. After each threshold adjustment, a standard sample test is performed to verify whether the system sensitivity remains within a reasonable range. The detection data version management system records all correction records, including original data, compensation parameters, and correction results. Automatic alarms are triggered in abnormal situations, such as when the risk level of multiple consecutive defect areas changes significantly, indicating possible system bias.
[0072] The maintenance interface provides a visual configuration tool for the compensation network. Users can intuitively view the relative position relationship between the current environmental parameters and the adsorption threshold, and manually adjust the threshold boundary. The historical data trend chart shows the change rule of the environmental disturbance index, which helps to formulate a reasonable threshold strategy. The parameter adjustment effect is displayed through the real-time preview window, and users can directly observe the image difference before and after compensation.
[0073] In the actual deployment of the aircraft engine maintenance workshop, the system shows good environmental adaptability. When the workshop crane operation causes the detection platform vibration to increase, the disturbance index rises from the normal value of 25 to 68, and the system automatically switches to the medium compensation mode. In this mode, the adsorption threshold is relaxed by 15%, and the high-frequency vibration compensation algorithm is activated to maintain stable detection accuracy. During night shift detection, due to the reduction of environmental light to 30% of the standard value, the system activates auxiliary lighting and adjusts exposure parameters to ensure that image quality is not affected.
[0074] The data management system establishes a complete file for each part's detection process. The file contains raw image data, fused feature spectrum, quantitative list, environmental parameter log, and compensation record. The data storage uses a hierarchical structure, with raw data retaining complete information and analysis results saved in multiple precision versions. The retrieval system supports multi-dimensional queries such as defect features, environmental conditions, and time ranges, facilitating quality tracing and analysis.
[0075] In terms of hardware configuration, the environmental sensor network includes four optical sensors and two vibration sensors, evenly arranged around the detection area. The data acquisition unit uses an industrial-grade analog-to-digital converter with a sampling precision of 16 bits. The real-time processing unit is equipped with a dedicated image processing accelerator card to ensure that compensation calculation does not introduce additional delay. The mechanical structure design takes into account the requirements of dust and oil prevention, and all optical components have self-cleaning function.
[0076] The user operation process is carefully designed to minimize the need for human intervention. The standard detection process is fully automated, and only requires human confirmation when the system suggests review or when controversial defects occur. The operation interface displays simple and clear status indicator lights, with green indicating normal detection conditions, yellow indicating environmental changes that need attention, and red warning of serious interference requiring human intervention. The voice prompt system gives clear guidance at key operation nodes to avoid operation errors.
[0077] The system calibration establishes a strict specification process. A quick calibration is performed before starting work every day, using a standard defect sample to verify basic functions. A complete calibration is performed every week to check the accuracy of all sensors and algorithm parameters. Calibration data is entered into the management system to form a complete calibration history record. Third-party certification agencies periodically verify the system to ensure that the detection results meet industry standard requirements.
[0078] The abnormal handling scheme covers various possible failure scenarios. When the sensor fails, it automatically switches to the backup sensor or estimation mode. When the computing unit times out and does not respond, it triggers an automatic restart process. Network interruption enables local caching to continue working, and synchronizes data after connection is restored. For the special requirements of turbine blade detection, the system is additionally configured with an emergency detection mode to maintain the minimum defect recognition ability in extreme cases.
[0079] The software architecture adopts a micro-service design, with each functional module deployed independently. The compensation network, as the core service, runs in a dedicated container and enjoys the highest priority in resource allocation. The environmental monitoring service is designed to be lightweight to reduce interference with the main system. The message bus uses a publish / subscribe mode to ensure efficient communication between modules. The service health status is monitored in real time, and abnormal services are automatically restarted or switched to backup instances.
[0080] Performance optimization is carried out for the special needs of industrial scenarios. The data processing pipeline uses zero-copy technology to reduce memory transfer overhead. Real-time computing tasks are allocated to dedicated computing cores to avoid context switching overhead. Memory management uses an object pool mode to reduce the overhead of frequent object creation and destruction. Disk IO uses an asynchronous buffering mechanism to prevent data writing from blocking real-time processing.
[0081] Example 5: The device adaptation layer realizes the standardized access and data processing of multi-source heterogeneous acquisition devices. The core function of this module is to convert the data output by optical acquisition devices of different manufacturers and models into a unified internal representation form while preserving the complete information of the original data. In the industrial camera access scenario, the system first reads the device's physical parameter configuration file, including sensor size, pixel pitch, lens focal length, and other basic information. These parameters are used to build the conversion relationship from the device coordinate system to the world coordinate system, taking into account the installation position and angular offset of the device.
[0082] The coordinate system normalization process uses quaternions to represent rotation parameters, avoiding the gimbal lock problem that may exist with Euler angles. The translation vector records the precise position of the device's optical center in the world coordinate system, with an accuracy of 0.01 millimeters. For scenarios where multiple cameras work together, the system establishes the relative position relationship graph between all devices and optimizes global coordinate consistency through the least squares method. Distortion correction processing supports multiple mathematical models, including radial distortion, tangential distortion, and the combined effect of thin prism distortion. Correction parameters are obtained through the device's calibration process and stored in a centralized parameter database.
[0083] Data format conversion process adapts to the output characteristics of different devices. For high dynamic range cameras, the system merges multi-exposure image sequences into linear response images. For polarization cameras, component images of specific polarization directions are extracted. Multispectral camera data is decomposed into discrete wavebands, each processed individually before being recombined. The conversion process preserves the bit depth and color accuracy of the original data without introducing additional quantization errors. Metadata information, including acquisition timestamps, environmental parameters, and device status, is fully retained and attached to the converted data.
[0084] Real-time processing pipeline is dynamically optimized for different device performance. For high-frame-rate industrial cameras, zero-copy memory mapping techniques are used to reduce data transfer latency. Large-array camera data is divided into multiple blocks for parallel processing, utilizing multi-core CPUs and GPU acceleration. During processing, the stability of device data streams is monitored in real time, and when frame rate fluctuations or data packet loss are detected, buffer queue size and timeout parameters are automatically adjusted. Device abnormal states such as excessive temperature or insufficient memory trigger a warning mechanism, prompting the operator to intervene in a timely manner.
[0085] Device characteristic compensation module eliminates performance differences between different sensors. Dark current noise is suppressed by real-time background subtraction algorithm, and gain inconsistency is eliminated using flat field correction technology. Pixel response non-uniformity is dynamically compensated using calibration templates, and compensation coefficients are updated regularly to adapt to sensor aging. Color restoration differences are calibrated using standard color cards, and device-specific color feature files are established. When lighting conditions change, the system automatically adjusts the color space conversion matrix based on white balance parameters.
[0086] Protocol conversion engine supports the interoperability of multiple industrial communication standards. GigEVision protocol devices are connected through dedicated network interface cards to ensure the stability of large bandwidth data transmission. USB3Vision devices enable isochronous transmission mode to reduce host CPU load. CameraLink devices configure frame grabber parameters to optimize image acquisition timing. During protocol conversion, data integrity is strictly maintained, and CRC checksum and retransmission mechanisms are used to ensure reliable delivery of critical instructions. Device control commands are translated into standardized function calls, hiding the specific differences of underlying protocols.
[0087] Device management service provides a unified control interface. Common functions such as exposure time, gain parameters, and white balance settings are accessed through standardized APIs. Advanced functions such as trigger mode, ROI region settings, and device firmware updates are also included in unified management. Asynchronous event handling mechanisms monitor device state changes, such as temperature alarms, excessive vibration, and other abnormal conditions. Device discovery service automatically identifies available acquisition devices in the network, maintaining device lists and topology relationships. The permission control system restricts the modification rights of critical parameters for different users, preventing system failures caused by misoperation.
[0088] The runtime adaptation layer dynamically adjusts processing parameters. The optimal algorithm configuration, such as demosaicing, noise reduction strength, and sharpening parameters, is automatically selected based on the current device type in use. The allocation of computing resources considers the device data characteristics, with higher resolution images being allocated more memory and processor resources. The cache strategy is optimized for device data stream patterns, with a pre-read mechanism enabled for sequential acquisition devices and a least recently used strategy for random access devices. Energy management adjusts the power supply strategy based on device power consumption characteristics, balancing performance and heat dissipation needs.
[0089] The calibration maintenance system ensures long-term measurement accuracy. Regular calibration plans automatically remind operators to perform standard procedures, and calibration data is stored in association with the device serial number. On-site rapid calibration uses portable calibration targets to simplify daily maintenance work. Deep calibration is performed in a laboratory environment, using high-precision optical reference equipment to establish compensation curves. Calibration history records form trend analysis charts to help predict sensor performance degradation. Abnormal calibration results trigger device repair recommendations to avoid using unreliable acquisition data.
[0090] The fault recovery mechanism ensures system reliability. When device connections are interrupted, automatic reinitialization is attempted, preserving current configuration parameters. Data transmission errors enable backup channels or degraded modes to maintain basic functionality. Firmware crashes trigger automatic recovery processes, rolling back to stable versions. In the event of hardware failure, the system automatically switches to a backup device, ensuring uninterrupted detection processes. All fault events are logged with detailed logs, including occurrence time, error codes, and recovery measures, supporting post-mortem analysis.
[0091] Multiple device collaboration enables composite detection capabilities. Master-slave device synchronization ensures temporal consistency in multi-view image acquisition. Data fusion processing integrates the strengths of different sensors, such as combined analysis of high-resolution cameras and infrared thermal imagers. Device workload balancing algorithms dynamically allocate acquisition tasks to avoid overloading a single device. Collaborative calibration techniques establish spatial correspondence between devices, supporting three-dimensional point cloud reconstruction and other advanced applications.
[0092] The user interface hides device complexity. The device selection interface displays available devices and their connection status in an intuitive topological graph. Parameter configuration wizards guide users through necessary setup steps, automatically applying recommended values. Real-time preview windows display acquisition images from each device, supporting side-by-side comparison and overlay display. The device status panel summarizes key indicators such as frame rate, temperature, and memory usage, with abnormal values highlighted. The operation record function tracks all device configuration changes, supporting undo and redo operations.
[0093] The deployment scheme adapts to different scale requirements. Small detection stations use an integrated machine integration scheme, pre-installed with commonly used device drivers and configuration templates. Large production line deployments distribute distributed acquisition nodes, connected to central processing servers through high-speed networks. Mobile detection devices support wireless access, suitable for field operation scenarios. Cloud deployment schemes provide virtual device interfaces, supporting remote data acquisition and analysis. Hybrid deployment mode allows local devices to work with cloud resources, flexible expansion of processing capacity.
[0094] Security mechanisms protect the integrity of the device system. Device communication enables encryption and authentication to prevent unauthorized access. The firmware update package is digitally signed and verified to block malicious code injection. Parameter modification requires secondary confirmation, and key parameter changes are forced to record operator information. Network isolation measures separate acquisition devices from office networks to reduce security risks. Audit logs record all sensitive operations to support security incident investigation and traceability.
[0095] The knowledge base system accumulates device management experience. Typical configuration schemes are stored in categories to support quick retrieval and application. The fault handling case library records common problems and solutions to assist in rapid troubleshooting. Performance optimization suggestions are based on historical data analysis to guide device parameter tuning. Best practice documents detail the use of various devices and points for attention. User community functions allow experience sharing and problem discussion, forming a collaborative learning mechanism.
[0096] The continuous update mechanism keeps the system advanced. The device driver library is updated regularly to support new models of acquisition devices. Algorithm optimization packages are incrementally released to improve the processing effect of specific devices. Security patches are applied in a timely manner to fix known vulnerabilities. Function extension modules are loaded as needed to meet individual needs. The update process supports rollback to ensure system stability is not affected. Update content details help users understand improvements and plan upgrade time reasonably.
[0097] The training system reduces the threshold for use. Device basic courses explain the working principle and operation points of various acquisition devices. Advanced configuration training deeply analyzes the mutual influence and optimization methods between parameters. Fault diagnosis exercises cultivate practical problem solving ability. Certification examination ensures that operators meet job requirements. The online help system integrates context-sensitive prompts to answer operation questions in real time. The simulation training environment allows risk-free practice of various operation scenarios.
[0098] Industry standard compatibility design ensures wide applicability. Data formats support industry standards such as DICONDE, TIFF / EP, making data exchange convenient. Measurement result reports contain all elements and formats required by standards. Interface protocols comply with industry specifications such as GenICam to ensure device interoperability. Certification qualifications cover major industry standard requirements, such as NADCAP certification in the aerospace field. Test case libraries include all verification items required by standards to ensure compliance.
[0099] Environmentally adaptive design tackles complex working conditions. Industrial-grade hardware design withstands dust, oil, and electromagnetic interference. Wide-temperature components ensure reliable operation in extreme temperatures. Shock-resistant mounting structures reduce the impact of mechanical vibrations. Redundant power supply design tackles voltage fluctuations. Protective enclosures reach IP54 and above, adapting to harsh industrial environments. Automatic adjustment mechanisms compensate for measurement deviations caused by environmental changes, such as temperature-induced focal length changes.
[0100] Scalable architecture supports future needs. Modular design allows flexible addition of new device types and processing algorithms. Abstract interface layer isolates hardware differences, simplifying new device integration. Configuration management tools support custom device parameter templates and processing flows. Scripting interfaces allow advanced users to develop specialized functions. Plugin mechanisms facilitate third-party functionality extensions, maintaining core system stability. Hardware expansion slots are reserved, supporting future interface standard upgrades.
[0101] Data analysis tools tap into device potential. Long-term tracking of device performance indicators identifies performance degradation trends. Collection data quality assessment generates quantitative reports, guiding device maintenance plans. Usage pattern analysis optimizes device scheduling strategies, improving resource utilization. Energy efficiency monitoring identifies high-energy consumption segments, guiding energy-saving optimization. Predictive maintenance models analyze operational data to provide early warnings of potential failures.
[0102] Cross-platform support enhances deployment flexibility. Windows systems provide high-performance native applications, fully utilizing hardware resources. Linux versions meet the stability requirements of industrial control systems. Mobile applications support on-site quick checks and device status monitoring. Web interfaces facilitate remote access and management. Virtual machine images simplify test environment deployment. Containerized packaging ensures consistent running environments, facilitating migration across different platforms.
[0103] Interoperability design enables system integration. Standard industrial bus interfaces support direct communication with PLC control systems. OPCUA servers expose key data and interfaces, enabling integration with MES systems. REST APIs provide programmatic access, supporting customized integration solutions. Data export formats are compatible with mainstream analysis software, such as MATLAB and Python toolchains. SDK development kits provide sample code and detailed documentation, accelerating secondary development processes.
[0104] It is to be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting; it is not intended to exclude myriad other embodiments of the present application that other inventors can develop based on the same general inventive concepts embodied by the described embodiments. That is, although the present application is described in terms of particular embodiments and implementations, it is to be understood that the terminology used is for the purpose of descriptive clarity and that it should be taken in its broadest possible sense. This is especially so where "comprising", "including", "containing", "characterized by" or the like are used as subordinating conjunctions. In this context, "comprising" is intended to mean that the embodiments can include a combination of one or more elements and / or features, including those not expressly described, without necessarily relying on any of the other features or elements not expressly described. In addition, it is to be understood that the described embodiments include any alterative or equivalent implementations or substitutions for one or more of the elements or features described. Any such alternatives or equivalents are intended to be encompassed by the description of the described embodiments.
[0105] While the embodiments of the application have been shown and described, it is to be understood that the application is not limited to the details of the embodiments described, since the scope of the expenditure of the application is defined with respect to the appended claims.
Claims
1. A method for automatic detection of defects in parts based on machine vision, characterized in that, The method comprises the following steps: acquire the three-dimensional geometric parameters of the target part, and match a historical defect sample set in a visual sample library based on the three-dimensional geometric parameters; perform defect type clustering division on the historical defect sample set to generate a plurality of defect category sub-sets; perform multi-spectral feature extraction operation on the plurality of defect category sub-sets one by one to obtain the reference detection area and the defect diffusion range parameters corresponding to each defect category; configure the scanning step of the multi-level detection network layer by using the defect diffusion range parameters, perform layered feature analysis on the target part surface scanning image sequence by the multi-level detection network layer, and generate a plurality of scale defect feature maps; perform cross-level correlation fusion operation on the plurality of scale defect feature maps to generate a fusion defect feature map, and output the fusion defect feature map as the final defect detection result.
2. The machine vision based automatic detection method of defects in parts as claimed in claim 1 wherein, The method comprises the following steps: extract a surface deformation image sequence set from each defect category sub-set; identify the local curvature mutation position in the surface deformation image sequence set to locate a reference deformation region coordinate set; perform texture spectrum analysis operation on the reference deformation region coordinate set to generate a reference defect feature vector set; use the reference defect feature vector set as an index to perform region diffusion calculation in the corresponding surface deformation image sequence set to determine the defect correlation radius parameter of each reference deformation region, which is used to represent the pixel span from the defect core region to the edge attenuation region; The method comprises the following steps: perform pixel diffusion operation from the reference deformation region coordinate set by using region growing algorithm; set a gray similarity tolerance threshold to control the pixel diffusion boundary and record the diffusion termination position coordinates; calculate the Euclidean distance between the center coordinates of the reference deformation region and the diffusion termination position coordinates to generate the original defect correlation radius; perform weighted average calculation on all original defect correlation radii to output the corrected defect correlation radius parameter.
3. The machine vision based automatic detection method of defects in parts as claimed in claim 2 wherein, The method comprises the following steps: use the curvature mutation detection model to perform real-time processing on the surface deformation image sequence set to output high-curvature fluctuation region coordinates; perform spatial density clustering operation on the high-curvature fluctuation region coordinates to generate candidate reference deformation regions; calculate the gray gradient difference value between the candidate reference deformation region and the adjacent region, and when the gray gradient difference value exceeds a preset mutation threshold, include the candidate reference deformation region in the reference deformation region coordinate set.
4. The machine vision based automatic detection method of defects in parts as claimed in claim 3 wherein, The method comprises the following steps: perform feature encoding operation on the reference deformation region coordinate set by using the defect probability prediction model; extract the deep feature tensor output by the defect probability prediction model, and perform channel attention weighted processing on the deep feature tensor; calculate the channel feature mean value by using the weighted feature tensor to generate an initial reference feature vector; Based on the preset sliding window, local feature blocks are iteratively extracted in the deep feature tensor. When the aggregation density of the local feature blocks is less than the aggregation density of the initial reference feature vector, the initial reference feature vector is taken as a reference defect feature vector set element.
5. The machine vision based automatic detection of defects in parts method as claimed in claim 1, wherein, The cross-level correlation fusion operation is performed on the plurality of scale defect feature maps, including: Selecting a coarse-grained defect feature map and a fine-grained defect feature map from the multi-level detection network layer output; Calculating the spatial correlation matrix of the coarse-grained defect feature map and the fine-grained defect feature map; Performing a normalization mapping operation on the spatial correlation matrix to generate a feature correlation weight distribution map; Performing a weighted fusion operation on the fine-grained defect feature map using the feature correlation weight distribution map to generate a cross-level enhanced feature map; Repeat the weighted fusion operation until all scale defect feature maps are fused to generate the fused defect feature map.
6. The machine vision-based automatic detection method of part defects according to claim 5, characterized in that, The feature correlation weight distribution map is generated, including: Performing an up-sampling operation on the coarse-grained defect feature map using a three-dimensional convolution kernel to match the resolution of the fine-grained defect feature map; Calculating the pixel-by-pixel similarity of the up-sampled feature map and the fine-grained defect feature map; Constructing an initial correlation weight matrix through the similarity value, and performing Gaussian smoothing processing on the initial correlation weight matrix; Divide the smoothed weight matrix by the maximum weight value to normalize and generate the feature correlation weight distribution map.
7. The machine vision based automatic detection method of defects in parts as claimed in claim 1 wherein, Further comprising: Parsing the defect distribution parameters in the fused defect feature map to generate a defect quantization list; Performing an external field interference strength analysis operation based on the defect quantization list to output multi-level compensation strategy strength parameters; Constructing a defect compensation network containing multi-level adsorption thresholds; Adjusting the adsorption threshold of the defect compensation network according to the real-time collected ambient light parameters; Performing a secondary scanning operation on the target part using the adjusted defect compensation network to update the fused defect feature map.
8. The machine vision-based automatic detection method of part defects according to claim 7, characterized in that, The generation of the defect quantization list includes: Statistically counting the number and area of connected regions in the fused defect feature map; Calculating the shape irregularity and texture complexity of each connected region; Inputting the shape irregularity and texture complexity into a defect level classification model; Outputting a structured list containing defect type codes, area weights, and risk coefficients.
9. The machine vision based automatic detection of defects in parts method as claimed in claim 1, wherein, Further comprising: Constructing a device adaptation layer to analyze the parameter differences of different optical acquisition devices; Converting the output features of the multi-level detection network layer into a coordinate encoding format supported by the target device; Maintaining the spatial correspondence of cross-level features during the conversion process; Injecting the distortion correction parameters of the target device to generate a device-independent defect detection protocol.
Citation Information
Patent Citations
Insulator defect detection method and device for a power transmission line
CN109872323A
Method and system for automatically detecting defects of semiconductor chip based on hyperspectral imaging
CN119417838A
Cigarette appearance quality detection method based on three-dimensional and multispectral fusion
CN120563466A
Defect identification in additive manufacturing based on time series in-process parameter data
WO2023111542A1
Cited By
Defect detection system for inner package
CN121033064A
Multi-dimension-based defect detection labeling quality automatic evaluation method and system
CN121437519A
Nondestructive testing method and system for internal defects of bearing sealing structure
CN121504922A
A method and system for non-destructive testing of internal defects of a bearing seal structure
CN121504922B
Intelligent computing power box data interconnection method supporting domestic industrial protocol
CN121560997A