Mechanical welding gap defect identification method

Through multi-spectral imaging and multi-scale convolutional neural network combined with support vector machine methods, the algorithm parameters are dynamically adjusted to build a weld quality evaluation database, which solves the problem of poor identification accuracy of existing weld defect detection methods under different process conditions, and achieves efficient and reliable weld defect identification and quality evaluation.

CN120355701AActive Publication Date: 2025-07-22SICHUAN CHENHAN TECHNOLOGY CO LTD

Patent Information

Application Number
CN202510819899.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-07-22
Estimated Expiration
2045-06-19

AI Technical Summary

Technical Problem

The existing weld defect detection methods have unstable detection accuracy, strong subjectivity and low efficiency, making it difficult to adapt to complex and diverse defect forms. In addition, the existing automated detection systems have poor identification accuracy under different welding process conditions, and cannot achieve stable identification across process conditions.

Method used

Multispectral imaging technology is used to collect weld surface images, extract defect features through multi-scale convolutional neural network, combine support vector machine algorithm to classify defects, and dynamically adjust the weight and kernel functions of the classification algorithm. Multi-sensor data fusion technology is used to integrate process parameter information, build a weld quality evaluation database, and realize online learning and model optimization.

Benefits of technology

It realizes accurate identification, classification and positioning of weld defects, improves the intelligence level and reliability of welding quality control, improves detection efficiency and accuracy, and adapts to changes in different welding process conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120355701A_ABST
    Figure CN120355701A_ABST
Patent Text Reader

Abstract

The invention discloses a mechanical welding seam defect identification method, and relates to the technical field of welding quality intelligent detection and defect identification, and the method comprises the steps: S1, collecting welding seam surface image data, obtaining a standardized image data set, carrying out the feature extraction of the standardized image data set, and obtaining a feature extraction result; the method comprises the following steps: S1, extracting edge contours, texture distribution and gray change features of defects, and generating a high-dimensional feature vector containing space position coordinates and morphological features of the defects, S2, generating a weld quality evaluation database containing defect distribution uniformity and defect severity scores according to edge continuity parameters and gray uniformity parameters in the high-dimensional feature vector; according to the mechanical welding seam defect identification method, accurate identification, classification and positioning of welding seam defects can be achieved, comprehensive evaluation of the welding seam quality is given, and the intelligent level and reliability of welding quality control are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent detection of welding quality and defect recognition, and particularly relates to a method for identifying mechanical welding seam defects. Background Art

[0002] As the core connection technology in modern manufacturing, the quality of mechanical welding directly determines the safety and reliability of products in key fields such as aerospace, ocean engineering, and nuclear power equipment. The accurate identification and evaluation of weld defects have become a decisive factor in ensuring the integrity of engineering structures and are of strategic significance to the quality control system of the entire manufacturing industry.

[0003] Traditional weld defect detection methods mainly rely on manual visual inspection and simple non-destructive testing techniques. These methods generally have problems such as unstable detection accuracy, strong subjectivity, and low efficiency. Although existing automated detection systems have improved the detection speed to a certain extent, when faced with complex and diverse defect morphologies, they often have limitations such as high misjudgment rates and poor adaptability, and it is difficult to meet the strict requirements of modern precision manufacturing for detection accuracy and consistency. The core challenge in the current field of weld defect recognition stems from the complexity of defect feature extraction. Defects such as pores, slag inclusions, cracks, and lack of fusion generated under different welding process conditions have significant differences in morphology, size, and distribution characteristics, and existing recognition algorithms are difficult to accurately capture these subtle but key feature differences. This deficiency in feature extraction ability directly leads to a decrease in the accuracy of defect classification, making the recognition system unable to effectively distinguish similar defect types. Even more complex is that the same type of defect will present completely different characterization forms under different process parameters, material combinations, and environmental conditions. This lack of process adaptability causes the recognition system to show obvious performance degradation when faced with new welding processes or changes in working conditions, and it is unable to achieve stable recognition across process conditions. Summary of the Invention

[0004] The purpose of the present invention is to provide a method for identifying mechanical welding seam defects, construct an intelligent recognition system that can not only accurately extract multi-dimensional defect features but also adapt to different welding process conditions, and achieve high-precision automatic discrimination of various weld defects.

[0005] To achieve the above purpose, the present invention provides the following technical solution: A method for identifying mechanical welding seam defects, the method comprising: S1. Collect weld surface image data to obtain a standardized image data set, perform feature extraction on the standardized image data set, extract the edge contour, texture distribution, and gray-scale change features of the defects, and generate a high-dimensional feature vector containing the spatial position coordinates and morphological features of the defects; S2. Generate a weld quality assessment database containing the uniformity of defect distribution and the severity score of defects according to the edge continuity parameter and the gray-scale uniformity parameter in the high-dimensional feature vector; S3. Adopt an online learning algorithm. According to the newly added defect sample data and the defect trend analysis results, dynamically adjust the weight update frequency of the multi-scale convolutional neural network and the selection of the kernel function of the support vector machine, optimize the feature weight distribution and kernel parameters, and generate the updated defect recognition model parameters; S4. Through the model convergence evaluation algorithm, calculate the loss function value of the updated defect recognition model, and combine the incremental sample annotation results to judge whether the classification accuracy of the model meets the preset threshold, and determine the optimized configuration parameters of the intelligent recognition system.

[0006] Preferably, in S1, when collecting the weld surface image data to obtain the standardized image dataset, it includes collecting the image data of the weld surface in the visible light, infrared, and ultraviolet bands through a multi-spectral imaging device, and screening the collected images using the image clarity threshold and the noise level threshold, and eliminating the blurred or overly noisy images to obtain the standardized image dataset.

[0007] Preferably, S1 further includes using a multi-scale convolutional neural network to extract features from the standardized image dataset, setting the convolutional kernel sizes of 3x3, 5x5, and 7x7, and extracting the edge contours, texture distributions, and gray-scale change features of the defects.

[0008] Preferably, S2 includes using the support vector machine classification algorithm to identify the defect types according to the edge continuity parameter and the gray-scale uniformity parameter in the high-dimensional feature vector. If the edge continuity parameter is greater than 0.8, it is judged as a crack defect. If the gray-scale uniformity parameter is less than 0.6, it is judged as a pore defect, and the preliminary defect classification result is obtained.

[0009] Preferably, S2 further includes dynamically adjusting the weight coefficient and discrimination threshold of the support vector machine classification algorithm according to the current intensity, welding speed, and shielding gas flow parameters of the welding process, and integrating the process parameter information through a weighted fusion algorithm to generate an optimized defect classification result adapted to the current process conditions.

[0010] Preferably, S2 further includes using the multi-sensor data fusion technology, integrating the optimized defect classification result and the process parameter information through a weighted fusion algorithm, calculating the comprehensive confidence score, and if the comprehensive confidence score is greater than 0.85, confirming the final recognition results of the defect type and the defect position coordinates.

[0011] Preferably, S2 further includes calculating the defect density distribution and defect spatial clustering characteristics through a statistical analysis algorithm based on the defect type and defect position coordinates, and generating a weld quality evaluation database containing the defect distribution uniformity and defect severity score by combining defect size statistics and defect type ratio.

[0012] Preferably, the specific formula for S2 to generate a weld quality evaluation database containing the defect distribution uniformity and defect severity score based on the edge continuity parameter and gray level uniformity parameter in the high-dimensional feature vector is: ; ; where, represents the intelligent evaluation score of the defect image, represents the area term weight factor, represents the gray level perturbation weight factor, represents the morphological complexity adjustment factor, represents the area of the defect region, represents the area power exponent, represents the standard deviation of gray level, represents the average gray level, represents the gray level perturbation power exponent, represents the defect edge perturbation adjustment parameter, represents the edge discontinuity score, represents the direction angle of the k-th edge point, represents the number of edge pixel points.

[0013] Preferably, the specific calculation formula is: ; where, represents the area term weight factor, represents the area of the defect region, represents the major axis length of the minimum circumscribed ellipse of the defect region.

[0014] Preferably, the specific calculation formula is: ; where, represents the gray level perturbation weight factor, represents the standard deviation of local gray level change within the defect region, represents the average gradient direction offset; The = 1 - - ; where, Represents the morphological complexity adjustment factor.

[0015] As can be seen from the above technical solutions, the present invention has the following beneficial effects: The method for identifying mechanical welding seam defects collects the surface images of the weld seam through multi-spectral imaging, extracts defect features using a multi-scale convolutional neural network, and combines the support vector machine algorithm for defect classification. The innovation lies in integrating the dynamic adjustment classification algorithm of welding process parameters and adopting multi-sensor data fusion technology to improve the recognition accuracy. The present invention also establishes a weld quality evaluation database and continuously optimizes the recognition model through an online learning algorithm. This method can achieve accurate identification, classification, and positioning of weld seam defects, and give a comprehensive evaluation of the weld quality, effectively improving the intelligent level and reliability of welding quality control. Brief Description of the Drawings

[0016] Figure 1 It is a flowchart of the method of the present invention. Specific Embodiments

[0017] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0018] As Figure 1 shown, the present invention provides a technical solution: a method for identifying mechanical welding seam defects, the method comprising: S1. Collect the surface image data of the weld seam to obtain a standardized image data set, extract features from the standardized image data set, extract the edge contour, texture distribution, and gray-scale change features of the defect, and generate a high-dimensional feature vector containing the spatial position coordinates and morphological features of the defect; S2. Generate a weld quality evaluation database containing the defect distribution uniformity and defect severity score according to the edge continuity parameter and gray-scale uniformity parameter in the high-dimensional feature vector; S3. Adopt an online learning algorithm, and dynamically adjust the weight update frequency of the multi-scale convolutional neural network and the selection of the kernel function of the support vector machine according to the new defect sample data and the defect trend analysis result, optimize the feature weight distribution and kernel parameters, and generate updated defect recognition model parameters; S4. Through the model convergence evaluation algorithm, calculate the loss function value of the updated defect recognition model, and combine the incremental sample annotation result to determine whether the model classification accuracy meets the preset threshold, and determine the optimized intelligent recognition system configuration parameters.

[0019] This method realizes the efficient identification and quality assessment of mechanical welding seam defects through the following four stages: In the first stage, a high-resolution industrial camera is used to collect real-time images of the weld surface. The images go through a standardized processing flow, including preprocessing operations such as unifying image size, normalizing grayscale, and suppressing noise, to ensure stable and consistent image quality. Subsequently, defect features are extracted by means of edge detection (such as the Canny algorithm), texture analysis (such as LBP or Gabor filtering), and grayscale gradient analysis, etc., and a high-dimensional feature vector containing attributes such as spatial position information, edge contour complexity, texture directionality, and grayscale change amplitude is formed. This vector provides a complete structured description of each type of defect and lays a foundation for subsequent identification modeling. In the second stage, two key parameters, namely edge continuity and grayscale uniformity, in the above high-dimensional feature vector are utilized. By calculating statistical indicators such as the edge connection length ratio and grayscale standard deviation of the feature region, a distribution feature map and severity scoring system of weld defects are constructed. The scoring results are entered into the weld quality assessment database, which supports the classification and filing of multiple defect types (such as pores, cracks, lack of fusion, etc.) and their severity levels, realizing the functions of quality traceability and trend analysis. In the third stage, a dynamic online learning mechanism is introduced. The system continuously incorporates newly acquired defect images and their annotation results into the training process. Different-resolution image features are processed by a multi-scale convolutional neural network to identify the defect region at a coarse scale and then finely divide the defect boundary at a fine scale, enhancing the region perception ability of the model. The weight update frequency of the network is dynamically adjusted according to the complexity and class distribution of the newly added samples. At the same time, a support vector machine is used as a supplementary classifier, which automatically selects the optimal kernel function (such as radial basis kernel, Sigmoid kernel, or polynomial kernel) according to real-time data, improves the discriminant ability of the model for non-linear boundaries, and adjusts the weight allocation of various features through feature importance analysis to enable the model to quickly adapt to changes in the morphology of weld defects. In the final stage, the system monitors the training process through a model convergence evaluation algorithm, including monitoring indicators such as the decline rate of the loss function (such as cross-entropy loss or mean square error) and the improvement trend of training accuracy, to evaluate the stability and generalization ability of the model. Verification is carried out by combining newly annotated incremental samples, and comprehensive indicators such as classification accuracy, recall rate, and F1 value are calculated. Comparing with the set performance threshold determines whether to accept the current model version. If the requirements are met, the model is automatically deployed to the intelligent identification system, and configuration parameters such as the recognition confidence threshold, warning level setting, and inference speed tuning parameters are updated synchronously to achieve the optimal deployment of system performance.

[0020] 1. Image Preprocessing and Feature Extraction

[0021] First, obtain the weld surface image through a high-resolution industrial camera. The image is normalized to unify the size and brightness, and median filtering and other methods are used to remove noise, thereby generating a standardized image. Subsequently, the system uses edge detection methods (such as the Canny algorithm) to extract the edge contours of weld defects in the image; at the same time, the Gabor filter is used to extract the texture directionality features of the defect area, and then the gray-level co-occurrence matrix is combined to analyze the distribution of gray-level changes in the defect area of the image.

[0022] On this basis, two key feature parameters are extracted: Edge continuity parameter: This parameter indicates whether the edge of the defect area is complete. Its calculation method is: count the total length of all continuous edge segments, and then divide by the total length of edge detection to obtain a ratio value. The larger this ratio, the more complete the edge structure, indicating that the recognition model is easier to lock the defect area.

[0023] Explanation of parameter meaning: The total length of continuous edge segments represents the linear recognizability of the defect boundary; the total length of edge detection represents the sum of all recognizable edge pixels in the image.

[0024] Parameter determination method: Use the edge detection algorithm to count edge pixels and mark continuous regions, and accumulate the lengths by combining pixel distances.

[0025] Gray-level uniformity parameter: Used to measure the stability of the gray level in the defect area. The specific calculation method is: first calculate the standard deviation of the gray level in the defect area, then divide by the average gray level of this area, and finally subtract this ratio from 1. The closer this value is to 1, the more uniform the gray level in this area.

[0026] Explanation of parameter meaning: The gray-level standard deviation represents the degree of image brightness change; the gray-level mean represents the overall brightness level.

[0027] Parameter determination method: After extracting all pixel gray-level values in the defect area, the system automatically calculates its standard deviation and mean, and performs ratio conversion.

[0028] 2. Generation of weld quality assessment database

[0029] Based on the above two feature parameters, two scores are constructed: one is the severity score of the defect, and the other is the distribution uniformity score of the defect. Subsequently, the two are combined into a comprehensive score in a weighted average manner. This score reflects the degree of influence of the defect on the overall welding quality.

[0030] Explanation of parameter meaning: The severity score reflects whether the defect morphological features affect the structural strength, and the uniformity score represents the stability of the defect in the image area.

[0031] 3. Online learning and recognition model optimization

[0032] Adopt an online learning mechanism to achieve dynamic update of the defect recognition model. This mechanism introduces a multi-scale convolutional neural network for processing weld images with different resolutions and structural complexities. As new defect samples continue to accumulate, the system dynamically adjusts the update frequency of the neural network parameters.

[0033] Calculation method of the update frequency: The system multiplies the number of new samples by the degree of sample diversity and then by an adjustment coefficient to obtain the final update frequency.

[0034] Parameter description: The number of new samples represents the number of new image samples collected since the last update; the diversity index is obtained by calculating the entropy value of the sample class distribution; the adjustment coefficient is an empirical value, such as 0.1, to regulate the sensitivity of frequency changes.

[0035] In addition, a support vector machine is used as an auxiliary classification module, and its kernel function type is selected by the cross-validation method. The system selects the one with the smallest classification error among the radial basis kernel function, Sigmoid kernel function, and polynomial kernel function as the kernel function of the current model.

[0036] 4. Model Convergence Evaluation

[0037] After each model training, the system needs to evaluate whether the training effect has converged, that is, whether the model error is stable within a small range. Based on the cross-entropy loss, the system calculates the difference between the model output and the actual annotation one by one and takes the average value of all samples as the total loss. If this value decreases slowly or remains stable, it indicates that the model has tended to converge.

[0038] Parameter description: The true label and predicted probability of each sample are used to calculate the loss; the loss values of all samples are averaged to obtain the overall loss result.

[0039] On this basis, the system further calculates the F1 value by combining precision and recall as the final performance evaluation index of the model.

[0040] The F1 value is the harmonic mean of precision and recall. If it is greater than the set threshold (such as 0.92), the model is determined to meet the deployment standard.

[0041] This method realizes the scientific identification and evaluation of welding defects by introducing quantization formulas and parameter models. Through the combination of high-dimensional features and evaluation indicators, it realizes the structured evaluation and trend analysis of weld quality. The online learning mechanism ensures that the model can continuously adapt to the changes in defect distribution caused by different batches, materials, or process parameters during the welding process. The adopted model convergence algorithm improves the system stability, reduces the training time, and improves the overall recognition efficiency and reliability.

[0042] Taking the automatic welding line of large steel structures in a certain shipyard as an example, the system installs dual-channel industrial cameras downstream of the weld line to collect image data, processing approximately 3,200 weld images per day. After deploying the above recognition method, the system dynamically introduces newly added defect samples in the past 7 days during the S3 stage to train and update the recognition model, achieving accurate classification and recognition of 6 types of defects including lack of fusion, slag inclusion, and undercut. The automatic recognition rate of the system has increased from 84.7% to 93.2%. The quality assessment database automatically generates weld batch assessment reports in combination with the scoring results, facilitating the standardization, traceable management of on-site quality inspection processes, and suggestions for welding process adjustment, saving approximately 15% of the manual inspection time for hull manufacturing.

[0043] In S1, the surface image data of the weld is collected, and a standardized image dataset is obtained, including collecting the image data of the weld surface in the visible light, infrared, and ultraviolet bands through a multispectral imaging device, and screening the collected images using the image sharpness threshold and noise level threshold to eliminate blurred or overly noisy images, resulting in a standardized image dataset.

[0044] In this embodiment, through the multispectral imaging and image quality screening mechanism, high-quality and information-rich weld images are obtained for constructing a standardized image dataset, thereby enhancing the accuracy and stability of subsequent defect recognition.

[0045] I. Image acquisition method

[0046] An imaging device with a multispectral channel is used to simultaneously collect images of the weld surface in three bands: The visible light band image is used to obtain the color, morphology, and edge structure of the weld surface; The infrared band image is used to reflect the thermal distribution characteristics of the weld metal material, such as potential thermal stress concentration; The ultraviolet band image can enhance the visualization ability of metal cracks and minute flaws.

[0047] During the multi-channel image acquisition process, through a synchronization control system, it is ensured that the three-band images correspond one-to-one in the spatial pixel positions for subsequent multispectral image fusion and unified analysis.

[0048] II. Image quality screening mechanism

[0049] To ensure that the data entering the model training has the characteristics of high definition and low noise, the system uses the following two metrics to screen the images: 1. Image sharpness evaluation The sharpness of the image is measured by calculating the gradient change intensity in the edge region of the image. The specific method is as follows: First, the system applies a Laplace transform (i.e., a second-order derivative operation) to the image to enhance the response of the edge areas in the image; then, the variance of the transform results for all pixels is calculated; the final variance value is the clarity score of the image.

[0050] Parameter explanation and determination method: The larger the clarity score value, the clearer the image edge information; the set clarity threshold is generally based on statistics of typical clear images in the training data set, usually set between 100 and 150; if the clarity score of an image is less than the threshold, the system determines that the image is a "blurred image" and is not included in the standardized image data set.

[0051] 2. Image noise level evaluation

[0052] The noise level is measured by the grayscale fluctuation of the weld background area in the image. The specific process is as follows: first, the non-defective area in the image is identified as the background area; then, the system counts the grayscale values of all pixels in the background area: the sum of the squares of the deviations between these grayscale values and the average grayscale value is calculated, and the arithmetic mean is taken and the square root is taken to obtain the standard deviation; the final standard deviation is the noise score value.

[0053] Parameter explanation and determination method: The larger the standard deviation, the more drastic the grayscale fluctuation in the background area, that is, the higher the noise level; the noise threshold is set between 10 and 20 based on the equipment noise characteristics, acquisition environment and other conditions; if the noise score of an image is greater than the threshold, it is judged as a "high noise image" and is eliminated.

[0054] 3. Screening decision logic

[0055] The following joint judgment is performed on each frame of the image: only when the clarity score of the image is greater than or equal to the clarity threshold and the noise score is less than or equal to the noise threshold, the image is considered to be of qualified quality and included in the standardized data set; otherwise, the image is marked as "unqualified" and excluded from the subsequent analysis process.

[0056] Through this double screening mechanism, it is ensured that the constructed standardized image dataset only contains high-quality images with sufficient spatial details and low background interference, providing a stable and reliable data foundation for the subsequent training of defect recognition models.

[0057] The use of multispectral imaging technology significantly improves the detectability of weld defects. The infrared band enhances the response to thermal stress concentration areas or potential cracks, and the ultraviolet band has a stronger ability to identify tiny metal cracks, which is significantly better than a single light source image system. The dual screening mechanism of image clarity and noise ensures a high degree of consistency in the quality of the data source, effectively reduces the false detection rate and error propagation, and improves the accuracy of subsequent feature extraction and model training. The construction of a standardized image set lays a solid foundation for the robustness and portability of the entire system.

[0058] S1 also includes using a multi-scale convolutional neural network to extract features from the standardized image dataset, setting the convolutional kernel sizes of 3x3, 5x5, and 7x7, and extracting the edge contours, texture distributions, and gray-scale change features of the defects.

[0059] In this embodiment, by introducing a multi-scale convolutional neural network structure on the basis of image preprocessing, accurate feature extraction is performed on defect regions with different sizes and complexities in the weld image, which is particularly suitable for the recognition scenario where multiple types of welding defects such as micro-cracks, weld beads, and abnormal gray-scale distributions coexist. This neural network contains three convolutional channels, and the convolutional kernel sizes are set to 3×3, 5×5, and 7×7 respectively, forming a parallel structure to ensure that sufficient edge, texture, and gray-scale change features can be extracted at the multi-scale level.

[0060] I. Basic principle of convolution operation

[0061] Convolution operation is to slide a weight matrix (i.e., convolutional kernel) sequentially over the local area of the input image. At each sliding position, the local area of the image is multiplied by the corresponding elements of the convolutional kernel and summed to generate a new feature value. The system repeats this process for each position in the image to generate a new feature map for expressing specific structural features in the input image.

[0062] Taking the 3×3 convolution as an example: Select a 3×3 pixel block centered on a certain pixel in the image and multiply it by the 9 parameter values in the convolutional kernel respectively; sum these 9 products to obtain the output feature value at this position; after this operation traverses the entire image, a 3×3 convolutional feature map can be generated.

[0063] The convolution processes of 5×5 and 7×7 are the same, except that the calculation area range is expanded, which is more conducive to capturing larger structures or slowly changing gray-scale information.

[0064] II. Calculation of output feature map size

[0065] To ensure that the image size after convolution is controllable, the system introduces the parameters of "padding" and "stride". For any convolutional kernel size K, the input image size is width, height, stride, and padding size. The output image size is determined by the following calculation: The calculation method of the output width is: add twice the padding value to the input width, subtract the convolutional kernel size, divide by the stride, and then add 1. The calculation method of the output height is the same as that of the width.

[0066] For example: The width of the input image is 256 pixels; use a 7×7 convolutional kernel, set the padding to 3, and the stride to 1; then the output width is: 256 + 2×3 − 7 = 255, divide by the stride 1 and then add 1, and the result is 256 pixels; that is, this convolution operation keeps the image size unchanged.

[0067] The padding value is usually set to "(kernel size - 1) / 2". For example, for a 3×3 convolution, the padding size is 1; for a 5×5 convolution, the padding size is 2; for a 7×7 convolution, the padding size is 3. This is to keep the output size of the feature map consistent with the input image size, facilitating subsequent multi-scale feature fusion.

[0068] III. Multi-scale Channel Fusion Mechanism

[0069] Design three parallel channels to be responsible for feature extraction of different sizes respectively, and finally fuse the outputs of these three paths to form a unified feature vector. The fusion methods include: 1. Feature Concatenation Fusion: Directly concatenate the output feature maps of different convolution paths along the channel dimension to form a high-dimensional joint feature representation; 2. Weighted Fusion: Set fusion weights for each path according to experience or the results of training data. For example, set the weights of the three channels of 3×3, 5×5, and 7×7 to 0.3, 0.3, and 0.4 respectively. Then the fused output feature is the sum of the respective outputs weighted by the corresponding weights.

[0070] There are two ways to determine the weighted values: one is manual setting, based on experimental verification of the contribution distribution of each convolution channel to the recognition accuracy; the other is training learning, where the network adaptively adjusts the weight values to minimize the overall loss function.

[0071] IV. Activation Function and Normalization Operation

[0072] After the output of each convolution layer, it is first processed by the ReLU activation function to set all negative values to zero, enabling the features to have non-linear distribution capabilities, which helps to capture the non-linear features of the image. Immediately afterwards, batch normalization is performed to standardize the feature distribution of each channel to a mean of 0 and a variance of 1, improving the network stability and accelerating the training convergence.

[0073] V. Structural Composition of the Output Features

[0074] The fused multi-scale feature vector contains the following three types of important dimensional information: 1. Edge contour information: mainly extracted by 3×3 convolution, reflecting subtle structural changes such as cracks and boundary anomalies; 2. Texture distribution information: obtained through 5×5 convolution, depicting the directional and periodic characteristics of the weld surface texture; 3. Gray-scale change information: recognized by 7×7 convolution, used to detect large-scale intensity changes, such as defect areas like lack of fusion, burn-through, or thickness mutation.

[0075] Finally, the fused high-dimensional feature vector is input into subsequent defect classification modules, position regression modules, or scoring modules to achieve functions such as defect recognition, localization, and severity assessment.

[0076] By introducing a multi-scale convolutional kernel structure, the system can take into account both microscopic and macroscopic information when extracting image features, overcoming the limitations of a single convolutional scale in identifying complex or superimposed defects. This strategy significantly improves the model's adaptability to areas with blurred weld defect edges, slow gray-scale transitions, or irregular texture distributions. The feature fusion mechanism avoids information loss, enhances the robustness and distinguishability of the overall feature representation, and helps improve the final recognition accuracy and classification stability.

[0077] S2 includes identifying the defect type using the support vector machine classification algorithm based on the edge continuity parameter and the gray-scale uniformity parameter in the high-dimensional feature vector. If the edge continuity parameter is greater than 0.8, it is judged as a crack defect. If the gray-scale uniformity parameter is less than 0.6, it is judged as a porosity defect, and a preliminary defect classification result is obtained.

[0078] This embodiment is based on the high-dimensional feature vector extracted from the weld image and uses a two-stage method of "threshold judgment + support vector machine classification" to preliminarily identify the type of welding defects. This method specifically targets two common types of defects, namely "crack defects" and "porosity defects", constructs a classification logic through two parameters of edge continuity and gray-scale uniformity, and combines a support vector machine model to improve classification accuracy and application flexibility.

[0079] I. Definition and calculation of the edge continuity parameter

[0080] The edge continuity parameter is used to describe the coherence degree of the weld defect boundary in the image, that is, whether the edge presents a complete linear structure. The calculation process of this parameter is as follows: Use an image processing algorithm (such as Canny edge detection) to identify all edge pixels; perform contour analysis on these edge pixels to identify and label continuous edge segments; calculate the total length sum of all continuous edge segments, denoted as "continuous edge length"; at the same time, calculate the total length sum of all detected edge pixels in the image, denoted as "total edge length"; divide the "continuous edge length" by the "total edge length" to obtain the edge continuity parameter of this area.

[0081] The value range of this parameter is from 0 to 1. The closer the value is to 1, the more coherent the edge is. According to the statistical data of a large number of weld images, when this value is higher than 0.8, most correspond to crack-like defects. Therefore, the system sets 0.8 as the crack recognition threshold.

[0082] II. Definition and calculation of the gray-scale uniformity parameter

[0083] The gray - level uniformity parameter is used to measure the degree of gray - level change within the defective area, that is, whether there are significant brightness fluctuations in the image. Its calculation process is as follows: Extract all the pixel gray - level values of the defective area to be analyzed; Calculate the average value of these gray - level values, denoted as "gray - level mean"; Calculate the square of the difference between these gray - level values and the gray - level mean, then take the average, and finally take the square root to obtain the "gray - level standard deviation"; Divide the "gray - level standard deviation" by the "gray - level mean" to get the gray - level change ratio; Subtract this ratio from 1, which is the gray - level uniformity parameter.

[0084] The value of this parameter is also between 0 and 1. The closer the value is to 1, the smoother the gray - level within the area. Practical engineering image analysis shows that due to the air - hole defects appearing as randomly distributed dark spots in the image, the gray - level distribution in the area is extremely uneven, and this parameter is often lower than 0.6. Therefore, the system sets 0.6 as the judgment threshold for identifying air - hole defects.

[0085] III. Preliminary Judgment Logic for Defect Types

[0086] After the system completes the extraction of the edge - continuity and gray - level uniformity parameters, the following logical judgment is executed: If the edge - continuity parameter is greater than 0.8, then the area is judged as "crack defect"; If the gray - level uniformity parameter is less than 0.6, then the area is judged as "air - hole defect"; If neither of the above two conditions is met, then the type of the defective area is marked as "uncertain" and needs to enter the second - stage identification.

[0087] This threshold - classification strategy is applicable to quickly screening typical defect types and can greatly reduce the subsequent model calculation burden.

[0088] IV. Principle and Parameter Explanation of Support Vector Machine Classification

[0089] For samples that do not meet the above - mentioned threshold rules, the system introduces a support vector machine (SVM) for further classification and identification. Its basic principle is: Construct an "optimal hyperplane" in the feature space, which can distinguish different types of defect data points to the greatest extent. SVM uses training samples to learn this classification boundary.

[0090] In practical applications, the system constructs a feature vector with multiple dimensions for each defect sample, including edge features, texture features, gray - level features, etc. The SVM model inputs these features into the classifier and outputs the corresponding defect - type labels (such as crack, air - hole, lack - of - fusion, etc.).

[0091] The classification process includes the following parameter settings and determinations: Kernel function selection: To improve the processing ability of non-linear data, the system adopts the radial basis kernel function. Regularization parameter: Used to control the error tolerance level. The larger the value, the stronger the penalty for errors, usually set between 1 and 10, and the optimal value is selected according to the cross-validation accuracy. Kernel function width parameter γ: Controls the "influence range" of the RBF kernel function. A smaller value indicates a larger influence range, usually initially set to 1 / n (n is the feature dimension), and then optimized through grid search.

[0092] The training process uses a labeled defect image sample set to optimize the classification boundary and enable the SVM model to have strong generalization ability. For the input unknown defect area, SVM will output its most likely class label and confidence.

[0093] By presetting the decision threshold strategy to cooperate with the SVM model, fast and interpretable classification of defect types is achieved. The threshold method provides a clear identification path for typical defects such as common cracks and pores, simplifying the processing flow; while SVM classification enhances the system's generalization ability for defects with fuzzy boundaries and uncertain morphologies, improving the overall recognition accuracy and robustness. This method is especially suitable for scenarios that require rapid preliminary classification in industrial fields.

[0094] S2 also includes dynamically adjusting the weight coefficients and discrimination thresholds of the support vector machine classification algorithm according to the current intensity, welding speed, and shielding gas flow parameters of the welding process, integrating the process parameter information through a weighted fusion algorithm, and generating an optimized defect classification result adapted to the current process conditions.

[0095] In this embodiment, on the basis of image recognition, key process parameters in the welding process are further integrated, including welding current intensity, welding speed, and shielding gas flow, to achieve dynamic adjustment and adaptive optimization of the support vector machine classification model. This method converts the process parameters into quantifiable working condition factors and adjusts the classification weights and discrimination boundaries of the model accordingly, thereby improving the stability of defect recognition and process adaptability.

[0096] I. Normalization processing of process parameters

[0097] Since the three process parameters of welding current, speed, and gas flow have different physical units and orders of magnitude, the system first performs standardization processing on them to convert them into dimensionless parameters with a unified dimension, facilitating their participation in subsequent weighted fusion.

[0098] The specific method is as follows: 1. For the welding current, let the current actual current (unit: ampere), the minimum current allowed by the welding system, and the maximum current. The normalized current, and its calculation process is: subtract the minimum current from the current current, and then divide by the difference between the maximum current and the minimum current.

[0099] That is: Normalized current value = (Actual current Lower current limit) ÷ (Upper current limit Lower current limit).

[0100] 2. For the welding speed, set the current speed (unit: millimeters per second), lower speed limit, and upper speed limit. The normalization method is the same as above: Normalized speed value = (Actual speed Lower speed limit) ÷ (Upper speed limit Lower speed limit).

[0101] 3. For the shielding gas flow rate, set the current value (unit: liters per minute), lower gas limit, and upper gas limit. The normalization process is: Normalized gas flow rate value = (Current gas flow Minimum value) ÷ (Maximum value Minimum value).

[0102] The parameter values after the normalization processing of these three items are all between 0 and 1, ensuring the consistency of subsequent operations.

[0103] Description of the parameter determination method: The above upper and lower limit values can be obtained according to the enterprise welding standards, material types, or statistics of previous process tests, or can be set as the empirical safety interval range.

[0104] II. Weighted Fusion Calculation of Working Condition Influence Factors

[0105] To reflect the relative importance of the three process parameters on defect discrimination, the system introduces process weight coefficients and calculates the comprehensive working condition factor accordingly. The calculation method is as follows: Multiply the normalized current, speed, and gas flow rate by their corresponding weight values respectively, and then sum the three to obtain a working condition factor value between 0 and 1.

[0106] For example: The weight given to the normalized current value is 0.4, the speed is 0.35, and the gas flow rate is 0.25; if the current normalized values are 0.6, 0.7, and 0.8 respectively, the comprehensive working condition factor is: 0.4×0.6 + 0.35×0.7 + 0.25×0.8 = 0.24 + 0.245 + 0.2 = 0.685.

[0107] This factor is used to describe the degree of deviation of the current process state from the ideal state. The larger the value, the greater the working condition fluctuation and the more significant the impact on defect recognition.

[0108] III. Adaptive Adjustment of Classification Model Parameters

[0109] Two key parameters in the support vector machine classifier are adjusted according to the above-mentioned working condition factors: 1. Classification threshold adjustment: The system sets a standard defect classification probability threshold, such as 0.5 as the default value; if the current working condition factor is higher than the preset stability threshold (such as 0.7), the system dynamically reduces the decision threshold according to the difference; for example, when the working condition factor is 0.85 and the difference is 0.15, if it is set to decrease by 0.02 for every 0.1 offset, the new classification threshold is 0.5 (0.15 × 0.2) = 0.47; this can reduce the false rejection risk of the model under unstable process conditions and improve fault tolerance.

[0110] 3. Dynamic weighting of feature weights

[0111] If the welding speed increases significantly, the system multiplies the input value of the crack feature dimension by a strengthening factor, such as 1.2, to increase the sensitivity of this type of defect in classification; If the gas flow rate is too low, the system multiplies the porosity feature dimension by a factor such as 1.3 to make the classifier more likely to identify porosity features; The size of the weighting factor is determined by the change trend of the recognition accuracy of historical samples under different working conditions.

[0112] IV. Final defect classification fusion

[0113] Judgment is made according to the image recognition output probability and the corrected classification threshold: if the recognition probability is higher than the corrected threshold, the defect type is directly confirmed; if the recognition probability is close to the threshold and the working condition factor deviates greatly, the system marks the classification result as "low confidence" and reports it or conducts manual review; combining the dual dimensions of image and process, the optimized defect type label and confidence value are finally output.

[0114] By introducing welding process parameters into the defect classification process, the system realizes a two-dimensional adaptive recognition mechanism based on image + process. This strategy significantly enhances the robustness of the model to the problem of inconsistent defect manifestations under complex production conditions and reduces the misjudgment rate caused by process drift. The dynamic adjustment mechanism of support vector machine parameters ensures the flexibility of the classification boundary, effectively improves the accuracy and environmental adaptability of the model, and is applicable to industrial automation detection systems of different product types and welding modes.

[0115] S2 also includes using multi-sensor data fusion technology to integrate and optimize the defect classification results and process parameter information through a weighted fusion algorithm, calculate the comprehensive confidence score, and if the comprehensive confidence score is greater than 0.85, confirm the final recognition results of the defect type and defect position coordinates.

[0116] In this embodiment, to improve the reliability of the final decision in welding defect recognition, the system introduces a multi-sensor fusion mechanism on the basis of image recognition and process optimization. It integrates the output results of the image recognition model and the welding process status parameters, calculates a "comprehensive confidence score", and determines the final recognition results of the defect type and its position coordinates based on whether the score meets the threshold judgment. This method comprehensively evaluates the information from multiple data sources according to a weighted strategy through soft fusion technology, and has real-time performance and adjustability.

[0117] This process includes the following four stages: I. Input data acquisition and standardization processing Obtain recognition-related information from two types of data sources, which are respectively: 1. Output data of the image recognition model After processing the weld image, the image recognition model will output a value, called the image recognition confidence, which is used to represent the possibility that the current image belongs to a certain defect type. This value is a decimal between 0 and 1. For example, 0.92 means that the system predicts that the probability of this area being a "crack defect" is 92%.

[0118] 2. Welding process status indicators

[0119] A unified indicator from the fusion of process data such as welding current, speed, and gas flow is called the process confidence parameter. This value has also been normalized to a decimal between 0 and 1, and is used to represent the confidence level of the system in the recognition stability under the current process state. For example, if the welding parameters are within the ideal value range, the system will output a higher value, such as 0.85.

[0120] II. Fusion scoring mechanism

[0121] Weightedly fuse the above two confidence scores to calculate a new value, called the comprehensive confidence score, which is used to uniformly measure the credibility of the recognition result. The fusion process adopts a linear weighting method, and the calculation method is as follows: First, assign a weighting ratio to the image recognition score and the process score respectively, called the "weight coefficient"; The sum of the weight of the image recognition score and the weight of the process score is equal to 1, indicating that the fusion result comes entirely from the two types of score sources; Then multiply each score by its corresponding weight and add the results to obtain the final comprehensive score.

[0122] That is: First, multiply the image recognition confidence by the image score weight to get the score of this part; then multiply the process confidence by the process score weight to get the score of this part. Then, add the above two scores to get the "comprehensive confidence score".

[0123] For example: the image confidence is 0.92, the process confidence is 0.85, the set image scoring weight is 0.7, and the process scoring weight is 0.3. Then the image scoring part is 0.92 × 0.7 = 0.644, and the process scoring part is 0.85 × 0.3 = 0.255. Adding the two together, the comprehensive confidence score is 0.899.

[0124] III. Judgment Rules and Threshold Setting

[0125] Judge the fused comprehensive confidence score, and the rules are as follows: Set a "confidence threshold" with a default value of 0.85. When the comprehensive confidence score is greater than or equal to this threshold, it means that the recognition result is credible and can be directly confirmed as the final recognition result. If it is lower than this threshold, it means that the credibility of the system judgment result is not high enough, and this recognition result will be marked as "low confidence" and requires manual review or entry into the model retraining queue.

[0126] Parameter Description and Setting Basis: The image scoring weight is generally set to 0.7, indicating that the image recognition model is the main information source. The process scoring weight is generally set to 0.3, which is used to reflect the influence of the external environment on the recognition stability. The weight ratio can be dynamically adjusted according to historical classification accuracy, model stability, etc. The confidence threshold can calculate the ROC curve through historical data and take the best compromise point between the recognition rate and the misjudgment rate, such as the F1 optimal point.

[0127] IV. Final Recognition Output

[0128] When the comprehensive confidence is greater than or equal to 0.85, the system records the following information as the final output: defect type label (such as crack, air hole, etc.), the spatial position coordinates of the defect in the image (which can be a rectangular bounding box or a polygon area), and the comprehensive confidence score for subsequent quality traceability reference.

[0129] If the comprehensive score does not meet the standard, the system does not output the final label, but marks this recognition result as "to be reviewed" and enters the manual review or algorithm re-learning module.

[0130] By performing weighted fusion calculation on the image recognition result and the process status information, the system introduces external environment awareness and effectively reduces the misjudgment rate of the model under extreme working conditions or fuzzy image conditions; the confidence scoring mechanism establishes a quantifiable verification standard for each recognition result and improves the reliability of system decision-making; this method is applicable to production links with high requirements for recognition accuracy, such as aerospace, nuclear power equipment manufacturing and other fields.

[0131] S2 also includes calculating the defect density distribution and defect spatial clustering characteristics through a statistical analysis algorithm based on the defect type and defect position coordinates, and generating a weld quality assessment database containing the weld quality assessment database of defect distribution uniformity and defect severity score by combining defect size statistics and defect type ratio.

[0132] In this embodiment, based on the identified weld defect types and positions, the system further calculates the density distribution characteristics, spatial aggregation degree, defect size statistical characteristics and defect type ratio of weld defects through statistical analysis methods, and establishes two key evaluation dimensions based on these statistical indicators: namely, defect distribution uniformity score and defect severity score, and finally forms a weld quality assessment database. This method can quantify the overall structural characteristics of welding quality, rather than only focusing on individual defects, and improve the system's perception ability and trend judgment ability of welding state stability.

[0133] I. Calculation of defect density distribution

[0134] Defect density represents the number of defects identified per unit weld length. The calculation method is as follows: First, divide the entire weld into segments at a certain interval, such as every 100 millimeters as an analysis interval; count the number of defects in each interval; calculate the density of this interval.

[0135] Defect density per segment = Number of defects in the current segment ÷ Segment length; For example: If there are 8 defects in the first segment and the segment length is 100 millimeters, the density of this segment is 0.08 defects / mm.

[0136] Parameter description: The segment length is a fixed parameter, which can be set according to the total weld length and detection accuracy, and the common value is 50 - 200mm; the number of defects comes from the statistics of the recognition module, and the system automatically counts.

[0137] II. Calculation of coefficient of variation of defect density

[0138] In order to measure whether the distribution of density is uniform, the system calculates the coefficient of variation of the density of all segments. Coefficient of variation of density = Standard deviation of the density of each segment ÷ Mean value of the density of each segment. The calculation steps are as follows: Statistically calculate the mean value of the density of all segments, calculate the square of the difference between the density of each segment and the mean value, sum and take the square root to get the standard deviation, and divide the standard deviation by the mean value of the density to get the coefficient of variation.

[0139] Parameter description: If the coefficient of variation is larger, it means that the density in some areas is much higher than that in other areas, and the defect distribution is uneven. If it is less than a certain threshold (such as 0.2), it can be considered that the distribution is relatively uniform.

[0140] III. Analysis of defect clustering characteristics

[0141] Use a clustering algorithm (such as K-means or density-based spatial clustering of applications with noise, DBSCAN) to cluster the spatial locations of defects, and the steps are as follows: Take the spatial coordinates of all defects as input, perform clustering operations to obtain multiple cluster centers, and count the number of cluster centers and the average defect density within the clusters. Parameter description: The number of clusters reflects whether there is a concentrated distribution trend of defects. The number of defects within each cluster divided by the area of the cluster represents the aggregation intensity. An aggregation determination criterion can be set. For example, if any cluster is more than twice the overall average, it is considered a serious aggregation.

[0142] IV. Defect Size Statistics

[0143] Extract the size indicators of each defect area, such as area, length, and width, and calculate the statistical indicators: Mean, maximum value, minimum value, standard deviation; count the proportion of defects with sizes greater than a preset threshold (such as a crack length exceeding 10 mm).

[0144] The threshold is set with reference to the standard welding quality evaluation indicators, such as ISO 5817. The indicators are used to evaluate whether the defect size structure deviates from the normal distribution.

[0145] V. Calculation of Defect Type Proportions

[0146] Classify and count all defects by type, such as cracks, pores, lack of fusion, slag inclusions, etc. Calculate the percentage of each type in the total number of defects. For example: crack proportion = number of cracks ÷ total number of defects × 100%.

[0147] The weights of each type can be preset according to the safety level, such as crack > lack of fusion > pore, which is used for subsequent severity scoring.

[0148] VI. Construction of Scoring Mechanism

[0149] Based on the aforementioned statistical indicators, establish two scoring indicators: Defect Distribution Uniformity Score ; =1 Coefficient of variation of density (normalized). The closer it is to 1, the more uniform it is. If there is serious clustering, it can be reduced according to the penalty term .

[0150] Defect Severity Score ; According to the proportion of high-risk types 、proportion of sizes exceeding the threshold 、maximum clustering density Construct; ; The default weights are w1 = 0.5, w2 = 0.3, w3 = 0.2.

[0151] Evaluation database construction

[0152] The above-mentioned scores, defect statistical values, image numbers, recognition times, process parameters, and position coordinates are written into the database form together to form a quality evaluation data warehouse that can be queried and retrieved. This database supports batch comparison analysis, process traceability, and quality control.

[0153] This method constructs a statistical atlas of weld defects from a macroscopic dimension, enabling the system to not only have the ability to identify single-point defects but also form an evaluation framework for the overall quality structure of the weld. The defect density and clustering information can effectively reflect the stability of the welding process; the defect size and type structure provide quantitative risk assessment indicators. This mechanism provides key data support for subsequent quality traceability, abnormal process warning, and automatic process compensation control.

[0154] S2 generates a weld quality evaluation database containing the defect distribution uniformity and defect severity score according to the edge continuity parameter and gray uniformity parameter in the high-dimensional feature vector. The specific formula is: ; ; Among them, represents the intelligent evaluation score of the defect image, represents the area term weight factor, represents the gray perturbation weight factor, represents the morphological complexity adjustment factor, represents the defect area, represents the area power exponent, represents the standard deviation of gray scale, represents the average gray value, represents the gray perturbation power exponent, represents the defect edge perturbation adjustment parameter, represents the edge discontinuity score, represents the direction angle of the k-th edge point, represents the number of edge pixel points.

[0155] Based on the foregoing defect recognition results, this embodiment further introduces a comprehensive image evaluation model for constructing a weld quality evaluation database. In this model, the system fully considers multiple key factors in the defect image: including defect area, image gray scale fluctuation degree, edge discontinuity, and edge perturbation intensity, etc. Each factor is comprehensively evaluated after being normalized by preset weight factors and adjustment factors.

[0156] First, the system takes the area of the defect region as the basic evaluation item and assigns it an area importance weight. The larger the area, the more significant the impact on the score. Secondly, the system calculates the degree of dispersion of the gray-scale change within the defect region to quantify whether the gray-scale distribution in the image is uniform, and adjusts the evaluation contribution of this part through the gray-scale anti-disturbance weight.

[0157] Then, the system further analyzes the edge structure. By calculating the degree of change in the direction between edge points, it evaluates whether there are fractures, acute-angle changes, or sudden changes, thus reflecting the structural integrity of the defect edge. At the same time, an edge disturbance factor is introduced to adjust the influence intensity of edge disturbance on the overall score. In addition, to more accurately reflect the non-linear influence of different morphological defects on the scoring curve, the system introduces a morphological complexity adjustment mechanism. Through the logarithmic function transformation of specific influencing factors, the sensitivity of the model to images with complex structures is enhanced.

[0158] Through the fusion analysis of the above multiple image dimension features, the system finally outputs a comprehensive intelligent score to represent the severity of the weld defect and the visual recognition difficulty in the image. This score is used as the core field in the quality assessment database to support quality grade classification, process anomaly alarm, and statistical analysis modeling.

[0159] In this embodiment, by constructing an intelligent evaluation model that fuses multi-dimensional image features, the comprehensive determination of the quality of weld defect images and the severity of defects is realized. This method incorporates multiple key factors such as the area of the defect region, gray-scale fluctuation characteristics, edge continuity, and disturbance degree into a unified scoring system, and enhances the response ability of the model to complex morphological defects through weight adjustment and non-linear functions. Compared with traditional methods that only rely on geometric parameters or gray-scale thresholds, this scoring model has stronger evaluation comprehensiveness and flexibility, and can adapt to the differences in defect manifestations under various welding process conditions. The comprehensive scoring result is output in the form of a standardized value, which can be directly used as the core index of the weld quality assessment database to support application scenarios such as welding quality grading, trend analysis, and anomaly tracing, and further provide a quantitative basis for subsequent process parameter adjustment, quality control decision-making, and automation optimization, thereby significantly improving the accuracy, stability, and intelligent level of welding quality recognition.

[0160] The specific calculation formula is: ; Where, represents the area item weight factor, represents the area of the defect region, represents the major axis length of the minimum circumscribed ellipse of the defect region.

[0161] In this embodiment, an improved calculation model for the area-term weight factor is introduced to accurately measure the weight contribution of each defect area in the weld image to the overall quality evaluation. This model comprehensively considers the absolute area size of the defect and its shape structure characteristics, constructs a scoring factor that couples area significance and geometric distribution, enabling the system to not only focus on the "size" of the defect but also be sensitive to its "shape structure".

[0162] The specific calculation process is as follows: First, based on the defect segmentation results provided by the image recognition module, the system extracts the area information of each defect area. The area is defined as the total number of pixels enclosed by the defect contour and is converted into physical units (such as square millimeters) to reflect the spatial proportion of this area in the image.

[0163] Next, the system calculates the major axis length of the minimum circumscribed ellipse corresponding to the defect contour. This value represents the maximum extension direction of the optimal fitting structure of the defect in space and is a key shape index for measuring the "elongation degree" or "structural tendency" of the defect. If the defect is in a regular circular or quasi-equiaxial shape, this value is smaller; if the defect is in a long strip or crack shape, this value is larger.

[0164] Then, the system jointly processes the area value and the major axis length of the circumscribed ellipse to establish a combined factor dominated by area and corrected by shape. This combined factor is used to describe the potential impact degree of this defect on the overall weld visual quality and process risk. To enhance the stability and adaptability of the model, the system introduces logarithmic scaling and a double non-linear mapping function to the combined factor, aiming to prevent the "over-pulling" or "being ignored" of extremely large or small defect areas on the final scoring result while maintaining the evaluation discrimination. Especially when the area of a certain defect is much larger than the average level, the system will avoid the infinite inflation of its score through a non-linear suppression mechanism; for defects with a small area in the edge region but obvious abnormal morphology, they can also obtain a reasonable evaluation proportion under the correction of the major axis.

[0165] In addition, this area-term weight factor is designed to dynamically participate in the fusion evaluation of multiple quality indicators, including defect severity scoring, defect distribution weight adjustment, etc., and is one of the key input variables in the entire weld quality assessment system.

[0166] In summary, through the coupled modeling of area and shape and the non-linear compression transformation of parameters, this model enables the area scoring to not only have a physical scale basis but also reflect the ability to adjust structural complexity, thereby enhancing the adaptability and controllability of the scoring model under various defect modes, weld structures, and image resolution changes, providing a repeatable, adjustable, and calibratable quantitative basis for intelligent defect assessment.

[0167] In this embodiment, by constructing an area term weight factor model that fuses the defect area and shape features, the response ability of the image score to the spatial scale of weld defects is effectively improved. Compared with the traditional linear area weighting method, this solution introduces an adjustment mechanism related to the shape structure, enabling the score to not only reflect the absolute size of the defect but also the comprehensive impact of its geometric features on visual prominence. At the same time, through non-linear processing means, the adverse interference of extremely large area defects on the scoring model is effectively suppressed, enhancing the scoring stability. This method makes the defect score more sensitive, hierarchical, and practically meaningful, capable of adapting to the recognition requirements under various size structure combinations, and providing more accurate, reliable, and reasonable area features for the weld quality evaluation system.

[0168] The specific calculation formula is as follows: ; where, represents the gray-scale perturbation weight factor, represents the standard deviation of the local gray-scale change within the defect area, represents the average gradient direction offset; The = 1 - - ; where, represents the morphological complexity adjustment factor.

[0169] This embodiment proposes a method for calculating the weight factor used to adjust the influence of image gray-scale perturbation, aiming to enhance the quantification ability of the complexity of gray-scale changes during the defect image scoring process. Specifically, this method comprehensively considers two key factors: one is the amplitude of local gray-scale changes within the defect area, and the other is the offset trend of the horizontal gray-scale in the image. The local gray-scale change is calculated by statistically analyzing the standard deviation of the pixel gray-scale values in this area, reflecting whether the internal gray-scale of the image is stable. The lower the stability, the greater the image interference. The horizontal gray-scale offset trend reflects the structural offset degree of the defect along the weld direction, helping to identify abnormal gray-scale changes caused by uneven illumination, reflection, or weld skew. The system performs non-linear fusion processing on these two factors to obtain a gray-scale perturbation weight factor used to adjust the degree of influence of image stability. The larger this factor, the lower the score of the image in the gray-scale perturbation dimension should be. Subsequently, to ensure the controllability and normalization of the overall score factor, the system also constructs a morphological complexity adjustment factor, which is calculated by subtracting the sum of the area and gray-scale perturbation contribution factors from the overall score upper limit, used to dynamically balance the influence of the structural form on the score, ensuring that the sum of the weights of each factor remains consistent and guaranteeing the convergence and stability of the scoring system.

[0170] In this embodiment, by constructing a weight factor model that comprehensively considers the amplitude of local gray-scale perturbation and the trend of lateral gray-scale offset, the scoring accuracy and stability of defect images under complex gray-scale conditions are effectively enhanced. Compared with the traditional single gray-scale threshold judgment method, this method can carefully identify the gray-scale distribution fluctuations in the image caused by surface reflection, molten pool residue, or weld bending, etc., and reasonably control the scoring result through a non-linear fusion mechanism, thereby avoiding the risk of over-high or under-low scoring due to interference. At the same time, by introducing a morphological complexity adjustment mechanism, the weight distribution of the system scoring becomes elastic and self-adaptive, which helps to maintain the consistency and comparability of scoring results in various welding environments, providing more robust and engineering practical parameter adjustment support for the weld quality assessment system.

[0171] Although the embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that various changes, modifications, substitutions, and variations can be made to these embodiments without departing from the principles and spirit of the present invention, and the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for identifying mechanical welding seam defects, characterized in that The method includes the following steps: S1. Collect the image data of the weld surface to obtain a standardized image dataset, perform feature extraction on the standardized image dataset, extract the edge contour, texture distribution, and gray-scale change features of the defects, and generate a high-dimensional feature vector containing the spatial position coordinates and morphological features of the defects; S2. Generate a weld quality assessment database containing the defect distribution uniformity and defect severity score according to the edge continuity parameter and gray-scale uniformity parameter in the high-dimensional feature vector; S3. Adopt an online learning algorithm, and dynamically adjust the weight update frequency of the multi-scale convolutional neural network and the kernel function selection of the support vector machine according to the newly added defect sample data and the defect trend analysis result, optimize the feature weight distribution and kernel parameters, and generate the updated defect recognition model parameters; S4. Through the model convergence evaluation algorithm, calculate the loss function value of the updated defect recognition model, combine the incremental sample annotation result, judge whether the model classification accuracy meets the preset threshold, and determine the optimized intelligent recognition system configuration parameters.

2. The method for identifying mechanical welding seam defects according to claim 1, wherein: In the above S1, collecting the image data of the weld surface to obtain a standardized image dataset includes collecting the image data of the weld surface in the visible light, infrared, and ultraviolet bands through a multi-spectral imaging device, screening the collected images by using the image sharpness threshold and the noise level threshold, and removing the blurred or overly noisy images to obtain a standardized image dataset.

3. The method for identifying mechanical welding seam defects according to claim 1, wherein: The above S1 also includes performing feature extraction on the standardized image dataset by using a multi-scale convolutional neural network, setting the convolutional kernel sizes of 3x3, 5x5, and 7x7, and extracting the edge contour, texture distribution, and gray-scale change features of the defects.

4. A method for identifying mechanical welding seam defects according to claim 1, characterized in that: The above S2 includes performing defect type recognition by using the support vector machine classification algorithm according to the edge continuity parameter and gray-scale uniformity parameter in the high-dimensional feature vector. If the edge continuity parameter is greater than 0.8, it is judged as a crack defect; if the gray-scale uniformity parameter is less than 0.6, it is judged as a pore defect to obtain a preliminary defect classification result.

5. A method for identifying mechanical welding seam defects according to claim 4, characterized in that: The above S2 also includes dynamically adjusting the weight coefficient and discrimination threshold of the support vector machine classification algorithm according to the current intensity, welding speed, and shielding gas flow parameters of the welding process, and integrating the process parameter information through a weighted fusion algorithm to generate an optimized defect classification result adapted to the current process conditions.

6. The method for identifying mechanical welding seam defects according to claim 5, wherein: The above S2 also includes adopting a multi-sensor data fusion technology, integrating the optimized defect classification result and the process parameter information through a weighted fusion algorithm, calculating the comprehensive confidence score, and if the comprehensive confidence score is greater than 0.85, confirming the final recognition result of the defect type and the defect position coordinates.

7. A method for identifying mechanical welding seam defects according to claim 6, characterized in that: The above S2 also includes calculating the defect density distribution and defect spatial clustering features according to the defect type and defect position coordinates through a statistical analysis algorithm, and combining the defect size statistics and defect type ratio to generate a weld quality assessment database containing the defect distribution uniformity and defect severity score.

8. A method for identifying mechanical welding seam defects according to claim 1, characterized in that: The specific formula for the above S2 to generate a weld quality assessment database containing the defect distribution uniformity and defect severity score according to the edge continuity parameter and gray-scale uniformity parameter in the high-dimensional feature vector is: ; ; Among them, represents the intelligent evaluation score of the defect image, represents the area term weight factor, represents the gray-scale perturbation weight factor, represents the morphological complexity adjustment factor, represents the area of the defect region, represents the area power exponent, represents the standard deviation of gray scale, represents the average value of gray scale, represents the gray-scale perturbation power exponent, represents the defect edge perturbation adjustment parameter, represents the edge discontinuity score, represents the direction angle of the k-th edge point, represents the number of edge pixel points.

9. A method for identifying mechanical welding seam defects according to claim 8, characterized in that: The Specific calculation formula is: ; Among them, represents the area term weight factor, represents the area of the defect region, represents the major axis length of the minimum circumscribed ellipse of the defect region.

10. A method for identifying mechanical welding seam defects according to claim 8, characterized in that: The said The specific calculation formula is as follows: ; Among them, represents the grayscale perturbation weight factor, represents the standard deviation of local grayscale change within the defect area, represents the average gradient direction offset; The said = 1 - - ; Among them, represents the morphological complexity adjustment factor.

Citation Information

Patent Citations

  • Welding seam tracking method and device based on independent deviation correction type deep learning

    CN112589232A

  • Weld joint surface defect detection method and equipment based on machine vision and medium

    CN114693610A

  • Weld joint morphology and surface defect online detection and evaluation method and system

    CN118602979A

  • Weld joint positioning and defect detection system and method based on deep learning

    CN119417800A

  • PCB production line defect detection system and method based on image processing

    CN119831966A

Cited By

  • Casting surface treatment defect detection and quality evaluation method and system

    CN120672224A

  • Image recognition-based automatic detection method for insufficient solder of solder joints of graphics card

    CN120765657A

  • An image recognition-based automatic detection method for virtual soldering of GPU solder joints

    CN120765657B

  • Cold welding defect detection method and system based on multi-source data fusion

    CN120805073A

  • Cold welding defect detection method and system based on multi-source data fusion

    CN120805073B