Visual image-based welding seam defect detection method
By integrating multi-sensor and multi-modal fusion algorithm, the problems of missing detection dimensions and poor adaptability in dynamic environments in weld detection are solved, and high-precision and interference-proof weld defect detection are achieved, and continuous optimization capabilities are achieved.
Patent Information
- Application Number
- CN202510533810.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-04-27
AI Technical Summary
The existing weld detection technology has problems such as missing detection dimensions, single modes, poor adaptability to dynamic environments, low detection accuracy and model iteration lag, and cannot effectively integrate the mapping relationship between physical defects and thermodynamic anomalies. In addition, the combination of traditional light sources and filters cannot dynamically adjust the light field distribution, resulting in poor detection stability.
A high-resolution industrial camera, ring LED light source and polarization filter are combined to integrate laser displacement sensors and infrared thermal imagers to synchronize the two-dimensional images, three-dimensional morphology and thermal distribution data of the welds, generate defect indexes through multimodal fusion algorithms, and optimize models through active learning and incremental training to form a closed-loop detection system.
It realizes high accuracy, interference prevention and robustness of weld defect detection, can achieve stable imaging under complex working conditions, and optimizes detection thresholds and feature weights through real-time data, continuously improving detection accuracy and efficiency.
Smart Images

Figure CN120352432A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of welding quality inspection, and specifically discloses a welding seam defect detection method based on visual images. Background Technique
[0002] Weld inspection is widely used in various fields. As the core area of metal connection, internal or surface defects in the weld seam will become stress concentration points, leading to fractures during stress application of the structure and causing catastrophic accidents.
[0003] Currently, the weld inspection technologies widely used in the industrial field mainly include traditional non-destructive inspection methods such as ray inspection, ultrasonic inspection, and magnetic particle inspection. Ray inspection can identify internal defects such as pores and slag inclusions through ray imaging. Magnetic particle inspection has high sensitivity to surface cracks by manually spraying magnetic powder and visual interpretation, and can detect micron-level defects, but there are bottlenecks such as low detection efficiency, complex operation, and limited applicability; modern intelligent technologies collect surface images through machine vision systems and combine deep learning models to achieve defect segmentation and classification, with significantly improved detection accuracy, but there are still limitations such as single modality, poor adaptability to dynamic environments, flat data processing, and lagging model iteration, specifically as follows: Traditional inspection systems mostly rely on a single sensor, resulting in a lack of defect detection dimensions, and there is no effective joint analysis framework for heterogeneous data, and it is impossible to establish a mapping relationship between physical defects and thermodynamic anomalies through feature-level fusion; Conventional industrial vision systems are easily interfered by specular reflection in metal surface inspection, and rely on complex post-processing algorithms to compensate for imaging defects. Moreover, the combination of traditional light sources and filters cannot dynamically adjust the light field distribution according to the surface material, and it is difficult to stably image under complex working conditions; Traditional methods mostly adopt single-stage feature extraction, lack hierarchical derivation from basic features to quantitative indicators, and decision-level fusion often relies on fixed rules without introducing an attention mechanism to dynamically adjust the contribution degrees of multiple modalities; Traditional inspection systems rely on offline training models, cannot optimize detection thresholds and feature weights through real-time data, do not set a system-level deviation evaluation layer, and it is difficult to automatically correct fusion errors when there is redundancy or conflict in multi-modal data, reducing the reliability of defect indices.
[0004] Therefore, a welding seam defect detection method with high precision, anti-interference, high robustness, and continuous optimization is needed to break through the bottlenecks of existing technologies. Summary of the Invention
[0005] In view of this, the present invention proposes a method for detecting welding seam defects based on visual images. By collecting the surface images of the welding seam without specular reflection interference, three-dimensional topography and thermal distribution data, followed by preprocessing, and then obtaining the defect index through multimodal fusion for analysis and determination of the defect type and confidence level. Finally, the detection data is uploaded to the management platform in real time, and the model is continuously optimized by combining active learning and incremental training to form a "collection - analysis - optimization" closed loop, realizing the dynamic improvement of detection accuracy and efficiency.
[0006] The object of the present invention can be achieved by the following technical solutions: A method for detecting welding seam defects based on visual images, characterized in that it specifically includes the following steps: S1. Image acquisition: Use a high-resolution industrial camera in combination with an annular LED light source and a polarization filter to eliminate the specular reflection interference on the metal surface and collect the visible light image of the welding seam surface; and add an integrated laser displacement sensor and an infrared thermal imager to the industrial camera to synchronously obtain the three-dimensional topography and thermal distribution data of the welding seam. S2. Image preprocessing: Perform primary processing on the collected welding seam surface image to obtain crack feature data and pore feature data on the welding seam surface, perform primary processing on the thermal distribution data to obtain temperature feature data, and perform primary processing on the three-dimensional topography to obtain three-dimensional feature data of the defect area. S3. Data analysis: Perform secondary processing on the crack feature data and pore feature data to obtain a crack coefficient and a pore coefficient, and generate a comprehensive defect score through the two types of defects to obtain a welding quality index; perform secondary processing on the temperature feature data to obtain the maximum temperature difference between the defect area and the base material and the average temperature gradient; perform secondary processing on the three-dimensional feature data to obtain the defect depth, surface roughness, and fractal dimension. S4. Data output: Perform multimodal fusion on the geometric features, thermal distribution features, and three-dimensional topography features obtained through secondary processing to obtain a defect index. S5. Defect classification and decision-making: Analyze the fused defect index, output the defect category and confidence score, and trigger the manual review process when the confidence level is less than X. S6. System closed-loop optimization: Transmit the detection results to the management platform in real time, and continuously optimize the model performance through algorithms.
[0007] Combining all the above technical solutions, the positive effects of the present invention are as follows: 1. The present invention integrates visible light imaging, laser three-dimensional scanning, and infrared thermal imaging technologies to synchronously collect two-dimensional images, three-dimensional topography, and thermal distribution data of metal welding seams, realizing multi-dimensional joint analysis of physical defects and thermodynamic characteristics, and greatly improving the comprehensiveness of detection parameters.
[0008] 2. The present invention adopts a combination scheme of a polarization filter and an annular LED light source to effectively eliminate the interference of specular reflection on the metal surface, and cooperates with a high-resolution industrial camera to realize the visualization of micron-level surface defects, improving the detection accuracy of traditional industrial vision.
[0009] 3. The primary processing of the present invention extracts basic feature data, the secondary processing generates quantifiable defect coefficient indicators, and finally a comprehensive defect index is generated through a multi-modal fusion algorithm, constructing a hierarchical and intelligent analysis and decision-making chain.
[0010] 4. Through the real-time interaction between the detection results and the algorithm model, the present invention establishes a self-evolution mechanism of "data acquisition - analysis and decision-making - model iteration". The system can continuously optimize the detection threshold and feature weight parameters according to the actual working conditions of the production line, maintaining the continuous improvement of detection sensitivity. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0012] Attached Figure 1 is the step diagram of the present invention.
[0013] Attached Figure 2 is the step diagram of image acquisition. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0014] The following will clearly and completely describe the technical solutions of the present invention in combination with the embodiments. 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 belong to the scope of protection of the present invention.
[0015] See Figure 1 As shown, the present invention proposes a method for detecting welding seam defects based on visual images.
[0016] The specific implementation steps of the present invention include the following steps: S1. Image acquisition: Use a high-resolution industrial camera in cooperation with an annular LED light source and a polarization filter to eliminate the reflection interference on the metal surface and collect visible light images of the weld seam surface; and an integrated laser displacement sensor and an infrared thermal imager are added to the industrial camera to synchronously obtain the three-dimensional morphology and thermal distribution data of the weld seam. S2. Image preprocessing: The collected weld surface images are processed once to obtain crack feature data and porosity feature data on the weld surface. The thermal distribution data is processed once to obtain temperature feature data, and the three-dimensional topography is processed once to obtain three-dimensional feature data of the defect area. S3. Data analysis: The crack feature data and porosity feature data are processed twice to obtain crack coefficients and porosity coefficients, and a comprehensive defect score is generated from the two types of defects to obtain a welding quality index. The temperature feature data is processed twice to obtain the maximum temperature difference between the defect area and the base material and the average temperature gradient. The three-dimensional feature data is processed twice to obtain defect depth, surface roughness, and fractal dimension. S4. Data output: The geometric features, thermal distribution features, and three-dimensional topography features obtained from the second processing are multi-modally fused to obtain a defect index. S5. Defect classification and decision-making: The fused defect index is analyzed to output the defect category and confidence score. When the confidence is less than X, an artificial review process is triggered. S6. System closed-loop optimization: The detection results are transmitted to the management platform in real time, and the model performance is continuously optimized through algorithms.
[0017] Specifically, the image acquisition steps are as Figure 2 shown, specifically: A1. Use a 3D line laser profiler to scan the workpiece, identify the weld position and geometry, and generate a detection path plan. A2. Set the detection area range and adjust the laser power, camera exposure time, and gain parameters according to the material. A3. Configure an annular LED array light source and a polarization filter on the industrial camera to dynamically adjust the illumination angle. A4. Use industrial cameras, laser scanners, and thermal imagers to cover the entire weld trajectory and synchronously collect visible light images, three-dimensional topography, and thermal distribution data.
[0018] Among them, the industrial camera is equipped with a telecentric lens or a fixed-focus lens to reduce distortion and adapt to clear imaging of different weld sizes. The equipment controls the detection head to move along the weld trajectory through a multi-axis servo system or a robotic arm, maintaining a constant distance, and supporting straight, curved, or circular welds.
[0019] After obtaining the visible light image, grayscale conversion and median filtering are used for denoising. The contrast is enhanced and uneven illumination is eliminated through algorithms.
[0020] Specifically, the grayscale conversion process is as follows: Weighted average grayscale conversion: The YUV / RGB channel weighting method is adopted to preferentially retain the information of the green channel with high human eye sensitivity and reduce color interference. The effect is to reduce the data dimension to a single channel and reduce memory occupancy.
[0021] Among them, noise suppression is specifically as follows: Adaptive median filtering: Based on a local window such as 5×5 pixels, the filtering intensity is dynamically adjusted to suppress salt-and-pepper noise and Gaussian noise. First, the pixel extreme values within the window are detected. For example, if they exceed a specific range, they are determined as noise points, and then the noise points are replaced with the median value of the neighborhood while retaining the edge sharpness. It is recommended that the number of iterations ≤ 2 times to avoid detail loss caused by excessive smoothing.
[0022] Among them, contrast enhancement is specifically as follows: First, apply contrast-limited adaptive histogram equalization: The image is processed in blocks, such as 64×64 pixel blocks. Histogram equalization is performed on each sub-region, and the local contrast enhancement amplitude is limited by a clipping threshold. Then, gamma correction is used to adjust the non-linear mapping of the gray values to enhance the details in the dark areas. Its advantage is to eliminate global illumination unevenness, such as shadow areas, while avoiding noise amplification.
[0023] Eliminating illumination unevenness is specifically as follows: Perform illumination compensation using homomorphic filtering: The illumination component and the reflection component are processed through frequency domain decomposition. First, logarithmic transformation is used to separate the low-frequency illumination component and the high-frequency reflection component of the object. Then, a high-pass filter is designed to suppress low-frequency illumination interference, which is generally applicable to metal surface reflection or non-uniform illumination environments, such as industrial flaw detection scenarios.
[0024] For visible light image defect area segmentation, pixel-level defect segmentation should be performed first, and then a binary mask is output to mark the suspected defect area.
[0025] Among them, pixel-level defect segmentation includes a traditional image processing layer and a deep learning layer.
[0026] Among them, the traditional image processing layer is specifically as follows: Perform initial threshold segmentation based on an improved algorithm, dynamically adjust the local threshold range, and adapt to uneven bright and dark areas on the metal surface; Combine edge detection and region growing algorithms, use high-gradient regions as seed points, and fill the connected region contours according to gray similarity.
[0027] Among them, the deep learning layer is specifically as follows: Adopt the U-Net architecture to construct an encoder-decoder structure, and fuse shallow texture features and deep semantic features through skip connections to enhance the recognition ability of small defects such as microcracks and pores; Integrate multi-scale residual modules to extract context information of defects of different sizes and improve segmentation accuracy.
[0028] Among them, the output binary mask label includes binary processing and morphological post-processing.
[0029] Among them, the binary processing is specifically as follows: map the segmentation result to a binary image of 0 and 255, and store it in the 8-bit single-channel PNG format, where 0 represents the background area and 255 represents the defect area.
[0030] Among them, the morphological post-processing is specifically as follows: cascade opening operation and closing operation, and the kernel size is set according to the minimum physical size of the defect; based on connected region analysis, filter out noise with pixels smaller than a certain value and linear artifacts with abnormal aspect ratios. Among them, the opening operation represents removing noise, and the closing operation represents filling holes.
[0031] It should be specifically noted that the operations of the data preprocessing are as follows: Process the collected weld surface images once to obtain crack feature data and pore feature data on the weld surface. Among them, the crack-like defect features are distributed in slender strips, and the edges are irregular serrated; the pore-like defect features are circular or elliptical isolated regions, with smooth surfaces and no texture. The crack data extracts crack length, width, and quantity data, and the pore data extracts pore area, quantity, and density data.
[0032] The specific operation of obtaining crack feature data from the crack data through one-time processing is as follows: Obtain all crack lengths through visible light image processing, record them as a data set , and record the maximum value as , and take the median value as the middle value after sorting in ascending order and record it as , calculate the arithmetic mean , where t is the number of cracks, is any crack length.
[0033] And divide the obtained crack lengths into grades: Grade I: crack length ≤ x mm, regarded as a minor defect, and the weight coefficient is , where the value of x is between 1.2 - 1.5, and the value of is between 0.1 - 0.15; Grade II: x mm < crack length ≤ y mm, regarded as a medium defect, and the weight coefficient is , where the value of y is between 2.5 - 3, and the value of is between 0.25 - 0.3; Grade III: y mm < crack length ≤ z mm, regarded as a relatively serious defect, and the weight coefficient is , where the value of z is between 4.5 and 5, The value of is between 0.45-5; Grade IV: Crack length>g mm, considered a serious defect, weight coefficient is ,in The value of is between 0.1-0.15; The weight distribution logic is: Level III has the highest weight: medium-length cracks have a significant impact on structural safety and have a high priority for repair; Level IV has a low weight: Extra-long cracks may be directly judged as unqualified and need to be handled separately.
[0034] Count the number of cracks by grade: Level Ⅰ quantity , number of level II , number of level III , Level IV quantity ; Calculate the average length of each level: (k=1,2,3,4); Then calculate the weighted average: ; in Corresponding weights for each level; Comprehensive final average: Combine statistics with weighted average to design comprehensive weights ; Among them, the value of b is between 0.45-0.5, which is the main factor, the value of c is between 0.2-0.25, and the values of d and e are between 0.1-0.15.
[0035] The width is processed in the same manner as the length and is recorded as w, which will not be described in detail in this embodiment.
[0036] The specific operation of obtaining the stomatal characteristic data through one-time processing is as follows: Through visible light image processing, all pore areas are obtained and invalid data is identified: pores with areas exceeding the physical range, such as <0 or > the maximum theoretical value, are eliminated and recorded as a data set: ; The maximum value is recorded as , and calculate the average , where n is the number of pores, For any pore area, data points outside the range of ±3 times the standard deviation of the mean are eliminated to reduce the impact of random errors.
[0037] Set a threshold T, and extract all stomatal areas that meet the condition from the total dataset to obtain a subset S = { > T}, with a total of m, and calculate the average area: | > T}, a total of m, and calculate the average area: ; Similarly, calculate the average value of non-exceeding stomata , with the number being n - m, which will not be specifically described in this embodiment.
[0038] Among them, the proportion of the number of stomata exceeding the threshold is directly used as the weight and denoted as , and calculate the weighted average value: ; Perform a primary processing on the heat distribution data to obtain temperature characteristic data, including heat input power, thermal resistance ratio, material thermal sensitivity coefficient, etc.
[0039] Perform a primary processing on the three-dimensional topography data to obtain three-dimensional characteristic data of the defect area, including the three-dimensional coordinate point set of the defect area, etc.
[0040] Subsequently, perform data analysis, specifically as follows: Perform a secondary processing on the crack characteristic data and the stomatal characteristic data to obtain a crack coefficient and a stomatal coefficient, and generate a comprehensive defect score through the two types of defects to obtain a welding quality index; perform a secondary processing on the temperature characteristic data to obtain the maximum temperature difference and the average temperature gradient between the defect area and the base material; perform a secondary processing on the three-dimensional characteristic data to obtain the defect depth, surface roughness, and fractal dimension.
[0041] The process of performing a secondary processing on the crack characteristic data and the stomatal characteristic data to obtain a crack coefficient and a stomatal coefficient, and generating a comprehensive defect score through the two types of defects to obtain a welding quality index is as follows: Among them, the crack coefficient is specifically: ; Among them is the length normalization operation, is the maximum allowable crack length.
[0042] is the width normalization operation, is the maximum allowable crack width.
[0043] is the quantity normalization operation, is the maximum allowable crack quantity.
[0044] Among them is the weight coefficient, and the exponential weight is dynamically adjusted through machine learning to match different materials.
[0045] Porosity coefficient: ; is the maximum area normalization operation, is the maximum pore area in the sample, where is the critical value of the maximum allowable pore area.
[0046] Weighted average area normalization operation, is the critical value of the allowable average area.
[0047] is the density normalization operation, where r is the pore density, that is, the total pore area / area of the region, that is , , and T is the area of the detection region.
[0048] where is the weight coefficient, and in practical applications, the critical value and weight parameters need to be calibrated according to material standards and process requirements.
[0049] Comprehensive defect score: S = u·(C + P + v·C·P); C + P is the linear superposition term, representing the cumulative effect of independent defects; v·C·P is the non-linear coupling term, representing the synergistic exacerbation of crack and pore on quality deterioration, and v needs to be experimentally calibrated; u is used to adjust the total score range.
[0050] Welding quality index ; k is the slope adjustment coefficient.
[0051] When , , high quality, can be exempted from inspection; When , , qualified, for normal use; When , , warning, process optimization; When , , failure, prohibited from being put into use.
[0052] where the value of is between 20 - 30, the value of is between 50 - 60, the value of is between 80 - 90; The value is between 80 and 90, The value is between 60 and 70, The value is between 40 and 50.
[0053] The secondary processing of the temperature characteristic data to obtain the maximum temperature difference and the average temperature gradient between the defect area and the base material is as follows: Among them, the maximum temperature difference is specifically: the product of the welding heat input power and the thermal resistance ratio divided by the defect projection area and then multiplied by the material thermal sensitivity coefficient.
[0054] Among them, the welding heat input power is calculated through welding process parameters, such as current / voltage; the thermal resistance ratio is determined by the difference in thermal conductivity between the base material and the defect area; the defect projection area is obtained through three-dimensional topography measurement or radiographic film analysis; the material thermal sensitivity coefficient is calibrated through X80 pipeline steel welding tests.
[0055] Among them, the average temperature gradient is specifically: the maximum temperature difference divided by the effective action length of the defect and then multiplied by the geometric correction coefficient.
[0056] Among them, the effective action length of the defect, such as the crack length or the pore diameter, is measured based on geometric features; the geometric correction coefficient is fitted through the measured data of the thermal imager.
[0057] The secondary processing of the three-dimensional characteristic data to obtain the defect depth, surface roughness, and fractal dimension is as follows: Among them, the defect depth is specifically: the maximum vertical dimension of the defect minus the minimum vertical dimension.
[0058] It should be explained that the three-dimensional coordinate point set of the defect area is obtained through three-dimensional laser scanning, and the vertical coordinate value of the defect area represents the vertical dimension of the defect.
[0059] The surface roughness parameter is specifically: Sum the absolute values of subtracting the average vertical dimension from the vertical dimension of any defect, and then divide by the total number of defects.
[0060] Among them, the surface roughness parameter represents the average roughness, which is calculated based on the height deviation statistics and quantifies the microscopic irregularities of volumetric defects such as slag inclusions and pores.
[0061] And the fractal dimension is introduced to describe its surface irregularity, and the specific formula is; ; Among them is the number of grids containing at least one defect pixel at each scale, is the grid side length, and the dimension value is determined through the logarithmic relationship between the scaling ratio and the number of covering units.
[0062] The geometric features, thermal distribution features, and three-dimensional topography features obtained from secondary processing are subjected to multi-modal fusion to obtain a defect index. The specific formula is as follows: The sum of each parameter multiplied by its weight is divided by the sum of the weights. The weights are dynamically allocated according to the feature importance.
[0063] It should be specifically noted that the internal welding defects mainly include: cracks, pores, slag inclusions, incomplete penetration, and lack of fusion.
[0064] The determination of the crack defect is specifically as follows: Cracks cause a sudden change in geometric depth and a local high thermal gradient due to the heat conduction blocking effect. Its weight is mainly distributed in the defect depth, maximum temperature difference, and average temperature gradient.
[0065] The determination of the pore defect is specifically as follows: The gas inside the pores has a low thermal conductivity, showing a high-temperature area but a gentle gradient, and the three-dimensional topography is highly complex. Its weight is mainly distributed in the maximum temperature difference and the average temperature gradient.
[0066] The determination of the slag inclusion defect is specifically as follows: Slag inclusions cause abnormal surface roughness but have little impact on the thermal distribution. Its weight is mainly distributed in the surface roughness.
[0067] The determination of the incomplete penetration defect is specifically as follows: Incomplete penetration shows a large depth but a gentle curvature and a medium thermal gradient. Due to partial fusion, it causes local thermal resistance. Its weight is mainly distributed in the defect depth.
[0068] The determination of the lack of fusion is specifically as follows: Lack of fusion shows local low temperature, uneven thermal gradient distribution, and microscopic unevenness at the lack of fusion interface. Its weight is mainly distributed in the average temperature gradient and the surface roughness.
[0069] After determining the defect category, calculate the corresponding confidence score of the defect and output it.
[0070] It should be specifically noted that the confidence score is used to quantify the credibility of the model's determination of the defect category, and its design needs to meet the following requirements: Normalized output: Map the feature parameters with different dimensions to the interval [0, 1]; Physical interpretability: The score should directly reflect the significance of the defect features; Dynamic adaptability: Automatically adjust the sensitivity according to the detection environment, such as the material type and welding process.
[0071] The specific formula for the crack confidence is as follows: The maximum temperature difference is divided by the calibration threshold of the thermal imager in the weld and then multiplied by a coefficient; among them, the maximum temperature difference reflects the heat conduction blocking effect caused by cracks, and the calibration threshold of the thermal imager in the steel weld corresponds to the saturation value of the crack feature; the coefficient is reserved in the range of 0.9 - 0.95 to avoid overfitting noise data.
[0072] The pore confidence formula is specifically as follows: (the maximum fractal dimension of the pore group minus the fractal dimension) divided by the statistical standard deviation and then multiplied by a coefficient. The fractal dimension represents the complexity of the three-dimensional morphology of the pore group. The difference between the maximum fractal dimension and the fractal dimension represents the degree of deviation of the pore characteristics from the standard value. The coefficient ranges from 0.8 to 0.9 to reduce the decision-making weight of the single feature of the fractal dimension and compensate for measurement errors.
[0073] The slag inclusion confidence formula is specifically as follows: (the lower limit of severe slag inclusion minus the surface roughness) divided by the difference between the upper and lower limits of slag inclusion and then multiplied by a coefficient. The upper and lower limits of slag inclusion are mapped to 1 - 0, intuitively reflecting the degree of roughness exceeding the standard. Since the determination of slag inclusion requires verification in combination with the heat distribution, the coefficient is set between 0.8 and 0.85 to reduce the single weight.
[0074] The incomplete penetration confidence formula is specifically as follows: the defect depth divided by the maximum value of the defect depth and then multiplied by a coefficient. The depth of incomplete penetration needs to avoid confusion with cracks and is usually greater than the maximum value of the crack depth. The maximum value of the defect depth is set according to the allowable limit of incomplete penetration in the standard. The coefficient ranges from 0.7 to 0.8 to reduce the independent influence of the depth feature.
[0075] The lack of fusion confidence formula is specifically as follows: (the ratio of the melt depth deviation to the maximum allowable melt depth plus the ratio of the highest proportion of the low-temperature area to the proportion of the low-temperature area) and then multiplied by a coefficient. When the melt depth deviation exceeds the maximum allowable melt depth, it is determined as severe lack of fusion; if the proportion of the low-temperature area is too low, it may be normal heat diffusion, and if it is too high, it may be other defects. The coefficient ranges from 0.6 to 0.65 for implicit correction of the roughness of the fusion surface.
[0076] Among them, the melt depth deviation is the difference between the actual melt depth and the theoretical value, reflecting the degree of lack of fusion of the groove; the proportion of the low-temperature area is the area ratio of the low-temperature area caused by the hindrance of heat conduction in the lack of fusion area.
[0077] The above confidence score threshold is between 8.5 and 9. When it is lower than the threshold, the human-machine collaborative review interface is triggered.
[0078] It should be specifically noted that the closed-loop optimization of the system includes manual review and annotation and model dynamic upgrade.
[0079] Among them, the manual review and annotation is specifically that the system automatically screens the low-confidence segmentation results, pushes them to the quality inspector for manual review, and the corrected and annotated data is stored in the training library for model iteration.
[0080] Among them, the model dynamic upgrade is specifically that when the newly added annotated data accumulates to the set threshold or the detection accuracy rate drops, the model retraining is triggered, and the updated model is automatically deployed to the production line equipment to continuously improve the segmentation accuracy.
Claims
1. A method for detecting welding seam defects based on visual images, characterized in that, The specific steps include: S1. Image acquisition: Use a high-resolution industrial camera with a ring-shaped LED light source and a polarizing filter to eliminate the interference of metal surface reflections and collect visible light images of the weld surface; and add an integrated laser displacement sensor and infrared thermal imager to the industrial camera to synchronously obtain the three-dimensional morphology and thermal distribution data of the weld; S2, image preprocessing: the collected weld surface image is processed once to obtain crack characteristic data and pore characteristic data of the weld surface, the heat distribution data is processed once to obtain temperature characteristic data, and the three-dimensional morphology is processed once to obtain three-dimensional characteristic data of the defect area; S3, data analysis: the crack characteristic data and the pore characteristic data are processed for secondary processing to obtain the crack coefficient and the pore coefficient, and the welding quality index is obtained by generating a comprehensive defect score through the two defects; the temperature characteristic data is processed for secondary processing to obtain the maximum temperature difference between the defect area and the base material and the mean temperature gradient; the three-dimensional characteristic data is processed for secondary processing to obtain the defect depth, surface roughness and fractal dimension; S4, data output: multi-modal fusion of geometric features, thermal distribution features and three-dimensional morphological features obtained by secondary processing to obtain defect index; S5. Defect classification and decision-making: Analyze the fused defect index, output the defect category and confidence score, and trigger the manual review process when the confidence score is less than X; S6. System closed-loop optimization: The detection results are transmitted to the management platform in real time, and the model performance is continuously optimized through algorithms.
2. The method for detecting welding seam defects based on visual images according to claim 1, characterized in that: The data collection steps are specifically as follows: A1. Use a 3D line laser profiler to scan the workpiece, identify the weld position and geometry, and generate inspection path planning; A2. Set the detection area and adjust the laser power, camera exposure time and gain parameters according to the material; A3. Configure a ring-shaped LED array light source and a polarization filter on the industrial camera to dynamically adjust the lighting angle; A4. Use industrial cameras, laser scanners and thermal imagers to scan the entire weld track and simultaneously collect visible light images, three-dimensional morphology and thermal distribution data.
3. The method for detecting welding seam defects based on visual images according to claim 1, characterized in that: The data preprocessing operations are as follows: The collected weld surface image is processed once to obtain crack characteristic data and pore characteristic data of the weld surface; the crack data includes crack length, width and quantity data, and the crack length and width data are processed to obtain crack characteristic data, specifically: The crack length and width are divided into 4 levels respectively. The corresponding average values of different levels are calculated and weighted averaged, and then the final average value is weighted together with the maximum value, median and arithmetic mean. The pore data includes pore area and quantity data. The pore area is processed to obtain the pore characteristic data, which is as follows: Calculate the average stomatal area and exclude data that deviate from the mean ± 3 times the standard deviation. Extract the area that exceeds the stomatal area threshold and calculate the average value. Take the weighted average of the average stomatal area that does not exceed the threshold to get the final average value. Process the thermal distribution data once to obtain temperature characteristic data, including heat input power, thermal resistance ratio, material thermal sensitivity coefficient, etc.; Perform a primary processing on the three-dimensional topography to obtain three-dimensional feature data of the defect area, including the three-dimensional coordinate point set of the defect area, etc.
4. A visual image-based welding seam defect detection method according to claim 1, characterized in that: Perform a secondary processing on the crack feature data and the pore feature data to obtain a crack coefficient and a pore coefficient, and generate a comprehensive defect score through the two types of defects to obtain a welding quality index; Perform a secondary processing on the temperature feature data to obtain the maximum temperature difference between the defect area and the base metal and the average temperature gradient; Perform a secondary processing on the three-dimensional feature data to obtain the defect depth, surface roughness, and fractal dimension.
5. A visual image-based welding seam defect detection method according to claim 4, characterized in that: The process of performing a secondary processing on the crack feature data and the pore feature data to obtain a crack coefficient and a pore coefficient, and generating a comprehensive defect score through the two types of defects to obtain a welding quality index is as follows: Wherein the crack coefficient is specifically: Normalize and perform weighted calculation on the final average values of the crack length and width and the number of cracks to obtain the crack coefficient; Wherein the pore coefficient is specifically: Normalize and perform weighted calculation on the maximum pore area, the final average pore area, and the pore density to obtain the pore coefficient; Wherein the comprehensive defect score is specifically: ; C + P is a linear superposition term, representing the cumulative influence of independent defects; v·C·P is a non-linear coupling term, representing the synergistic aggravation of quality deterioration between cracks and pores, and v needs to be calibrated through experiments; u is used to adjust the total score range; Wherein the welding quality index is specifically: ; k is a slope adjustment coefficient.
6. A visual image-based welding seam defect detection method according to claim 4, characterized in that: The process of performing a secondary processing on the temperature feature data to obtain the maximum temperature difference between the defect area and the base metal and the average temperature gradient is as follows: Wherein the maximum temperature difference is specifically: the product of the welding heat input power and the thermal resistance ratio divided by the defect projection area and then multiplied by the material thermal sensitivity coefficient; Wherein the welding heat input power is calculated through welding process parameters; the thermal resistance ratio is determined by the difference in thermal conductivity between the base metal and the defect area; the defect projection area is measured and analyzed through three-dimensional topography; the material thermal sensitivity coefficient is calibrated through X80 pipeline steel welding tests; Wherein the average temperature gradient is specifically: the maximum temperature difference divided by the effective action length of the defect and then multiplied by the geometric correction coefficient; Wherein the effective action length of the defect is measured based on geometric features; the geometric correction coefficient is fitted through the actual measured data of the thermal imager.
7. The method for detecting welding seam defects based on visual images according to claim 4, characterized in that: The process of performing a secondary processing on the three-dimensional feature data to obtain the defect depth, surface roughness, and fractal dimension is as follows: Wherein the defect depth is specifically: the maximum vertical dimension of the defect minus the minimum vertical dimension; Wherein the vertical dimension of the defect is the vertical coordinate value of the three-dimensional coordinate point set; The surface roughness parameter is specifically: Sum the absolute values of subtracting the average vertical dimension from the vertical dimension of any defect, and then divide by the total number of defects; And introduce the fractal dimension to describe its surface irregularity, and the specific formula is; ; wherein is the number of grids containing at least one defective pixel at each scale, is the side length of the grid, and the dimension value is determined by the logarithmic relationship between the scaling ratio and the number of covering cells.
8. A method for detecting welding seam defects based on visual images according to claim 1, characterized in that: The formula for obtaining the defect index through multi-modal fusion is as follows: The sum of the products of each parameter multiplied by the weight and then divided by the sum of the weights; Among them, the fusion method is feature-level weighted fusion, and the weights are dynamically allocated according to the feature importance.
9. The method for detecting welding seam defects based on visual images according to claim 1, characterized in that: The defect index is analyzed as follows: The internal welding defects mainly include: Cracks, pores, slag inclusions, incomplete penetration, and lack of fusion; The determination of the crack defect is specifically as follows: Cracks cause sudden changes in geometric depth and local high heat gradients caused by the heat conduction blocking effect. Its weights are mainly distributed in the defect depth, the maximum temperature difference, and the average temperature gradient; The determination of the pore defect is specifically as follows: The thermal conductivity of the gas inside the pores is low, showing a high-temperature area but with a gentle gradient, and the three-dimensional morphology is highly complex. Its weights are mainly distributed in the maximum temperature difference and the average temperature gradient; The determination of the slag inclusion defect is specifically as follows: Slag inclusions cause abnormal surface roughness but have little impact on the heat distribution. Its weights are mainly distributed in the surface roughness; The determination of the incomplete penetration defect is specifically as follows: Incomplete penetration shows a large depth but a gentle curvature and a medium heat gradient. Due to partial fusion, local thermal resistance is caused. Its weights are mainly distributed in the defect depth; The determination of the lack of fusion is specifically as follows: Lack of fusion shows local low temperature, uneven heat gradient distribution, and micro-roughness on the lack of fusion interface. Its weights are mainly distributed in the average temperature gradient and the surface roughness; After determining the defect category, calculate the confidence score of the corresponding defect and output it.
Citation Information
Patent Citations
Wheel weld surface defect detection method based on computer vision
CN113409313A
Steel structure welding seam quality real-time monitoring system based on digital twinning
CN118527882A
Intelligent weld defect detection method and system based on cloud computing
CN118537340A
Machine vision identification method applied to metal products
CN118731025A
Laser welding system control method for metal fittings
CN119525722A
Cited By
Temperature-sensitive textile detection device and detection method thereof
CN120726020A
A heat-sensitive textile detection device and a detection method thereof
CN120726020B
Visual signal processing system and method for casting defect inspection
CN120876498A
A visual signal processing system and method for casting defect inspection
CN120876498B
Automobile cushion sponge quality detection method based on artificial intelligence
CN120891159A