A steel structure weld quality detection method and system based on image recognition

CN122617873APending Publication Date: 2026-08-21ERSHISANYE GRP JINGE ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611083261.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-08-21

AI Technical Summary

Technical Problem

[0004]为了有助于解决现有焊缝质量检测方法因图像信息来源单一导致容易误判漏判、以及缺乏检测结果验证机制导致可靠性不足的问题,本申请提供一种基于图像识别的钢结构焊缝质量检测方法及系统

Benefits of technology

通过获取包含多角度焊缝表面图像和焊缝射线透射图像的原始检测图像序列,融合了焊缝表面形貌与内部结构两个维度的信息,克服了现有方法因仅依赖单一类型图像而信息维度不足的缺陷,能够有效降低因焊缝表面反光、氧化皮覆盖或内部组织干扰等因素造成的误判和漏判;同时,在图像识别获得缺陷类型标签和置信度分数之后,进一步引入焊接工艺参数和母材材质信息进行焊接工艺合理性校验,将视觉识别结果与焊接过程的物理冶金规律进行交叉验证,为纯视觉算法的输出增加了工艺合理性纠错机制,显著提高了检测结果的可靠性和可信度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122617873A_ABST
    Figure CN122617873A_ABST
Patent Text Reader

Abstract

The application relates to the field of welding technology, in particular to a steel structure weld seam quality detection method and system based on image recognition, which comprises the following steps: acquiring original detection image sequences containing multi-angle weld seam surface images and weld seam radiographic transmission images; performing image preprocessing and segmenting out candidate defect sub-regions; inputting a defect recognition network for classification and discrimination, and outputting defect type labels and confidence scores; performing defect position labeling to generate intermediate detection results; acquiring weld process parameters and base material quality information to perform weld process rationality checking, marking the labels with checking conflicts as to-be-rechecked states; and generating a weld seam quality detection report based on the intermediate detection results and the checked labels. The application combines multi-source image fusion and process rationality checking, and improves the accuracy and reliability of weld defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of welding technology, and in particular to a method and system for inspecting the quality of steel structure welds based on image recognition. Background Technology

[0002] In the manufacturing and construction of steel structures, welding is one of the most important methods for connecting various components, and its quality directly affects the safety and service life of the overall structure. Defects such as cracks, porosity, and lack of fusion that may appear in welds can easily propagate under alternating loads or stress concentration conditions, leading to structural failure or even serious accidents. Therefore, accurate and efficient inspection of weld quality is a crucial step in ensuring project safety. With the development of computer vision and image processing technologies, image recognition-based weld inspection methods have gradually gained attention.

[0003] However, existing image recognition-based weld inspection methods still have the following shortcomings: First, most existing methods rely solely on a single type of image (such as using only weld surface images or only X-ray transmission images) for judgment, resulting in insufficient information dimensions. Factors such as weld surface reflection, oxide scale coverage, or internal structural interference can easily lead to distortion in image feature extraction, causing false positives or false negatives. Second, existing methods depend entirely on the output of visual algorithms and lack a step to verify the process rationality of the inspection results. When image quality is poor or the algorithm model is not adaptable enough to specific weld morphologies, there is a lack of effective error correction mechanisms, making it difficult to guarantee the reliability of the inspection results. Summary of the Invention

[0004] To help solve the problems of existing weld quality inspection methods being prone to misjudgment and omission due to the single source of image information, and lacking reliability due to the lack of a verification mechanism for inspection results, this application provides a steel structure weld quality inspection method and system based on image recognition.

[0005] Firstly, this application provides a method for inspecting the quality of steel structure welds based on image recognition, employing the following technical solution: A method for inspecting the quality of steel structure welds based on image recognition, comprising: Obtain the original inspection image sequence of the steel structure weld, the original inspection image sequence including weld surface images and weld X-ray transmission images acquired from multiple angles; The original detection image sequence is preprocessed to extract the weld area image, and multiple candidate defect sub-regions are segmented from the weld area image. The candidate defect sub-regions are input into the defect recognition network for feature extraction and classification, and the defect type label and confidence score of each candidate defect sub-region are output. The defect type labels include crack, porosity and non-fusion. Based on the defect type label and confidence score, the defect location is marked on the weld area image, and an intermediate detection result containing a defect label layer and a defect attribute list is generated. Obtain the welding process parameters and base material information corresponding to the steel structure weld; verify the rationality of the welding process based on the welding process parameters and base material information; and mark the defect type labels with verification conflicts as pending review. Based on the intermediate test results and the verified defect type labels, a weld quality inspection report for the steel structure weld is generated.

[0006] Optionally, segmenting multiple candidate defect sub-regions from the weld area image includes: Multi-scale gray-level gradient calculation is performed on the weld area image to identify image areas where the gray-level gradient amplitude exceeds the background noise threshold and the gradient direction shows a convergence trend, which are used as suspected defect seed areas. Taking each suspected defective seed region as the center, the region grows outwards. During the growth process, the grayscale difference value and texture difference value between the current grown region and the adjacent pixels are dynamically calculated. When the grayscale difference value exceeds the first growth constraint threshold or the texture difference value exceeds the second growth constraint threshold, the growth in the corresponding direction is terminated to obtain the initial segmentation region. Determine whether the geometric shape of the initial segmented region satisfies the preset defect shape prior constraints, which include the region aspect ratio range, the region compactness range, and the region area range. Initial segmented regions that do not satisfy the prior constraints on defect morphology are treated as oversegmented regions and merged, while initial segmented regions that satisfy the prior constraints on defect morphology are output as candidate defect sub-regions.

[0007] Optionally, merging initially segmented regions that do not satisfy the prior constraints on defect morphology as over-segmented regions includes: Obtain all initial segmented regions that do not satisfy the prior constraints of the defect morphology, and calculate the similarity between the boundary gradient change rate and the internal gray-scale mean between two adjacent oversegmented regions. If the rate of change of the boundary gradient between two adjacent oversegmented regions is lower than the gradient change threshold and the similarity of the internal gray-level mean is higher than the similarity threshold, then the two adjacent oversegmented regions will be merged into one merged region. Recalculate the geometry of the merged region and determine again whether it meets the prior constraints of the defect morphology. If the prior constraint on the defect morphology is still not satisfied, the weld groove morphology information at the location of the merged region is extracted. Based on the bevel morphology information, adjust the region aspect ratio range and region area range in the defect morphology prior constraints, and use the adjusted defect morphology prior constraints to verify the merged region again. The merged region that passes the verification is output as a candidate defect sub-region.

[0008] Optionally, before inputting the candidate defect sub-region into the defect recognition network for feature extraction and classification, the method further includes: Obtain the incident angle of the light source and the reflective intensity of the surface metal corresponding to the weld surface image, and calculate the reflective interference coefficient of each pixel position of the weld surface image based on the incident angle of the light source and the reflective intensity of the surface metal; Determine whether the reflective interference coefficient exceeds the reflective interference threshold. If it exceeds the reflective interference threshold, acquire multiple auxiliary correction images of the same weld location under multiple incident angles of different light sources. The multiple auxiliary correction images are subjected to highlight region alignment and pixel fusion to generate a de-reflection repair image; The de-reflection repair image is used to replace the corresponding pixel area in the weld surface image whose reflection interference coefficient exceeds the reflection interference threshold, so as to obtain the corrected weld surface image. The corrected weld surface image and the weld X-ray transmission image are input together into the defect recognition network.

[0009] Optionally, performing highlight region alignment and pixel fusion on the multiple auxiliary correction images includes: The auxiliary correction image with the smallest difference between the incident angle of the light source and the incident angle of the light source of the weld surface image is selected from the multiple auxiliary correction images as the reference image; Extract the pixel locations in the remaining auxiliary correction images where the reflection interference coefficient exceeds the reflection interference threshold, and calculate the actual gray value of the extracted pixel locations in their respective auxiliary correction images; The ratio of the actual gray value to the gray value at the corresponding position in the reference image is calculated to obtain the gray compensation coefficient of each auxiliary correction image relative to the reference image. The grayscale compensation coefficient is used to perform grayscale compensation on all pixels of the corresponding auxiliary correction image to obtain multiple compensated auxiliary correction images. The gray values ​​of corresponding pixel positions in the multiple compensated auxiliary correction images are fused by median fusion to generate the de-glare restoration image.

[0010] Optionally, verifying the welding process rationality of the defect type label based on the welding process parameters and base material information includes: Welding current, welding voltage and welding speed values ​​are extracted from the welding process parameters, and base material grade and plate thickness are extracted from the base material information. Based on the base material grade and plate thickness value, query the preset welding process specification database to obtain the standard welding heat input range that matches the base material grade and plate thickness value; The actual welding heat input is calculated based on the welding current value, welding voltage value, and welding speed value, and it is determined whether the actual welding heat input is within the range of the standard welding heat input. If the actual welding heat input is lower than the lower limit of the standard welding heat input range, the confidence score of the defect type labeled as porosity in the candidate defect sub-region is reduced by a first correction value, and the confidence score of the defect type labeled as non-fusion is increased by a first correction value. If the actual welding heat input is higher than the upper limit of the standard welding heat input range, the confidence score of the defect type labeled as crack in the candidate defect sub-region is increased by a second correction value, and the confidence score of the defect type labeled as porosity is decreased by a second correction value. Defect types whose confidence scores, after adjustment, are below the confidence threshold are marked as pending review.

[0011] Optionally, after marking defect type labels with confidence scores below the confidence threshold after confidence score correction as pending review, the process also includes: The real-time welding data record of the steel structure weld during the welding process is obtained, and the real-time welding data record includes the welding current fluctuation curve and the welding voltage fluctuation curve; Extract the timing and magnitude of current abrupt changes from the welding current fluctuation curve, and extract the timing and magnitude of voltage abrupt changes from the welding voltage fluctuation curve; Determine whether the current change moment and the voltage change moment are within the same time window; If they exist within the same time window, the instantaneous heat input deviation at the weld location is calculated based on the current change amplitude and voltage change amplitude. If the instantaneous heat input deviation exceeds the deviation threshold, the defect type label of the candidate defect sub-region corresponding to the weld position to be reviewed in the time window will be corrected to the non-fusion type. The corrected defect type label and the corresponding correction basis are recorded in the remarks field of the weld quality inspection report.

[0012] Optionally, before generating the weld quality inspection report for the steel structure welds, the method further includes: The spatial positions of the candidate defect sub-regions in the weld area image are mapped back to the three-dimensional spatial coordinates of the steel structure weld to obtain the actual spatial position coordinates of each candidate defect sub-region. Based on the defect type label and actual spatial coordinates of each candidate defect sub-region, determine whether the spatial distance between multiple candidate defect sub-regions corresponding to the same type of defect label in three-dimensional space is less than the clustering distance threshold. If the distance is less than the clustering distance threshold, the multiple candidate defect sub-regions are merged into the same continuous defect region, and the continuous region length, continuous region width, and continuous region orientation of the merged continuous defect region in three-dimensional space are extracted. Calculate the ratio of the length to the width of the continuous region to obtain the aspect ratio of the defective continuous region; Obtain the weld trajectory planning data of the steel structure weld; Based on the weld trajectory planning data, the weld axis direction at the spatial location of the defect continuity region is obtained; Calculate the angle between the direction of the continuous region and the direction of the weld axis; If the aspect ratio exceeds the strip defect morphology threshold and the included angle is less than the included angle threshold, then the defect severity level of the continuous defect region will be increased by one level. If the aspect ratio does not exceed the strip defect morphology threshold or the included angle is not less than the included angle threshold, the defect severity level of the continuous defect region remains unchanged.

[0013] Optionally, the recalculation of the orientation of the continuous region in three-dimensional space after merging the defect continuum includes: Extract the set of spatial coordinates of all pixels in the three-dimensional space of the merged defect continuous region, and perform principal component analysis on the set of spatial coordinates to obtain the first principal component direction vector; Calculate the projection direction vector of the first principal component direction vector onto the weld section plane of the steel structure weld, and use the projection direction vector as the direction of the continuous region.

[0014] Secondly, this application also discloses a steel structure weld quality inspection system based on image recognition, which adopts the following technical solution: A steel structure weld quality inspection system based on image recognition, comprising: The image acquisition module is used to acquire the original detection image sequence of the steel structure weld, which includes weld surface images and weld X-ray transmission images acquired from multiple angles. The region segmentation module is used to perform image preprocessing on the original detection image sequence, extract the weld area image, and segment multiple candidate defect sub-regions from the weld area image; The defect identification module is used to input the candidate defect sub-regions into the defect identification network for feature extraction and classification, and output the defect type label and confidence score of each candidate defect sub-region. The defect type labels include crack, porosity and incomplete fusion. The result generation module is used to annotate the defect location of the weld area image according to the defect type label and confidence score, and generate intermediate detection results containing a defect annotation layer and a defect attribute list. The process verification module is used to obtain the welding process parameters and base material information corresponding to the steel structure weld, and to perform welding process rationality verification on the defect type label based on the welding process parameters and base material information, and to mark the defect type label with verification conflict as pending review. The report output module is used to generate a weld quality inspection report for the steel structure welds based on the intermediate inspection results and the verified defect type labels.

[0015] In summary, this application includes the following beneficial technical effects: By acquiring a sequence of original detection images containing multi-angle weld surface images and weld X-ray transmission images, information from both the weld surface morphology and internal structure is integrated. This overcomes the shortcomings of existing methods that rely solely on a single type of image, resulting in insufficient information dimensions. It effectively reduces misjudgments and missed judgments caused by factors such as weld surface reflection, oxide scale coverage, or internal structural interference. Furthermore, after obtaining defect type labels and confidence scores through image recognition, welding process parameters and base material information are further introduced to verify the rationality of the welding process. The visual recognition results are cross-validated with the physical and metallurgical laws of the welding process, adding a process rationality correction mechanism to the output of the pure visual algorithm, significantly improving the reliability and credibility of the detection results. Attached Figure Description

[0016] Figure 1 This is a flowchart of the main process of a steel structure weld quality inspection method based on image recognition according to an embodiment of this application; Figure 2 This is a flowchart illustrating the steps involved in segmenting multiple candidate defect sub-regions from a weld area image. Figure 3 This is a flowchart of the steps to merge initially segmented regions that do not meet the prior constraints of defect morphology as over-segmented regions. Figure 4 This is a block diagram of a steel structure weld quality inspection system based on image recognition, according to an embodiment of this application.

[0017] Explanation of reference numerals in the attached figures: 1. Image acquisition module; 2. Region segmentation module; 3. Defect recognition module; 4. Result generation module; 5. Process verification module; 6. Report output module. Detailed Implementation

[0018] In the first aspect, this application discloses a method for inspecting the quality of steel structure welds based on image recognition.

[0019] Reference Figure 1 A method for inspecting the quality of steel structure welds based on image recognition, comprising steps S101 to S106: Step S101: Obtain the original detection image sequence of the steel structure weld, which includes weld surface images and weld X-ray transmission images acquired from multiple angles.

[0020] Specifically, the original inspection image sequence is acquired collaboratively by multiple image acquisition devices. Weld surface images refer to images of the weld's outer surface morphology taken from different angles using an industrial camera under visible light or a specific wavelength light source. These images reflect the weld's geometric contours, color variations, and surface opening defects. Weld X-ray transmission images are grayscale images generated by attenuating X-rays or gamma rays penetrating the weld area and received by an imaging plate or detector. These images display defect projections formed within the weld due to differences in material density. Multi-angle acquisition involves taking pictures or scanning from multiple azimuth angles around the weld axis to obtain more comprehensive surface texture information and internal projection data, providing a sufficient data foundation for subsequent processing.

[0021] Step S102: Perform image preprocessing on the original detection image sequence, extract the weld area image, and segment multiple candidate defect sub-regions from the weld area image.

[0022] Specifically, image preprocessing includes, but is not limited to, grayscale conversion, filtering and denoising, contrast enhancement, and geometric correction. Grayscale conversion converts color images to grayscale to reduce computation; filtering and denoising uses methods such as median filtering or Gaussian filtering to eliminate salt-and-pepper noise or Gaussian noise introduced during image acquisition; contrast enhancement uses histogram equalization or adaptive contrast stretching algorithms to increase the grayscale difference between the weld area and the background base material area; geometric correction corrects distortion and normalizes the image according to pre-calibrated camera parameters to ensure accurate correspondence between the image spatial location and the actual weld location. After preprocessing, the difference in grayscale gradient or texture features between the weld area and the base material area is used to extract the weld area image containing only the weld and its adjacent heat-affected zone using threshold segmentation or edge detection algorithms. Subsequently, multi-scale analysis and local extremum detection are performed on the weld area image to find pixel clusters that differ from normal weld structures in grayscale, texture, or morphology. These abnormal pixel clusters are then separated from the background using region growing, watershed segmentation, or deep learning-based segmentation networks to form multiple independent candidate defect sub-regions.

[0023] Step S103: Input the candidate defect sub-regions into the defect recognition network for feature extraction and classification, and output the defect type label and confidence score of each candidate defect sub-region. The defect type labels include crack, porosity and non-fusion.

[0024] Specifically, the defect recognition network is a pre-trained deep convolutional neural network model containing multiple convolutional layers, pooling layers, and fully connected layers to automatically extract deep morphological and texture features from the input image region. The network's training dataset consists of a large number of weld seam image samples representing known defect types (cracks, porosity, and lack of fusion) and normal regions. The confidence score is a value between 0 and 1, representing the probability or credibility of the network determining that the current candidate defect sub-region belongs to a certain defect type.

[0025] Step S104: Based on the defect type label and confidence score, mark the defect location in the weld area image and generate an intermediate detection result containing a defect label layer and a list of defect attributes.

[0026] Specifically, for each candidate defect sub-region, a corresponding color or icon is selected based on its defect type label, and it is marked at the corresponding position in the weld area image, forming an independent defect annotation layer. This layer has the same spatial dimensions as the original weld area image, facilitating subsequent overlay display and analysis. Simultaneously, an attribute record is generated for each marked defect and stored in the defect attribute list. Each attribute record includes at least the defect's unique ID, its position coordinates in the image (such as center point coordinates or bounding box coordinates), defect type label, confidence score, area, perimeter, and aspect ratio.

[0027] Step S105: Obtain the welding process parameters and base material information corresponding to the steel structure welds. Based on the welding process parameters and base material information, verify the welding process rationality of the defect type labels and mark the defect type labels with verification conflicts as pending review.

[0028] Specifically, welding process parameters refer to the operational parameters set in actual welding operations, such as welding current, welding voltage, welding speed, and shielding gas flow rate. Base material information refers to the material properties of the steel being welded, such as the grade (e.g., Q235, Q345), plate thickness, and heat treatment state. The basic principle of welding process rationality verification is that different combinations of welding process parameters and base material tend to produce specific types of welding defects. For example, insufficient heat input easily leads to incomplete fusion defects, while excessive heat input easily leads to crack defects. By comparing the defect types identified in the image with the expected defect tendencies derived from the process parameters, if a significant discrepancy is found (e.g., identifying a large number of cracks under process conditions that easily produce porosity, or vice versa), these low-confidence identification results are marked as pending verification, indicating the need for secondary confirmation by manual or other means, thereby effectively reducing the misjudgment rate of purely visual algorithms.

[0029] Step S106: Based on the intermediate inspection results and the verified defect type labels, generate a weld quality inspection report for the steel structure welds.

[0030] Specifically, the weld quality inspection report is a structured electronic document that integrates the defect location distribution map and defect attribute list from the intermediate inspection results, as well as the final defect type labels and corresponding confidence levels (credible or pending verification) determined after process rationality verification. The report also assigns a severity rating to each defect based on preset quality assessment standards (such as national standard GB / T 19418 or AWS D1.1), and provides a comprehensive conclusion on whether the overall weld quality is acceptable. For defects marked as pending verification, the report specifically lists and suggests verification methods, such as manual ultrasonic testing.

[0031] Reference Figure 2 In one embodiment of this invention, segmenting multiple candidate defect sub-regions from the weld area image includes steps S201 to S205: Step S201: Perform multi-scale gray-level gradient calculation on the weld area image, identify image areas where the gray-level gradient amplitude exceeds the background noise threshold and the gradient direction shows a convergence trend, and use them as suspected defect seed areas.

[0032] Specifically, multi-scale gray-level gradient calculation refers to performing convolution operations on the weld area image using Sobel or Scharr operators of different sizes (e.g., 3×3, 5×5, 7×7 pixels) to obtain the gradient magnitude and gradient direction of each pixel at different scales. The background noise threshold is an empirical value or an automatically calculated dynamic threshold set based on the statistical distribution of gradient magnitudes in normal texture areas of the weld area image, used to distinguish between normal surface textures and abrupt changes. A convergence trend in gradient directions means that the gradient direction vectors of multiple adjacent pixels roughly point to the same center point or the same narrow strip-shaped region. This convergence pattern is usually associated with the boundary features of defect areas because the gray-level difference on both sides of the defect boundary forms a gradient field pointing towards the interior of the defect. Image areas that meet the above conditions are selected as suspected defect seed regions, serving as the starting point for subsequent region growth.

[0033] Step S202: Using each suspected defect seed region as the center, perform region growth in all directions. During the growth process, dynamically calculate the grayscale difference value and texture difference value between the current grown region and its neighboring pixels.

[0034] Specifically, region growing is an image segmentation algorithm based on pixel similarity. In this embodiment, starting from the seed region, unassigned pixels in its four- or eight-neighborhood are checked sequentially to determine the similarity between the pixel and the current growing region. The grayscale difference value refers to the absolute difference between the grayscale value of adjacent pixels and the average grayscale value of the current growing region; the texture difference value refers to the difference between the texture features of adjacent pixels calculated using local binary mode or gray-level co-occurrence matrix and the average texture features of the growing region, such as Euclidean distance or chi-square distance. By simultaneously monitoring the differences in both grayscale and texture dimensions, it is possible to more accurately distinguish between true defect boundaries and grayscale perturbations caused solely by changes in illumination, avoiding overgrowing or undergrowing.

[0035] Step S203: When the grayscale difference value exceeds the first growth constraint threshold or the texture difference value exceeds the second growth constraint threshold, the growth in the corresponding direction is terminated to obtain the initial segmentation region.

[0036] Specifically, the first growth constraint threshold is a preset upper limit for grayscale difference tolerance, and the second growth constraint threshold is a preset upper limit for texture difference tolerance. During the region growth iteration process, for each adjacent pixel to be merged, if its grayscale difference value is greater than the first growth constraint threshold, it indicates that the pixel differs too much in brightness from the current region and should not belong to the same defect region; if its texture difference value is greater than the second growth constraint threshold, it indicates that the pixel differs too much in surface microstructure from the current region and should also not belong to the same region. When either condition is triggered, the inclusion of that pixel into the current region is stopped, and the pixel boundary in that direction is marked as the region boundary. When growth in all directions is terminated, a complete initial segmentation region is formed.

[0037] Step S204: Determine whether the geometric shape of the initial segmented region satisfies the preset defect shape prior constraints. The defect shape prior constraints include the region aspect ratio range, the region compactness range, and the region area range.

[0038] Specifically, the aspect ratio refers to the ratio of the longer side to the shorter side of the smallest bounding rectangle of the initially segmented region. Different types of defects have different typical aspect ratios; for example, crack defects usually have a large aspect ratio (>3), while porosity defects have an aspect ratio close to 1. Region compactness refers to the ratio of the region's area to the square of its perimeter, used to measure the complexity of the region's shape. Defect regions typically have higher compactness than noise regions. Region area range refers to the reasonable upper and lower limits of defect size; regions that are too small (potentially noise) or too large (potentially multiple defects merging) do not meet the prior constraints. These prior constraints are set based on the statistical laws of the physical morphology of weld defects and are used to initially screen out obviously unreasonable over-segmented regions.

[0039] Step S205: Merge the initial segmented regions that do not meet the prior constraints of defect morphology as over-segmented regions, and output the initial segmented regions that meet the prior constraints of defect morphology as candidate defect sub-regions.

[0040] Specifically, oversegmentation refers to the phenomenon where the same real defect region is incorrectly divided into multiple small blocks due to minor changes in local grayscale or texture. For regions that meet the constraints, they can be directly used as candidate defect sub-regions in subsequent defect identification steps; for regions that do not meet the constraints, a merging process is initiated to attempt to recombine them with adjacent oversegmented regions in order to recover the complete defect region.

[0041] Reference Figure 3 In one embodiment of this invention, the initial segmentation region that does not satisfy the prior constraints of defect morphology is treated as an over-segmented region and merged, including steps S301 to S305: Step S301: Obtain all initial segmented regions that do not satisfy the prior constraints of defect morphology, and calculate the similarity between the boundary gradient change rate and the internal gray-scale mean between two adjacent oversegmented regions.

[0042] Specifically, the boundary gradient change rate refers to the average or variance of the gradient magnitude of each pixel along the common boundary of two adjacent oversegmented regions, used to measure the sharpness of the boundary between the two regions. If the boundary gradient change rate is low, it indicates that the grayscale transition between the two regions is relatively smooth, and they may have originally belonged to the same region. Internal grayscale mean similarity refers to the closeness of the average grayscale values ​​of all pixels within each of the two regions. It is usually expressed as the ratio of the absolute value of the difference between the two means to the smaller of the two values. The smaller the ratio, the closer the material and lighting response of the two regions are.

[0043] Step S302: If the boundary gradient change rate between two adjacent oversegmented regions is lower than the gradient change threshold and the internal gray-level mean similarity is higher than the similarity threshold, then the two adjacent oversegmented regions are merged into one merged region.

[0044] Specifically, the gradient change threshold and similarity threshold are both preset empirical parameters. When both conditions are met simultaneously, it is highly likely that the two oversegmented regions come from the same real defect, so a merging operation is performed to form a merged region; the geometric boundary of the merged region is the union of the boundaries of the original two regions, and the internal pixel set is the union of the two.

[0045] Step S303: Recalculate the geometry of the merged region and determine again whether the prior constraints of the defect morphology are satisfied.

[0046] Specifically, the aspect ratio, compactness, and area of ​​the merged region will change, requiring recalculation and comparison with the same prior constraint on defect morphology in step S204 to see if it meets the requirements.

[0047] Step S304: If the prior constraint of defect morphology is still not satisfied, extract the weld groove morphology information of the location of the merged region.

[0048] Specifically, weld groove morphology information includes groove angle and groove depth. Groove angle refers to the angle between the bevel formed by machining the edge of the base metal before welding and the surface of the base metal. Groove depth refers to the vertical depth of the bevel bevel in the direction perpendicular to the surface of the base metal. This information can be obtained in advance from welding design drawings or through 3D structured light scanning. If the merged area still does not meet the general defect morphology priors, it may be because the morphology of the area is strongly influenced by the geometry of the weld groove, causing the defect to appear differently in the 2D projection than conventionally assumed.

[0049] Step S305: Adjust the region aspect ratio range and region area range in the defect shape prior constraints according to the bevel morphology information, and use the adjusted defect shape prior constraints to verify the merged region again. Output the merged region that passes the verification as a candidate defect sub-region.

[0050] Specifically, when the bevel angle is large or the bevel depth is deep, a strip-shaped unfused defect may appear as a large area with a small aspect ratio under a specific shooting angle due to projection distortion, thus failing to pass the preset prior constraints. Therefore, based on the actual bevel angle and depth, the degree of projection distortion that the defect may exhibit under this bevel shape is calculated through geometric projection relationships. The lower limit of the area aspect ratio range and the upper limit of the area range are then appropriately relaxed. The merged area is then re-verified using the adjusted constraints, and the merged area that passes the verification is output as a candidate defect sub-region. For example, at locations with large bevel angles or deep bevel depths, a strip-shaped unfused defect may project as a large area with a small aspect ratio under a specific shooting angle. Therefore, the prior constraints need to be modified according to the actual bevel shape, such as appropriately relaxing the lower limit of the area aspect ratio or adjusting the upper limit of the area range. Re-verification using the modified constraints can include the verified areas in the candidate defect sub-regions, thereby reducing missed detections due to geometric projection distortion.

[0051] In one embodiment of this invention, before inputting the candidate defect sub-region into the defect recognition network for feature extraction and classification, steps S401 to S405 are further included: Step S401: Obtain the incident angle of the light source and the reflective intensity of the surface metal corresponding to the weld surface image, and calculate the reflective interference coefficient of each pixel position of the weld surface image based on the incident angle of the light source and the reflective intensity of the surface metal.

[0052] Specifically, the incident angle of the light source refers to the angle between the center line of the illumination light beam and the normal to the weld surface, which can be read from the hardware parameters of the image acquisition system. The surface metal reflectivity refers to the brightness value of the reflected light at different locations on the weld surface. The reflection interference coefficient is a comprehensive index used to quantify the degree to which each pixel location is affected by specular reflection or specular interference. Typically, when the incident angle of the light source and the camera's viewing angle satisfy the specular reflection condition (i.e., the incident angle equals the reflection angle) and the metal surface at that location is relatively smooth, the reflection interference coefficient will increase significantly, causing the true grayscale information of that area to be masked by specular highlights.

[0053] Step S402: Determine whether the reflection interference coefficient exceeds the reflection interference threshold. If it exceeds the reflection interference threshold, acquire multiple auxiliary correction images of the same weld location under multiple incident angles of different light sources.

[0054] Specifically, the reflection interference threshold is a preset judgment boundary used to distinguish between acceptable low-interference areas and high-interference areas requiring repair. When the reflection interference coefficient of a pixel or a certain area exceeds this threshold, it indicates that the image information at that location is unreliable. To repair this area, the system controls the light source to switch to multiple different incident angles (e.g., lighting from the left, right, and front sides respectively) and re-captures the image, obtaining multiple auxiliary correction images of the same weld location. In these auxiliary images, the same highlight point will shift in position or change in intensity due to the change in the light source angle, thus providing a data basis for recovering the original information.

[0055] Step S403: Align the highlight areas and fuse the pixels of multiple auxiliary correction images to generate a de-reflection repair image.

[0056] Specifically, highlight alignment refers to mapping highlight regions in different auxiliary correction images to a unified image coordinate system using image registration techniques. Pixel fusion refers to merging the effective information (i.e., grayscale values ​​of non-highlight regions) of corresponding pixel positions in multiple aligned auxiliary correction images to reconstruct the true grayscale values ​​masked by highlights. Fusion strategies can employ weighted averaging, median filtering, or principal component analysis-based restoration algorithms, ultimately generating a de-glare restoration image with the highlight regions repaired.

[0057] Step S404: Replace the corresponding pixel areas in the weld surface image where the reflection interference coefficient exceeds the reflection interference threshold with the de-reflection repair image to obtain the corrected weld surface image.

[0058] Specifically, a pixel-level replacement method is used, which replaces only the pixel areas in the original weld surface image that are affected by specular interference (i.e., the locations where the reflective interference coefficient exceeds the threshold) with the corresponding pixel values ​​in the de-reflection repair image, while keeping the pixel values ​​of other undisturbed areas unchanged, thereby repairing the damaged areas while preserving the original clear information.

[0059] Step S405: Input the corrected weld surface image and weld radiographic transmission image into the defect recognition network.

[0060] Specifically, the corrected weld surface image eliminates specular interference and provides more accurate surface morphology and texture information. It complements the weld X-ray transmission image, which reflects the internal structure, and together serve as the multi-channel input of the defect recognition network, which can significantly improve the network's accuracy in recognizing various defects.

[0061] In one embodiment of this invention, performing highlight region alignment and pixel fusion on multiple auxiliary correction images includes steps S501 to S505: Step S501: Select the auxiliary correction image with the smallest difference between the incident angle of the light source and the incident angle of the light source of the weld surface image from multiple auxiliary correction images as the reference image.

[0062] Specifically, the image whose light source angle is closest to that of the original image is selected as a reference because its overall brightness distribution and shadow direction are most similar to the original image. Using it as a benchmark for subsequent compensation and fusion can minimize secondary errors caused by differences in overall illumination.

[0063] Step S502: Extract the pixel positions in the remaining auxiliary correction images where the reflection interference coefficient exceeds the reflection interference threshold, and calculate the actual gray value of the extracted pixel positions in their respective auxiliary correction images.

[0064] Specifically, for each non-reference auxiliary correction image, its reflection interference coefficient is calculated, and the highlight regions are identified. Then, the actual grayscale readings of these highlight region pixels in the image are recorded.

[0065] Step S503: Calculate the ratio between the actual gray value and the gray value at the corresponding position in the reference image to obtain the gray compensation coefficient of each auxiliary correction image relative to the reference image.

[0066] Specifically, for each highlight pixel location, its grayscale value in the auxiliary image is divided by the grayscale value of the corresponding location in the reference image (where the location may have no highlight or a very light highlight, resulting in a grayscale value closer to the actual material response), yielding a ratio. The average or median of these ratios across all highlight pixel locations is then used as the overall grayscale compensation coefficient for the auxiliary image relative to the reference image. This coefficient reflects the degree of overall brightness attenuation or enhancement caused by changes in the light source angle.

[0067] Step S504: Use grayscale compensation coefficients to perform grayscale compensation on all pixels of the corresponding auxiliary correction image to obtain multiple compensated auxiliary correction images.

[0068] Specifically, the grayscale values ​​of all pixels in each auxiliary correction image are multiplied by its corresponding grayscale compensation coefficient (or a compensation bias is added) so that the overall brightness level of the compensated auxiliary image is consistent with that of the reference image, thereby eliminating the differences caused by different light source intensity or distance, and ensuring that the pixel values ​​of each image are comparable during subsequent fusion.

[0069] Step S505: Median fusion of gray values ​​at corresponding pixel positions in multiple compensated auxiliary correction images to generate a de-glare restoration image.

[0070] Specifically, for each pixel location in the image, the compensated and corrected images may contain both specular interference values ​​and normal values. Median fusion refers to taking the median of the gray values ​​at these corresponding locations as the final fusion value for that location. Median filtering has good anti-outlier characteristics and can effectively eliminate a few outliers that still have residual highlights, thereby stably restoring pixel gray values ​​close to reality and generating high-quality de-glare restoration images.

[0071] In one embodiment of this invention, the verification of the welding process rationality of the defect type label based on welding process parameters and base material information includes steps S601 to S606: Step S601: Extract welding current, welding voltage and welding speed values ​​from welding process parameters, and extract base material grade and plate thickness values ​​from base material information.

[0072] Specifically, welding current, welding voltage, and welding speed are the three core process parameters that determine the welding heat input. The base material grade (e.g., Q345B) determines the chemical composition and mechanical properties of the steel, while the plate thickness (in millimeters) directly affects the heat dissipation conditions and penetration requirements during welding.

[0073] Step S602: Based on the base material grade and plate thickness value, query the preset welding process specification database to obtain the standard welding heat input range that matches the base material grade and plate thickness value.

[0074] Specifically, the welding procedure specification database is a pre-built knowledge base that stores the optimal range of welding heat input (in kJ / mm or kJ / cm) recommended by relevant welding standards (such as ISO / TR 18491 or AWS C5.5) for different base material grades and plate thickness combinations. This range is a closed interval that includes an upper limit and a lower limit.

[0075] Step S603: Calculate the actual welding heat input based on the welding current, welding voltage, and welding speed values, and determine whether the actual welding heat input is within the standard welding heat input range.

[0076] Specifically, the formula for calculating the actual welding heat input H is: H = (U × I × 60) / (v × 1000), where U is the welding voltage (volts), I is the welding current (amperes), and v is the welding speed (mm / min). The calculation result is usually expressed in kilojoules per millimeter, and then the calculated value is compared with the standard range obtained in step S602.

[0077] Step S604: If the actual welding heat input is lower than the lower limit of the standard welding heat input range, the confidence score of the defect type labeled as porosity in the candidate defect sub-region is reduced by a first correction value, and the confidence score of the defect type labeled as non-fusion is increased by a first correction value.

[0078] Specifically, when the actual heat input is low, it means the weld pool temperature is not high enough or the fusion time is insufficient. In this case, the most likely defect is incomplete fusion, while the probability of porosity is relatively low. Therefore, based on prior knowledge of welding physical metallurgy, the output of the image recognition network needs to be corrected. The first correction value is a preset score adjustment (e.g., 0.15). The confidence score for porosity is subtracted from the first correction value, and the confidence score for incomplete fusion is added to the first correction value, so that the final confidence score better reflects the probability of defect occurrence under actual process conditions.

[0079] Step S605: If the actual welding heat input is higher than the upper limit of the standard welding heat input range, the confidence score of the defect type labeled as crack in the candidate defect sub-region is increased by the second correction value, and the confidence score of the defect type labeled as porosity is decreased by the second correction value.

[0080] Specifically, when the actual heat input is too high, it means the molten pool is overheated, the weld metal grains are coarse, and the thermal stress during cooling increases significantly, making it prone to hot cracking. Simultaneously, excessive heat prolongs the molten pool's existence time, facilitating gas escape and reducing the probability of porosity. Therefore, a second correction value (e.g., 0.15) is used to increase the confidence score for crack-related categories and decrease the confidence score for porosity-related categories. The first and second correction values ​​can be the same or different, depending on the process sensitivity analysis results.

[0081] Step S606: Mark the defect type labels that are lower than the confidence threshold after confidence score correction as pending review.

[0082] Specifically, the confidence threshold (e.g., 0.5) is a preset criterion used to distinguish whether the identification results are reliable enough to be directly adopted. If any defect type label, after the above-mentioned process rationality correction, still has a confidence score lower than this threshold, it indicates that the identification result seriously conflicts with the process prior and the network itself lacks confidence. Therefore, it is marked as pending review, indicating that it needs special manual attention or other methods for verification in the final report.

[0083] In one embodiment of this example, after marking the defect type label with a confidence score lower than the confidence threshold after confidence score correction as pending review, the method further includes steps S701 to S706: Step S701: Obtain real-time welding data records of the steel structure weld during the welding process. The real-time welding data records include welding current fluctuation curves and welding voltage fluctuation curves.

[0084] Specifically, real-time welding data recording includes welding current fluctuation curves and welding voltage fluctuation curves. These data are usually sampled and recorded at high frequency (e.g., 1000 times per second) by sensors inside the welding power source, which can reflect the changes in electrical parameters at every moment during the welding process.

[0085] Step S702: Extract the time and magnitude of current abrupt change from the welding current fluctuation curve, and extract the time and magnitude of voltage abrupt change from the welding voltage fluctuation curve.

[0086] Specifically, the current abrupt change moment refers to the point in time when the welding current value changes drastically (e.g., the rate of change exceeds a set threshold), and the current abrupt change amplitude refers to the absolute value of the difference between the stable current values ​​before and after the abrupt change. Similarly, the voltage abrupt change moment and amplitude are also extracted from the voltage fluctuation curve.

[0087] Step S703: Determine whether the current change moment and the voltage change moment are within the same time window.

[0088] Specifically, the time window is a preset time interval (e.g., 500 milliseconds). If the difference between the times of current change and voltage change is less than the length of this time window, they are considered to occur synchronously. This usually means that some kind of sudden disturbance has occurred during the welding process, such as a sudden change in wire feed speed, fluctuation in shielding gas flow, or workpiece position shift.

[0089] Step S704: If they exist within the same time window, calculate the instantaneous heat input deviation at the weld location based on the amplitude of current change and voltage change.

[0090] Specifically, based on the moment of the abrupt change and the known welding speed, the exact spatial location of the disturbance on the weld can be determined. The instantaneous heat input deviation refers to the percentage or absolute value of the deviation between the actual instantaneous heat input at that moment (calculated based on the current and voltage after the abrupt change) and the process setpoint.

[0091] Step S705: If the instantaneous heat input deviation exceeds the deviation threshold, the defect type label of the candidate defect sub-region corresponding to the weld position to be reviewed in the time window is corrected to the non-fusion type.

[0092] Specifically, the deviation threshold is a preset tolerance limit. If the instantaneous heat input deviation is too large, it indicates that the location has experienced severe welding process instability, which is highly likely to lead to the generation of incomplete fusion defects. Therefore, for candidate defect sub-regions located near this disturbance location that have been marked as awaiting review, their defect type labels are forcibly corrected to incomplete fusion type, because the process data provides strong indirect evidence.

[0093] Step S706: Store the corrected defect type label and the corresponding correction basis in the remarks field of the weld quality inspection report.

[0094] Specifically, to ensure the traceability and transparency of the testing process, this correction operation based on dynamic process data will be recorded in detail, including the original label, the corrected label, the corresponding time of the change, the magnitude of the change, and the deviation amount, and other key information will be stored in the remarks field of the final test report for quality control engineers to refer to during review.

[0095] In one embodiment of this example, before generating a weld quality inspection report for the steel structure weld, steps S801 to S809 are further included: Step S801: Map the spatial position of the candidate defect sub-region in the weld area image back to the three-dimensional spatial coordinates of the steel structure weld to obtain the actual spatial position coordinates of each candidate defect sub-region.

[0096] Specifically, by using camera calibration parameters and the rigid body transformation matrix between the image and the workpiece coordinate system, the pixel coordinates on the two-dimensional image are converted into millimeter-level coordinates in three-dimensional space, thereby accurately determining the actual physical location of each defect in the weld.

[0097] Step S802: Based on the defect type label and actual spatial coordinates of each candidate defect sub-region, determine whether the spatial distance between multiple candidate defect sub-regions corresponding to the same type of defect label in three-dimensional space is less than the clustering distance threshold.

[0098] Specifically, the clustering distance threshold is a preset spatial distance value (e.g., 5 mm). For multiple candidate sub-regions with the same defect type label (e.g., all are "cracks"), if their distance from each other in actual 3D space is less than this threshold, it means that they are spatially adjacent to each other and are likely to belong to different segments of the same defect rather than independent defects.

[0099] Step S803: If the distance is less than the clustering distance threshold, the multiple candidate defect sub-regions are merged into the same continuous defect region, and the continuous region length, continuous region width and continuous region orientation of the merged continuous defect region in three-dimensional space are extracted.

[0100] Specifically, the merge operation combines spatially adjacent sub-regions of the same type of defect into a unified continuous defect region. The continuous region length refers to the maximum span of the merged region in the extension direction, the continuous region width refers to the maximum span in the direction perpendicular to the extension direction, and the continuous region orientation refers to the main extension direction vector of the region in three-dimensional space.

[0101] Step S804: Calculate the ratio of the length to the width of the continuous region to obtain the aspect ratio of the defective continuous region.

[0102] Specifically, the aspect ratio is a key quantitative indicator for determining whether a defect is strip-shaped (such as a crack or lack of fusion) or circular / cluster-shaped (such as a group of pores).

[0103] Step S805: Obtain weld trajectory planning data for steel structure welds.

[0104] Specifically, weld trajectory planning data includes the sequence of path coordinates and tangent direction information of the weld in three-dimensional space. This data typically comes from the programming files of welding robots or automated welding equipment, or, in the case of manual welding, can be obtained by scanning the weld with a three-dimensional measuring instrument.

[0105] Step S806: Based on the weld trajectory planning data, obtain the weld axis direction at the spatial location of the defect continuous area.

[0106] Specifically, when the steel structure weld is a curved weld, the tangent direction corresponding to the geometric center point of the continuous defect region in the weld trajectory planning data is taken as the weld axis direction. In other words, for curved welds, the axis direction changes continuously with position, and the corresponding local axis direction must be dynamically determined according to the actual spatial location of the defect, rather than using a globally fixed direction.

[0107] Step S807: Calculate the angle between the direction of the continuous region and the direction of the weld axis.

[0108] Specifically, this included angle reflects the relationship between the extension direction of the strip defect and the stress direction of the weld (usually perpendicular to the weld axis). In weld quality assessment standards, cracks parallel to the weld axis are generally more hazardous than cracks perpendicular to the axis because the former are more likely to propagate under transverse shrinkage stress.

[0109] Step S808: If the aspect ratio exceeds the strip defect morphology threshold and the included angle is less than the included angle threshold, then the defect severity level of the continuous defect area is increased by one level.

[0110] Specifically, a strip defect morphology threshold (e.g., 3) is used to distinguish strip defects from non-strip defects. Angle threshold (e.g., 30 degrees) is used to limit the parallelism between the direction of the strip defect and the weld axis. When a defect simultaneously meets the criteria of being elongated (length-to-width ratio > 3) and its direction being basically consistent with the weld axis (angle < 30 degrees), the defect is judged to have a high risk of expansion, and therefore its severity level is upgraded one level from the current level (e.g., "moderate") to severe. Defect severity levels are usually divided into multiple levels such as minor, moderate, and severe.

[0111] Step S809: If the aspect ratio does not exceed the strip defect morphology threshold or the included angle is not less than the included angle threshold, then the defect severity level of the continuous defect area remains unchanged.

[0112] Specifically, if the defect does not meet the above-mentioned high-risk morphological characteristics, its severity level will be assessed according to the conventional size and type standards, without any additional upward adjustment.

[0113] In one embodiment of this invention, recalculating the orientation of the continuous region in three-dimensional space after merging the defect continuum includes steps S901 to S902: Step S901: Extract the set of spatial coordinates of all pixels in the three-dimensional space of the merged defect continuous region, and perform principal component analysis on the set of spatial coordinates to obtain the direction vector of the first principal component.

[0114] Specifically, principal component analysis (PCA) is a commonly used algorithm for data dimensionality reduction and direction extraction. By performing PCA on all three-dimensional coordinate points contained in the continuous region of the defect, three mutually orthogonal principal component directions can be obtained. Among them, the first principal component direction (i.e., the direction indicated by the eigenvector with the largest eigenvalue) represents the direction with the largest variance in space of the defect point cloud, which is the main extension direction of the defect.

[0115] Step S902: Calculate the projection direction vector of the first principal component direction vector on the weld section plane of the steel structure weld, and use the projection direction vector as the direction of the continuous region.

[0116] Specifically, the weld cross-sectional plane refers to the plane perpendicular to the weld axis. Since the weld itself is a curve in three-dimensional space, its cross-sectional plane also changes with position. Projecting the direction vector of the first principal component onto the weld cross-sectional plane at the location of the defect, the projected direction vector is the direction of the defect on the weld cross-section. This projection direction more accurately reflects whether the defect extends longitudinally or laterally along the weld, better meeting the needs of defect direction assessment in engineering practice.

[0117] Secondly, this application also discloses a steel structure weld quality inspection system based on image recognition.

[0118] Reference Figure 4 A steel structure weld quality inspection system based on image recognition, comprising: The image acquisition module is used to acquire the original detection image sequence of the steel structure weld. The original detection image sequence includes weld surface images and weld X-ray transmission images acquired from multiple angles. The region segmentation module is used to preprocess the original detection image sequence, extract the weld area image, and segment multiple candidate defect sub-regions from the weld area image; The defect identification module is used to input candidate defect sub-regions into the defect identification network for feature extraction and classification, and output the defect type label and confidence score of each candidate defect sub-region. The defect type labels include crack, porosity and non-fusion. The results generation module is used to annotate the defect locations in the weld area image based on the defect type label and confidence score, and generate intermediate detection results containing a defect annotation layer and a list of defect attributes. The process verification module is used to obtain the welding process parameters and base material information corresponding to the steel structure welds, and to verify the rationality of the welding process for the defect type labels based on the welding process parameters and base material information. The defect type labels with verification conflicts are marked as pending review. The report output module is used to generate a weld quality inspection report for steel structure welds based on intermediate inspection results and verified defect type labels.

[0119] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A method for inspecting the quality of steel structure welds based on image recognition, characterized in that, include: Obtain the original inspection image sequence of the steel structure weld, the original inspection image sequence including weld surface images and weld X-ray transmission images acquired from multiple angles; The original detection image sequence is preprocessed to extract the weld area image, and multiple candidate defect sub-regions are segmented from the weld area image. The candidate defect sub-regions are input into the defect recognition network for feature extraction and classification, and the defect type label and confidence score of each candidate defect sub-region are output. The defect type labels include crack, porosity and non-fusion. Based on the defect type label and confidence score, the defect location is marked on the weld area image, and an intermediate detection result containing a defect label layer and a defect attribute list is generated. Obtain the welding process parameters and base material information corresponding to the steel structure weld; verify the rationality of the welding process based on the welding process parameters and base material information; and mark the defect type labels with verification conflicts as pending review. Based on the intermediate test results and the verified defect type labels, a weld quality inspection report for the steel structure weld is generated.

2. The method for inspecting the quality of steel structure welds based on image recognition according to claim 1, characterized in that, Segmenting multiple candidate defect sub-regions from the weld area image includes: Multi-scale gray-level gradient calculation is performed on the weld area image to identify image areas where the gray-level gradient amplitude exceeds the background noise threshold and the gradient direction shows a convergence trend, which are used as suspected defect seed areas. Taking each suspected defective seed region as the center, the region grows outwards. During the growth process, the grayscale difference value and texture difference value between the current grown region and the adjacent pixels are dynamically calculated. When the grayscale difference value exceeds the first growth constraint threshold or the texture difference value exceeds the second growth constraint threshold, the growth in the corresponding direction is terminated to obtain the initial segmentation region. Determine whether the geometric shape of the initial segmented region satisfies the preset defect shape prior constraints, which include the region aspect ratio range, the region compactness range, and the region area range. Initial segmented regions that do not satisfy the prior constraints on defect morphology are treated as oversegmented regions and merged, while initial segmented regions that satisfy the prior constraints on defect morphology are output as candidate defect sub-regions.

3. The method for inspecting the quality of steel structure welds based on image recognition according to claim 2, characterized in that, Merging initially segmented regions that do not meet the prior constraints on defect morphology as over-segmented regions includes: Obtain all initial segmented regions that do not satisfy the prior constraints of the defect morphology, and calculate the similarity between the boundary gradient change rate and the internal gray-scale mean between two adjacent oversegmented regions. If the rate of change of the boundary gradient between two adjacent oversegmented regions is lower than the gradient change threshold and the similarity of the internal gray-level mean is higher than the similarity threshold, then the two adjacent oversegmented regions will be merged into one merged region. Recalculate the geometry of the merged region and determine again whether it meets the prior constraints of the defect morphology. If the prior constraint on the defect morphology is still not satisfied, the weld groove morphology information at the location of the merged region is extracted. Based on the bevel morphology information, adjust the region aspect ratio range and region area range in the defect morphology prior constraints, and use the adjusted defect morphology prior constraints to verify the merged region again. The merged region that passes the verification is output as a candidate defect sub-region.

4. The method for inspecting the quality of steel structure welds based on image recognition according to claim 1, characterized in that, Before inputting the candidate defect sub-region into the defect recognition network for feature extraction and classification, the process also includes: Obtain the incident angle of the light source and the reflective intensity of the surface metal corresponding to the weld surface image, and calculate the reflective interference coefficient of each pixel position of the weld surface image based on the incident angle of the light source and the reflective intensity of the surface metal; Determine whether the reflective interference coefficient exceeds the reflective interference threshold. If it exceeds the reflective interference threshold, acquire multiple auxiliary correction images of the same weld location under multiple incident angles of different light sources. The multiple auxiliary correction images are subjected to highlight region alignment and pixel fusion to generate a de-reflection repair image; The de-reflection repair image is used to replace the corresponding pixel area in the weld surface image whose reflection interference coefficient exceeds the reflection interference threshold, so as to obtain the corrected weld surface image. The corrected weld surface image and the weld X-ray transmission image are input together into the defect recognition network.

5. The method for inspecting the quality of steel structure welds based on image recognition according to claim 4, characterized in that, Performing highlight region alignment and pixel fusion on the multiple auxiliary correction images includes: The auxiliary correction image with the smallest difference between the incident angle of the light source and the incident angle of the light source of the weld surface image is selected from the multiple auxiliary correction images as the reference image; Extract the pixel locations in the remaining auxiliary correction images where the reflection interference coefficient exceeds the reflection interference threshold, and calculate the actual gray value of the extracted pixel locations in their respective auxiliary correction images; The ratio of the actual gray value to the gray value at the corresponding position in the reference image is calculated to obtain the gray compensation coefficient of each auxiliary correction image relative to the reference image. The grayscale compensation coefficient is used to perform grayscale compensation on all pixels of the corresponding auxiliary correction image to obtain multiple compensated auxiliary correction images. The gray values ​​of corresponding pixel positions in the multiple compensated auxiliary correction images are fused by median fusion to generate the de-glare restoration image.

6. The method for inspecting the quality of steel structure welds based on image recognition according to claim 1, characterized in that, The verification of the welding process rationality of the defect type label based on the welding process parameters and base material information includes: Welding current, welding voltage and welding speed values ​​are extracted from the welding process parameters, and base material grade and plate thickness are extracted from the base material information. Based on the base material grade and plate thickness value, query the preset welding process specification database to obtain the standard welding heat input range that matches the base material grade and plate thickness value; The actual welding heat input is calculated based on the welding current value, welding voltage value, and welding speed value, and it is determined whether the actual welding heat input is within the range of the standard welding heat input. If the actual welding heat input is lower than the lower limit of the standard welding heat input range, the confidence score of the defect type labeled as porosity in the candidate defect sub-region is reduced by a first correction value, and the confidence score of the defect type labeled as non-fusion is increased by a first correction value. If the actual welding heat input is higher than the upper limit of the standard welding heat input range, the confidence score of the defect type labeled as crack in the candidate defect sub-region is increased by a second correction value, and the confidence score of the defect type labeled as porosity is decreased by a second correction value. Defect types whose confidence scores, after adjustment, are below the confidence threshold are marked as pending review.

7. The method for inspecting the quality of steel structure welds based on image recognition according to claim 6, characterized in that, After marking defect type labels with confidence scores below the confidence threshold after confidence score correction as pending review, the following also applies: The real-time welding data record of the steel structure weld during the welding process is obtained, and the real-time welding data record includes the welding current fluctuation curve and the welding voltage fluctuation curve; Extract the timing and magnitude of current abrupt changes from the welding current fluctuation curve, and extract the timing and magnitude of voltage abrupt changes from the welding voltage fluctuation curve; Determine whether the current change moment and the voltage change moment are within the same time window; If they exist within the same time window, the instantaneous heat input deviation at the weld location is calculated based on the current change amplitude and voltage change amplitude. If the instantaneous heat input deviation exceeds the deviation threshold, the defect type label of the candidate defect sub-region corresponding to the weld position to be reviewed in the time window will be corrected to the non-fusion type. The corrected defect type label and the corresponding correction basis are recorded in the remarks field of the weld quality inspection report.

8. The method for inspecting the quality of steel structure welds based on image recognition according to claim 1, characterized in that, Before generating the weld quality inspection report for the steel structure welds, the following steps are also included: The spatial positions of the candidate defect sub-regions in the weld area image are mapped back to the three-dimensional spatial coordinates of the steel structure weld to obtain the actual spatial position coordinates of each candidate defect sub-region. Based on the defect type label and actual spatial coordinates of each candidate defect sub-region, determine whether the spatial distance between multiple candidate defect sub-regions corresponding to the same type of defect label in three-dimensional space is less than the clustering distance threshold. If the distance is less than the clustering distance threshold, the multiple candidate defect sub-regions are merged into the same continuous defect region, and the continuous region length, continuous region width, and continuous region orientation of the merged continuous defect region in three-dimensional space are extracted. Calculate the ratio of the length to the width of the continuous region to obtain the aspect ratio of the defective continuous region; Obtain the weld trajectory planning data of the steel structure weld; Based on the weld trajectory planning data, the weld axis direction at the spatial location of the defect continuity region is obtained; Calculate the angle between the direction of the continuous region and the direction of the weld axis; If the aspect ratio exceeds the strip defect morphology threshold and the included angle is less than the included angle threshold, then the defect severity level of the continuous defect region will be increased by one level. If the aspect ratio does not exceed the strip defect morphology threshold or the included angle is not less than the included angle threshold, the defect severity level of the continuous defect region remains unchanged.

9. The method for inspecting the quality of steel structure welds based on image recognition according to claim 8, characterized in that, The recalculated and merged contiguous defect regions in three-dimensional space include the following orientations: Extract the set of spatial coordinates of all pixels in the three-dimensional space of the merged defect continuous region, and perform principal component analysis on the set of spatial coordinates to obtain the first principal component direction vector; Calculate the projection direction vector of the first principal component direction vector onto the weld section plane of the steel structure weld, and use the projection direction vector as the direction of the continuous region.

10. A steel structure weld quality inspection system based on image recognition, characterized in that, include: The image acquisition module is used to acquire the original detection image sequence of the steel structure weld, which includes weld surface images and weld X-ray transmission images acquired from multiple angles. The region segmentation module is used to perform image preprocessing on the original detection image sequence, extract the weld area image, and segment multiple candidate defect sub-regions from the weld area image; The defect identification module is used to input the candidate defect sub-regions into the defect identification network for feature extraction and classification, and output the defect type label and confidence score of each candidate defect sub-region. The defect type labels include crack, porosity and incomplete fusion. The result generation module is used to annotate the defect location of the weld area image according to the defect type label and confidence score, and generate intermediate detection results containing a defect annotation layer and a defect attribute list. The process verification module is used to obtain the welding process parameters and base material information corresponding to the steel structure weld, and to perform welding process rationality verification on the defect type label based on the welding process parameters and base material information, and to mark the defect type label with verification conflict as pending review. The report output module is used to generate a weld quality inspection report for the steel structure welds based on the intermediate inspection results and the verified defect type labels.