Steel structure welding quality inspection method and storage medium

By generating annotated welding defect images and combining with multi-task neural networks for data processing, the subjectivity and robustness of traditional steel structure welding quality detection is solved, and efficient and intelligent welding defect identification and evaluation is achieved.

CN120219374BActive Publication Date: 2025-08-26SHANGHAI CONSTRUCTION GROUP CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510678370.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-26
Publication Date
2025-08-26
Estimated Expiration
2045-05-26

AI Technical Summary

Technical Problem

The traditional steel structure welding quality detection method relies on manual visual inspection, which has strong subjectivity, low detection efficiency, and limited evaluation accuracy. The existing automated detection technology is poorly robust in the recognition of complex welding defect morphology, poor feature description, and limited expansion and applicability.

Method used

By obtaining the weld area images of the real steel structure without labels from the image acquisition device, generating synthetic images with labeled welding defect types and locations, performing semantic segmentation and multimodal pre-training, data processing using generative models and multitask neural networks, generating deformable mesh, combining conditional control loss functions and microsurface theory for geometric constraints, and finally welding defect detection and evaluation are performed through the multitask neural network IDN.

Benefits of technology

Efficient and intelligent welding quality inspection is achieved, reducing dependence on labeled data, improving the robustness and detection accuracy of welding defect recognition, and improving the intelligence level of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219374B_ABST
    Figure CN120219374B_ABST
Patent Text Reader

Abstract

The present invention provides a steel structure welding quality inspection method and storage medium, comprising: generating a composite image #imgabs1# annotated with the type and location of welding defects based on an unlabeled real steel structure welding area image #imgabs0#; merging the real steel structure welding image #imgabs2# and the composite image #imgabs3# annotated with the type and location of welding defects into a steel structure welding image set #imgabs4#; performing data processing on the steel structure welding image set #imgabs5# to generate a deformable mesh #imgabs6# matching the welding defect type and a preprocessed image set #imgabs7#; and inputting the preprocessed image set #imgabs8# into a pretrained construction engineering steel structure welding defect detection model to output welding defect features for the weld area. The present invention provides a steel structure welding quality inspection method with low data dependence, strong welding defect recognition robustness, and a high degree of intelligence, thereby improving the intelligent level of construction engineering steel structure welding quality inspection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of steel structure welding quality detection in construction engineering, and in particular relates to a steel structure welding quality detection method and a storage medium. Background Art

[0002] The welding area is a potential failure point of steel structures in construction projects. During the welding process, local heating and cooling of the material lead to uneven thermal expansion and cooling contraction in the welding area, which may cause welding defects at the welds, and then cause problems such as a decrease in the mechanical properties of the welded area of ​​the steel structure. Therefore, it is necessary to inspect the welding quality of steel structures in construction projects. Traditional steel structure welding quality inspection mainly relies on manual visual inspection and experience judgment, which has shortcomings such as strong subjectivity, low inspection efficiency, and limited evaluation accuracy. At present, there are some technical solutions for welding quality inspection of steel structures in construction projects. For example, magnetic powder, ultrasonic and other steel structure weld inspection systems have the characteristics of strong intuitiveness, high sensitivity, and non-destructive testing, but the inspection process still requires the full participation of operators, and the problem of manpower and equipment costs is not solved.

[0003] In addition, there are also weld quality inspection methods based on image processing and traditional computer vision technology. These methods use cameras and other devices to capture images of the weld area, perform grayscale and gridding on the images, and then use computer vision technology to compare the optimized grayscale images or unit blocks with preset standard images to achieve steel structure welding quality inspection. However, this technical approach still has the following shortcomings: it relies on high-quality, authentic steel structure welding defect data, which makes it difficult to establish a preset standard image library; the feature extraction method used performs poorly when faced with complex welding defect morphologies, and the feature description has poor robustness; the welding quality assessment uses a static algorithm to adjust parameters, which limits the overall scalability and applicability of the technology. Summary of the Invention

[0004] The purpose of the present invention is to provide a steel structure welding quality detection method and storage medium.

[0005] To solve the above problems, the present invention provides a method for detecting the welding quality of steel structures, the method comprising:

[0006] Acquire several unlabeled images of the real steel structure welding area from the image acquisition device ;

[0007] Real welding area image of steel structure based on unlabeled , generating a composite image with the type and location of weld defects annotated ;Real steel structure welding image Composite image with weld defect type and location annotated Merge into steel structure welding image set ;

[0008] Image set of welding on steel structures Perform data processing to generate a deformable mesh that matches the type of welding defect , and preprocessed image sets ;

[0009] The preprocessed image set Input a pre-trained construction engineering steel structure welding defect detection model to output welding defect features in the weld area;

[0010] By comparing the welding defect characteristics of the weld area with the preset standard defect database, the type, location and physical size of the welding defects output by the detection model are annotated on the real steel structure welding image. superior.

[0011] Furthermore, in the above method, based on the unlabeled real welding area image of the steel structure , generating a composite image with the type and location of weld defects annotated ,include:

[0012] The obtained unlabeled real steel structure welding area image , perform semantic segmentation to generate weld seam partial masks To accurately distinguish the weld area in the steel structure welding image and parent material , based on the weld area , calculate the mask coverage ; Based on mask coverage , evaluate the degree of weld area recognition, when the mask coverage Less than the preset weld recognition threshold When , the image is removed.

[0013] ;

[0014] in, W This is an unlabeled image of the real steel structure welding area The pixel width, H This is an unlabeled image of the real steel structure welding area Pixel height;

[0015] right Greater than or equal to the preset weld recognition threshold Unlabeled real steel structure welding area image , using a multimodal pre-training model to predict the weld area Perform prompt word reverse deduction to obtain the prompt word reverse deduction result;

[0016] Based on the result of the back-inference of the prompt word, the type label of the welding defect and the weld part mask are combined. 3.

[0017] Weld seam partial mask based on the associated defect class label and insert the rank in the generative model LoRA layer, training objective function ; Using the objective function Control and adjust the image generated by the generative model training; and use the conditional control loss function and the weld partial mask Combined with geometric constraints, different types of welding defects in the training generated images are controlled to appear only in the weld area, that is, a synthetic image with the type and location of the welding defect marked is obtained. ,

[0018] ;

[0019] in, is the target noise, which is a training process variable; is the noise estimate, is the time step, is the time step The latent variables at Label the type of welding defect; is the regularization parameter, is the total variation regularization term of the mask; Images generated for training, i.e., synthetic images with the type and location of welding defects annotated;

[0020] Real steel structure welding images Composite image with the type and location of weld defects noted , merged into a steel structure welding image set .

[0021] Furthermore, in the above method, the obtained unlabeled real steel structure welding area image , perform semantic segmentation, including:

[0022] Using superpixel segmentation algorithm (such as improved SLIC), the unlabeled real steel structure welding area image is For semantic segmentation, the superpixel block merging method is:

[0023] ;

[0024] ;

[0025] in, is the metric for the merging decision, is the color distance between superpixel blocks, is the Euclidean distance between superpixel blocks, and are the corresponding standard deviations; is the preset segmentation threshold, As the basic threshold, for steel structures in construction projects, it can be 0.8~1.2. is the scaling factor, is the image complexity factor, which is calculated by the gray-level co-occurrence matrix (GLCM) considering contrast, energy, and entropy.

[0026] Furthermore, in the above method, the training objective function ,include:

[0027] In the objective function Introducing anisotropy Item, constrained training to generate images Smoothness within the mask region of :

[0028] ;

[0029] in, is the horizontal gradient operator, is the vertical gradient operator; anisotropy The term suppresses training generated images in the model The jagged artifacts of welding defects are generated while retaining the tortuous shape of the real crack. In addition, the stress concentration factor of the generated crack is It conforms to the laws of elastic fracture mechanics.

[0030] Furthermore, in the above method, the conditional control loss function and the weld partial mask are used. Combine geometric constraints, including:

[0031] Using ControlNet loss function, the weld is partially masked Input ControlNet encoder to generate conditional feature map , and the main branch feature map in the generative model Perform channel weighted fusion:

[0032] ;

[0033] in, and is the weight matrix, is the Sigmoid activation function.

[0034] Furthermore, in the above method, the conditional control loss function is used to determine the weld seam partial mask ( In combination with geometric constraints, it also includes:

[0035] Based on the microsurface theory, random sampling of unlabeled real welding area images of steel structures is performed during the image generation stage. Surface roughness and metalness ; Based on surface roughness and metalness , for the annotated steel structure real welding area image Calculate light reflection characteristics for each pixel , based on the light reflection characteristics of each pixel The generated image , to control the images generated by training to be more physically reasonable:

[0036] ;

[0037] in, is the normal distribution function, is the Fresnel term, In order to consider the model of the reduction of effective light caused by mutual occlusion between micro surfaces, is the surface normal of the object, is the incident light direction, For the viewing direction, is a half-angle vector; Indicates the direction of incident light, that is, the direction in which the light strikes the surface of the object; Indicates the direction of the outgoing light, that is, the direction in which the light is emitted after being reflected from the surface of the object.

[0038] Furthermore, in the above method, the steel structure welding image set Perform data processing to generate a deformable mesh that matches the type of welding defect , and preprocessed image sets ,include:

[0039] Image set of welding on steel structures The image in the CIE-Lad space is decoupled to separate the brightness information and the chromaticity information; based on the brightness information, L Channel; based on chromaticity information a and b aisle;

[0040] Introducing the parameters of the nonlinear gamma function right L Channel correction to reduce the impact of ambient lighting:

[0041] ;

[0042] right a and b The channel performs color balancing to eliminate the interference of ambient color temperature on the weld image;

[0043] Based on the corrected L After channel and chroma equalization a and b channel to obtain a rectified image; an initial uniform grid is established in a virtual coordinate system based on the rectified image, where the grid unit size is 8×8 pixels;

[0044] Calculate the grayscale gradient covariance matrix for each grid unit in the initial uniform grid ; Based on the gray gradient covariance matrix within each grid unit , with the grid deformation energy function Optimize the mesh vertex coordinates with the minimum goal to make the deformable mesh Match the type of welding defect;

[0045] Deformable Mesh Changes in related parameters and corresponding steel structure welding image set Merge to generate a preprocessed image set .

[0046] Furthermore, in the above method, the parameters of the nonlinear gamma function are introduced right L Channel correction to reduce the impact of ambient lighting, including:

[0047] Adopt dual-factor dynamic gamma adjustment, through the defect density factor D and light influencing factors T Jointly regulate the parameters of the gamma function :

[0048] ;

[0049] ;

[0050] ;

[0051] in, For masks with type labels of solder defects, for L Channel median brightness, is the Gaussian weight function, is the image L channel coordinate The brightness value at ; e is a natural constant; is the hyperbolic tangent function.

[0052] Furthermore, in the above method, a and b The channels are chromatically balanced to eliminate the interference of ambient color temperature on the weld image, ensuring that the defect detection process relies solely on the physical features in the weld image, including:

[0053] Perform statistical normalization on the chromaticity channel values ​​a and b to eliminate color temperature offset:

[0054] ;

[0055] ;

[0056] in, and are the mean and standard deviation of the input image channels, and is the corresponding chromaticity statistical parameter under standard illumination, a and b are the chromaticity channel values ​​in the image color space.

[0057] Furthermore, in the above method, the grid deformation energy function use:

[0058] ;

[0059] in, is the total number of grids, 、 and is the weight coefficient, Used to constrain the smoothness of the chroma channel and avoid noise interference; Used to prevent the mesh from being adjusted too large, the final mesh vertex displacement value is:

[0060] ;

[0061] in, and are the displacements of the mesh vertices respectively.

[0062] Furthermore, in the above method, the preprocessed image set Input a pre-trained steel structure welding defect detection model for construction engineering to output welding defect features in the weld area, including:

[0063] The construction engineering steel structure welding defect detection model is set up, which includes a multi-task neural network IDN, which includes three sub-tasks: defect detection, defect quantification and feature alignment; the construction engineering steel structure welding defect detection model adopts a weighted multi-task loss function :

[0064] ;

[0065] in, 、 and are weight coefficients, is the defect detection loss, Quantify the cost for defects, is the feature alignment loss; weight coefficient 、 and Based on the subtask priority, the initial values ​​are set to 1.0, 0.5, and 0.2, respectively. During the training process of the steel structure welding defect detection model for construction engineering, the weight value is dynamically adjusted by monitoring the degree of loss of each subtask to prevent a single subtask from dominating the training process:

[0066] ;

[0067] in, The cumulative loss mean of a single subtask;

[0068] Apply deformable convolution to the feature extraction layer of the multi-task neural network IDN backbone network, accepting deformable grid The changes in relevant parameters As an offset for deformable convolution;

[0069] The backbone network of the multi-task neural network IDN is obtained from the pre-processed image set The feature maps extracted are shared by the task heads of the three subtasks of defect detection, defect quantification and feature alignment of the multi-task neural network IDN;

[0070] The losses of the task heads of the three subtasks of defect detection, defect quantification and feature alignment are back-propagated simultaneously, continuously adjusting the parameters of the multi-task neural network (IDN) and jointly updating the weights of the backbone network, forcing the model to focus on the consistency of local details, global morphology and physical features of the defects; regional welding defect features include: the type of welding defects detected and identified, location information and physical parameters of the defects.

[0071] Furthermore, in the above method, the deformable mesh is accepted The changes in relevant parameters As an offset for the deformable convolution, it includes:

[0072] Deformable Mesh The changes in relevant parameters As a priori knowledge, it guides the offset direction of the convolution kernel. For a single sampling point of the convolution kernel, the offset calculation method is:

[0073] ;

[0074] in, is the x-direction offset, is a deformable mesh The parameter change in the x direction, is the size of the feature map extracted by the backbone network in the x direction, is the change in the relevant parameters Dimension in the x direction; is the y-direction offset, is the parameter change in the y direction, 、 They are feature maps and related parameter changes respectively The size in the y direction.

[0075] Furthermore, in the above method, the defect detection loss function To ensure the model accurately classifies defect types and locates their locations:

[0076] ;

[0077] ;

[0078] ;

[0079] in, is the classification loss function, is the category weight, is the model’s predicted probability for the positive category, Used to suppress the gradient of easily classified samples; is the positioning loss function, Used to measure the degree of boundary overlap, is the Euclidean distance, is the minimum closed region diagonal length, is the preset parameter, is the aspect ratio penalty; and is the weighting coefficient.

[0080] Furthermore, in the above method, the defect quantification loss function The quantization parameters As the threshold boundary, maintain a smooth transition between qualified and unqualified sample areas:

[0081] ;

[0082] in, is the physical characteristic value of the defect predicted by the model, For the control parameters, .

[0083] Furthermore, in the above method, the feature alignment loss function , using cosine similarity loss based on HOG and LBP:

[0084] ;

[0085] in, is a feature extraction function used to capture the texture and geometric characteristics of welding defects; The mesh features corresponding to the welding defect area are predicted for the model. It is the mesh feature of the preset standard welding defect area.

[0086] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the processor is caused to execute any of the above methods.

[0087] Compared with the prior art, the present invention obtains several unlabeled images of the real steel structure welding area from the image acquisition device. ; Based on the real welding area image of steel structure without annotation , generating a composite image with the type and location of weld defects annotated ;Real steel structure welding image Composite image with weld defect type and location annotated Merge into steel structure welding image set ; Execute physical enhancement image preprocessing process, through multi-spectral optimization and spatial transformation, to improve the quality of steel structure welding image collection; Perform data processing to generate a deformable mesh that matches the type of welding defect , and preprocessed image sets ; Preprocess the image set Input the pre-trained construction engineering steel structure welding defect detection model to output the welding defect characteristics of the weld area, including: the type of welding defect detected and identified, location information and physical parameters of the defect; by comparing the welding defect characteristics of the weld area with the preset standard defect database, the type, location and physical size information of the welding defect output by the detection model is annotated on the real steel structure welding image The present invention is a steel structure welding quality detection method with low data dependence, strong welding defect recognition robustness and high intelligence, which can improve the intelligence level of steel structure welding quality detection in construction projects. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] Figure 1 This is a flow chart of a steel structure welding quality inspection method based on generative artificial intelligence according to an embodiment of the present invention;

[0089] Figure 2 A steel structure welding image set according to an embodiment of the present invention The generated example graph;

[0090] Figure 3 This is an example diagram of steel structure welding image preprocessing according to an embodiment of the present invention;

[0091] Figure 4 This is an example diagram of steel structure welding defect detection and identification according to an embodiment of the present invention;

[0092] Figure 5 This is an architectural diagram of a steel structure welding quality inspection system using generative artificial intelligence according to an embodiment of the present invention. DETAILED DESCRIPTION

[0093] The present invention is further described in detail below with reference to the accompanying drawings.

[0094] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPUs), input / output interfaces, network interfaces and memories.

[0095] Memory may include non-permanent storage in a computer-readable medium, in the form of random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0096] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can be implemented using any method or technology for information storage. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.

[0097] like Figure 1 As shown, the present invention provides a steel structure welding quality detection method, comprising:

[0098] Step S1, obtaining image information of the steel structure welding area:

[0099] Acquire several unlabeled images of the real steel structure welding area from the image acquisition device ;

[0100] Here, the image acquisition device is such as a camera, a still camera, etc.

[0101] Step S2, generation of steel structure welding image set:

[0102] Real welding area image of steel structure based on unlabeled , generating a composite image with the type and location of weld defects annotated ;Real steel structure welding image Composite image with weld defect type and location annotated Merge into steel structure welding image set ;

[0103] Here, based on the unlabeled real welding area image of the steel structure , generating a composite image with weld defect locations marked , is based on the real welding area image of the steel structure without annotations , generating synthetic images that conform to physical laws and accurately mark welding defect types and locations ;

[0104] Preferably, Figure 2As shown, step S2, based on the unlabeled real welding area image of the steel structure , generating a composite image with the type and location of weld defects annotated ,include:

[0105] Step S21, the obtained unlabeled real steel structure welding area image , perform semantic segmentation to generate weld seam partial masks To accurately distinguish the weld area in the steel structure welding image and parent material , based on the weld area , calculate the mask coverage ; Based on mask coverage , evaluate the degree of weld area recognition, when the mask coverage Less than the preset weld recognition threshold , the image is discarded and labeled as “low quality”.

[0106] ;

[0107] in W This is an unlabeled image of the real steel structure welding area The pixel width, H This is an unlabeled image of the real steel structure welding area The pixel height of the .

[0108] Step S22: Greater than or equal to the preset weld recognition threshold Unlabeled real steel structure welding area image , using a multimodal pre-training model to predict the weld area Perform prompt word reverse deduction to obtain the prompt word reverse deduction result;

[0109] Here, the multimodal pre-training model is such as the CLIP model;

[0110] Step S23: Based on the result of the prompt word reverse deduction, the type label of the welding defect and the weld part mask are 3.

[0111] Here, the defect category label can be preset according to the technical requirements of the actual project;

[0112] Step S24, based on the weld seam portion mask associated with the defect category label and insert the rank in the generative model LoRA layer, training objective function ; Using the objective function Control and adjust the image generated by the generative model training; and use the conditional control loss function and the weld partial mask Combined with geometric constraints, different types of welding defects in the training generated images are controlled to appear only in the weld area, that is, a synthetic image with the type and location of the welding defect marked is obtained. .

[0113] ;

[0114] in, is the target noise, which is a training process variable; is the noise estimate, is the time step, is the time step The latent variables at Label the type of welding defect; is the regularization parameter, is the total variation regularization term of the mask; Images generated for training, i.e., synthetic images with the type and location of welding defects annotated.

[0115] Here, the generative model is such as Stable Diffusion, etc.; the conditional control loss function is such as ControlNet, etc.; the types of welding defects include: various irregular welding defects such as cracks, non-uniform pores, etc.

[0116] Step S25: the real steel structure welding image Composite image with the type and location of weld defects noted , merged into a steel structure welding image set .

[0117] Here, the types of welding defects include: various irregular welding defects such as cracks, non-uniform pores, etc.

[0118] Step S3, steel structure welding image preprocessing:

[0119] Perform physical enhancement image preprocessing (PAP) process to optimize the steel structure welding image set through multi-spectral optimization and spatial transformation. Perform data processing to ultimately generate a deformable mesh that closely matches the type of welding defect , and preprocessed image sets .

[0120] Preferably, Figure 3 As shown, step S3 includes:

[0121] Step S31: steel structure welding image collection The image in the CIE-Lad space is decoupled to separate the brightness information and the chromaticity information; based on the brightness information, L Channel; based on chromaticity information a and b channels to avoid cross-information interference.

[0122] Step S32, introducing the parameters of the nonlinear gamma function right L Channel correction to reduce the impact of ambient lighting:

[0123] ;

[0124] Here, Indicates that the image after gamma correction is at coordinates The brightness value at the position. By performing a gamma transform on the original image's L channel (representing brightness), the impact of ambient lighting on image brightness is reduced, making the image brightness distribution more reasonable and helping to more clearly present image details. For example, key information such as welding defects in steel structure welding images can be highlighted.

[0125] is the original image at coordinates The brightness value at the position, are the parameters of the gamma function, Indicates the original brightness value Perform power operation transformation according to the gamma function rule to obtain the corrected brightness value, that is, , in order to achieve the adjustment and optimization of image brightness.

[0126] Step S33: a and b The channels are chromatically equalized to eliminate the interference of ambient color temperature on the weld image, ensuring that the defect detection step relies only on the physical features in the weld image.

[0127] Step S34, based on the corrected L After channel and chroma equalization a and b channel to obtain a rectified image; an initial uniform grid is established in a virtual coordinate system based on the rectified image, where the grid unit size is 8×8 pixels;

[0128] Step S35, calculate the gray gradient covariance matrix of each grid unit in the initial uniform grid ; Based on the gray gradient covariance matrix within each grid unit , with the grid deformation energy function Optimize the mesh vertex coordinates with the minimum goal, so that the final deformable mesh Highly matches the type of welding defect.

[0129] Here, the types of welding defects include: various irregular welding defects such as cracks, non-uniform pores, etc. Final deformable mesh Highly adaptable to the types of irregular welding defects.

[0130] Step S36: transform the deformable grid Changes in related parameters and corresponding steel structure welding image set Merge to generate a preprocessed image set .

[0131] Here, the deformable mesh The changes in relevant parameters The changes in parameters such as mesh vertex coordinates from the initial uniform mesh to the final deformable mesh are recorded. These changes are intended to make the mesh highly adaptable to irregular welding defects (such as cracks, non-uniform pores, etc.) in the welding image.

[0132] When merging, mapping can be performed based on coordinates; deformable meshes Records the changes in parameters such as mesh vertex coordinates , these changes can be Mapped to the corresponding steel structure welding image set in the coordinate system of .

[0133] Step S4, steel structure welding defect detection and identification:

[0134] The preprocessed image set Input a pre-trained construction engineering steel structure welding defect detection model to output welding defect characteristics in the weld area, including: the detected and identified welding defect type, location information, and defect physical parameters.

[0135] Preferably, before the steel structure welding defect detection and identification, a trained construction engineering steel structure welding defect detection model is also included:

[0136] Step S41 sets up a steel structure welding defect detection model for construction projects, which includes a multi-task neural network IDN (Interpretable Defect Identification Network), including three subtasks: defect detection (locating and classifying steel structure welding defects), defect quantification (calculating physical parameters such as the diameter and length of welding defects), and feature alignment (ensuring that the detected welding defects match the grid features of preset standard defects).

[0137] The steel structure welding defect detection model for construction engineering adopts a weighted multi-task loss function :

[0138] ;

[0139] in, 、 and are weight coefficients, is the defect detection loss, Quantify the cost for defects, is the feature alignment loss; weight coefficient 、 and Based on the subtask priority, the initial values ​​are set to 1.0, 0.5, and 0.2, respectively. During the training process of the steel structure welding defect detection model for construction engineering, the weight value is dynamically adjusted by monitoring the degree of loss of each subtask to prevent a single subtask from dominating the training process:

[0140] ;

[0141] in, is the mean cumulative loss of a single subtask.

[0142] Step S42, as Figure 4 As shown, the deformable convolution is applied to the feature extraction layer of the multi-task neural network IDN backbone network (Backbone), accepting the deformable grid The changes in relevant parameters As an offset for deformable convolution, it can effectively improve the speed of defect detection.

[0143] Step S43, the backbone network of the multi-task neural network IDN is trained from the pre-processed image set The feature maps extracted are shared by the task heads of the three subtasks of defect detection, defect quantification and feature alignment of the multi-task neural network IDN to improve data utilization.

[0144] In step S44, the losses of the task heads of the three subtasks of defect detection, defect quantification and feature alignment are back-propagated simultaneously, the parameters of the multi-task neural network IDN are continuously adjusted, and the weights of the backbone network are jointly updated, forcing the model to focus on the consistency of the local details, global morphology and physical features of the defects, thereby improving the interpretability of the detection results and obtaining a pre-trained steel structure welding defect detection model for construction projects.

[0145] During training, the parameters of the multi-task neural network (IDN), including the backbone network weights, are continuously adjusted by simultaneously backpropagating the losses of the three task heads: defect detection, defect quantification, and feature alignment. This allows the model to learn how to better focus on the consistency of local defect details, global morphology, and physical features, thereby improving the model's detection performance and the interpretability of the test results.

[0146] Step S5, steel structure welding quality assessment:

[0147] By comparing the welding defect characteristics of the weld area with the preset standard defect database, the type, location and physical size of the welding defects output by the detection model are annotated on the real steel structure welding image. Based on the real steel structure welding image The type, location and physical size of welding defects are marked on the steel structure, and a steel structure welding quality inspection report is generated, and the number and size range of a certain type of welding defects are counted.

[0148] In particular, in step S2, the following methods can be used for image semantic segmentation and objective function Training and geometric constraints:

[0149] Step S21, the obtained unlabeled real steel structure welding area image , perform semantic segmentation, including:

[0150] Using superpixel segmentation algorithms such as the improved SLIC (Simple Linear Iterative Clustering), the unlabeled real steel structure welding area image is Semantic segmentation can be performed to avoid lighting-sensitive welding defects in the real welding image from being mistakenly ignored. The superpixel block merging method is:

[0151] ;

[0152] ;

[0153] in, is the metric for the merging decision, is the color distance between superpixel blocks, is the Euclidean distance between superpixel blocks, and are the corresponding standard deviations; is the preset segmentation threshold, As the basic threshold, for steel structures in construction projects, it can be 0.8~1.2. is the scaling factor, is the image complexity factor, which is calculated by the gray-level co-occurrence matrix (GLCM) considering contrast, energy and entropy. This method can generate a high-precision binary mask of the weld area through color-texture dual constraints. .

[0154] Step S24, training objective function ,include:

[0155] In the objective function Introducing anisotropy Item, constrained training to generate images Smoothness within the mask region of :

[0156] ;

[0157] in, is the horizontal gradient operator, is the vertical gradient operator; anisotropy The term suppresses training generated images in the model The jagged artifacts of welding defects are generated while retaining the tortuous shape of the real crack. In addition, the stress concentration factor of the generated crack is It conforms to the laws of elastic fracture mechanics.

[0158] Step S24, using the conditional control loss function and the weld seam partial mask ( Combine geometric constraints, including:

[0159] Using ControlNet loss function, the weld is partially masked Input ControlNet encoder to generate conditional feature map , and the main branch feature map in the generative model Perform channel weighted fusion:

[0160] ;

[0161] in, and is the weight matrix, is the Sigmoid activation function.

[0162] Preferably, step S24, using the conditional control loss function and the weld partial mask In combination with geometric constraints, it also includes:

[0163] Step S25: Based on the microsurface theory, randomly sample the unlabeled real welding area image of the steel structure in the image generation stage. Surface roughness and metalness ; Based on surface roughness and metalness , for the annotated steel structure real welding area image Calculate the light reflection characteristics for each pixel , based on the light reflection characteristics of each pixel The generated image , to control the images generated by training to be more physically reasonable:

[0164] ;

[0165] in, is the normal distribution function, is the Fresnel term (the reflectivity of light changes at different incident angles), In order to consider the model of the reduction of effective light caused by mutual occlusion between micro surfaces, is the surface normal of the object, is the incident light direction, For the viewing direction, is a half-angle vector.

[0166] Here, the ControlNet function can execute multiple constraint modules simultaneously. Here, additional constraint modules are activated in the ControlNet function based on microsurface-related formulas.

[0167] surface roughness and metalness Surface roughness is an important material property parameter of an object's surface. Surface roughness affects the scattering of light on microsurfaces. Rough surfaces scatter light more severely, while smooth surfaces reflect light more regularly. Metallicity determines the material's reflection and absorption properties. Metallic materials have high reflectivity, while non-metallic materials absorb or refract light at a greater rate. Random sampling of these parameters provides basic material information about the microsurface at each pixel's location, enabling the subsequent calculation of its light reflection properties.

[0168] It is the Bidirectional Reflectance Distribution Function (BRDF), which is used to describe the reflection characteristics of light on the surface of an object.

[0169] Indicates the direction of incident light, that is, the direction in which the light strikes the surface of the object;

[0170] Indicates the direction of the outgoing light, that is, the direction in which the light is emitted after being reflected from the surface of the object.

[0171] In formulas for calculating light reflection characteristics, such as the bidirectional reflectance distribution function In related calculations, surface roughness and metalness It will affect the value of some functions. For example, surface roughness will affect the normal distribution function , which in turn affects the calculation results of the overall light reflection; metalness Fresnel It takes effect and changes the reflectivity calculation of light at different incident angles.

[0172] In particular, in step S3, the following methods can be used for gamma adjustment, chroma equalization, and deformable grid generation:

[0173] Step S32, introducing the parameters of the nonlinear gamma function right L Channel correction to reduce the impact of ambient lighting, including:

[0174] Adopt dual-factor dynamic gamma adjustment, through the defect density factor D and light influencing factors T Jointly regulate the parameters of the gamma function , achieving the effect of enhancing defect-sensitive areas and suppressing highlight areas:

[0175] ;

[0176] ;

[0177] ;

[0178] in, For masks with type labels of solder defects, for L Channel median brightness, is the Gaussian weight function.

[0179] Here, is the mask with the type label of the solder defect, which is obtained by summing it with the total mask The summed results are divided to obtain the relative density of the defects in the image, which reflects the degree of defect distribution.

[0180] is the image L channel (brightness channel) coordinate The brightness value, is the median brightness of the L channel, is the Gaussian weight function.

[0181] ;

[0182] First, the difference between the brightness of each pixel and the median brightness is calculated and weighted, and then the median is taken to measure the impact of uneven lighting on the image.

[0183] e is a natural constant; It is the hyperbolic tangent function.

[0184] Step S33: a and b The channels are chromatically balanced to eliminate the interference of ambient color temperature on the weld image, ensuring that the defect detection process relies solely on the physical features in the weld image, including:

[0185] Perform statistical normalization on the chromaticity channel values ​​a and b to eliminate color temperature offset:

[0186] ;

[0187] ;

[0188] in, and are the mean and standard deviation of the input image channels, and is the corresponding chromaticity statistical parameter under standard illumination.

[0189] Here, a and b are the chromaticity channel values ​​in the image color space. Typically, in a Lab color space, L represents the lightness channel, the a channel represents the color components from green to red, and the b channel represents the color components from blue to yellow.

[0190] In step S35, the grid deformation energy function use:

[0191] ;

[0192] in, is the total number of grids, 、 and is the weight coefficient, Used to constrain the smoothness of the chroma channel and avoid noise interference; Used to prevent the mesh from being adjusted too large, the final mesh vertex displacement value is:

[0193] ;

[0194] in, and are the displacements of the mesh vertices respectively.

[0195] In particular, in step S4, the following method is used to determine the deformable convolution offset, defect detection loss, defect quantization loss, and feature alignment loss:

[0196] Step S42: Accept the deformable mesh The changes in relevant parameters As an offset for the deformable convolution, it includes:

[0197] Deformable Mesh The changes in relevant parameters As a priori knowledge, it guides the offset direction of the convolution kernel. For a single sampling point of the convolution kernel, the offset calculation method is:

[0198] ;

[0199] in, and is the feature map size extracted by the backbone network, and is the change of relevant parameters size.

[0200] Here, is the x-direction offset, is a deformable mesh The parameter change in the x direction, is the size of the feature map extracted by the backbone network in the x direction, is the change in the relevant parameters The size in the x direction. The offset of each sampling point of the convolution kernel in the x direction is obtained by scaling the grid parameter change according to the ratio of the feature map and the grid size. is the y-direction offset, is the parameter change in the y direction, 、 They are feature maps and related parameter changes respectively The grid parameter's size in the y-direction works the same way as in the x-direction and is used to determine the y-direction offset of the convolution kernel's sampling points. This allows the kernel to more accurately sample the image based on the calculated offset, improving the ability to extract target features such as weld defects.

[0201] In step S41, the defect detection loss function To ensure the model accurately classifies defect types and locates their locations:

[0202] ;

[0203] ;

[0204] ;

[0205] in, is the classification loss function (Focal Loss), is the category weight, is the model’s predicted probability for the positive category, Used to suppress the gradient of easily classified samples; is the positioning loss function (CIoU Loss), Used to measure the degree of boundary overlap, is the Euclidean distance, is the minimum closed region diagonal length, is the preset parameter, is the aspect ratio penalty; and is the weighting coefficient.

[0206] In step S41, the defect quantization function By quantization parameters Constrain the model so that the physical characteristics of the defects predicted by the model are more consistent with the actual laws.

[0207] Quantization parameters It is determined according to the current national standard GB50661-2011 "Steel Structure Welding Code", such as pore diameter, crack length, etc.

[0208] Defect quantification loss function The quantization parameters As the threshold boundary, maintain a smooth transition between qualified and unqualified sample areas:

[0209] ;

[0210] in, is the physical characteristic value of the defect predicted by the model, is the control parameter, .

[0211] Here, as the predicted value exceeds the threshold , the loss increases exponentially, and Continue to control the growth rate of losses, reflecting that the higher the degree of non-compliance, the greater the losses.

[0212] In step S41, feature alignment can solve the problem of "black box" decision-making in traditional deep learning models and improve the credibility and generalization ability of detection results. Feature alignment loss function , using cosine similarity loss based on HOG (Histogram of Oriented Gradients) and LBP (Local Binary Patterns):

[0213] ;

[0214] in, is a feature extraction function used to capture the texture and geometric characteristics of welding defects; The mesh features corresponding to the welding defect area are predicted for the model. It is the mesh feature of the preset standard welding defect area.

[0215] The present invention is a steel structure welding quality detection method with low data dependence, strong welding defect recognition robustness and high intelligence, which can improve the intelligence level of steel structure welding quality detection in construction projects.

[0216] like Figure 5 As shown in the figure, the steel structure welding quality inspection system based on generative artificial intelligence has the following system structure: Figure 5 As shown, it is characterized in that the system includes the following core modules:

[0217] An image acquisition module is used to acquire an image of the steel structure welding area obtained by an image acquisition device;

[0218] Welding defect data generation module, namely the Generative Steel Structure Welding Defect Data Engine (GDE), which can generate physically reasonable steel structure welding area defect images based on improved generative models (such as Stable Diffusion) and merge real steel structure welding images and training generated images , forming a steel structure welding image set .

[0219] Image preprocessing module, which can perform physical enhanced image preprocessing (PAP) on steel structure welding image collection Data processing, including L Channel gamma correction and a / b Channel color equalization; generate a deformable mesh covering the weld area in a virtual coordinate system , get the preprocessed image set .

[0220] The defect detection module, based on the Interpretable Defect Recognition Network (IDN), performs welding defect detection and recognition on the preprocessed image data.

[0221] The quality assessment module performs quantitative evaluation on the results of defect detection and outputs a test report that meets the process standards of construction engineering. The report provides an assessment of the welding quality of the weld area of ​​the steel structure.

[0222] The detailed contents of the various device embodiments of the present invention can be found in the corresponding parts of the various method embodiments, which will not be repeated here.

[0223] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

[0224] It should be noted that the present invention may be implemented in software and / or a combination of software and hardware, for example, using an application-specific integrated circuit (ASIC), a general-purpose computer, or any other similar hardware device. In one embodiment, the software program of the present invention may be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present invention (including related data structures) may be stored in a computer-readable recording medium, such as a RAM memory, a magnetic or optical drive, a floppy disk, or the like. In addition, some steps or functions of the present invention may be implemented in hardware, for example, as circuitry that cooperates with a processor to perform the various steps or functions.

[0225] In addition, a portion of the present invention may be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. The program instructions for calling the method of the present invention may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-carrying medium, and / or stored in a working memory of a computer device that operates according to the program instructions. Here, according to one embodiment of the present invention, a device is included, which includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein, when the computer program instructions are executed by the processor, the device is triggered to operate based on the aforementioned methods and / or technical solutions according to multiple embodiments of the present invention.

[0226] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the invention is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalents of the claims be encompassed within the present invention. Any figure marks in the claims should not be regarded as limiting the claims involved. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim may also be implemented by one unit or device through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.

Claims

1. A method for detecting the welding quality of a steel structure, characterized in that: include: Acquire several unlabeled images of the real steel structure welding area from the image acquisition device I real ; Based on unlabeled real welding area image of steel structure I real , generate a composite image with the type and location of the welding defect marked en ; The real steel structure welding image I real Composite image I with the welding defect type and location marked en Merged into Steel Structure Welding Image Set I com ; Steel structure welding image set I com Perform data processing to generate a deformable mesh G that matches the type of welding defect i,j , and preprocessed image set I pre ; The preprocessed image set I pre Input a pre-trained construction engineering steel structure welding defect detection model to output welding defect features in the weld area; By comparing the welding defect characteristics of the weld area with the preset standard defect database, the type, location and physical size of the welding defect output by the detection model are annotated on the real steel structure welding image I real superior; Steel Structure Welding Image Set I com Perform data processing to generate a deformable mesh G that matches the type of welding defect i,j , and preprocessed image set I pre ,include: A rectified image is obtained based on the rectified L channel and the chroma-equalized a and b channels; an initial uniform grid is established in a virtual coordinate system based on the rectified image, where the grid cell size is 8×8 pixels; Calculate the grayscale gradient covariance matrix C for each grid unit in the initial uniform grid k ; Based on the gray gradient covariance matrix C within each grid unit k , the mesh vertex coordinates are optimized with the goal of minimizing the mesh deformation energy function E(u), so that the deformable mesh G i,j Match the type of welding defect; The deformable mesh G i,j The variation of relevant parameters Δ and the corresponding steel structure welding image set I com Merge to generate preprocessed image set I pre ; The preprocessed image set I pre Input a pre-trained steel structure welding defect detection model for construction engineering to output welding defect features in the weld area, including: Deformable convolution is applied to the feature extraction layer of the multi-task neural network IDN backbone network, accepting the deformable grid G i,j The relevant parameter change Δ is used as the offset of the deformable convolution; The backbone network of the multi-task neural network IDN is obtained from the pre-processed image set I pre The feature maps extracted are shared by the task heads of the three subtasks of defect detection, defect quantification and feature alignment of the multi-task neural network IDN; Regional welding defect characteristics include: the type of welding defect detected and identified, location information and physical parameters of the defect.

2. The steel structure welding quality inspection method according to claim 1, characterized in that: Based on unlabeled real welding area image of steel structure I real , generating a composite image with the type and location of the welding defects marked en ,include: The obtained unlabeled real steel structure welding area image I real , perform semantic segmentation to generate a weld seam partial mask M(x, y) to accurately distinguish the weld seam area A in the steel structure welding image w and parent material part A b , based on the weld area A w , calculate the mask coverage C mask ; Based on mask coverage C mask , evaluate the degree of weld area recognition, when the mask coverage C mask Less than the preset weld recognition threshold C w When , the image is removed. Where W is the unlabeled real steel structure welding area image I real The pixel width of H is the real steel structure welding area image I without annotation real Pixel height; C mask Greater than or equal to the preset weld recognition threshold C w Unlabeled real steel structure welding area image I real , using a multimodal pre-training model, the weld area A w Perform prompt word reverse deduction to obtain the prompt word reverse deduction result; Based on the result of the inverse inference of the prompt word, the type label of the welding defect is associated with the corresponding area of ​​the weld partial mask M(x,y); Based on the corresponding area of ​​the weld partial mask M(x,y) associated with the defect category label, a LoRA layer with rank r=64 is inserted into the generative model to train the objective function L LoRA ; Use the objective function L LoRA Control and adjust the image generated by the generative model training; at the same time, use the conditional control loss function in combination with the weld partial mask M(x, y) to perform geometric constraints to control the different types of welding defects in the training generated image to appear only in the weld area, that is, to obtain a synthetic image I with the type and location of the welding defect marked en , L LoRA =||ε-∈0(z t ,t,c)|| 2 +λ·TV(M(x,y)☉I en ) Among them, ε is the target noise, which is a training process variable; ∈0(z t , t, c) is the noise estimate, t is the time step, z t is the latent variable at time step t, c is the type label of welding defects; λ is the regularization parameter, TV is the regularization term of total variation of mask; I en Images generated for training, i.e., synthetic images with the type and location of welding defects annotated; The real steel structure welding image I real Composite image I with the type and location of welding defects marked en , merged into steel structure welding image set I com .

3. The steel structure welding quality inspection method according to claim 2, characterized in that: The obtained unlabeled real steel structure welding area image I real , perform semantic segmentation, including: The superpixel segmentation algorithm is used to segment the unlabeled real steel structure welding area image I in the HSV color space. real For semantic segmentation, the superpixel block merging method is: i mer =θ base +k·C lima Among them, D mer is the metric value of the merging decision, d c is the color distance between superpixel blocks, d s is the Euclidean distance between superpixel blocks, σ c and σ s are the corresponding standard deviations; θ mer is the preset segmentation threshold, θ base is the basic threshold, which can be 0.8 to 1.2 for steel structures in construction projects, κ is the scaling factor, and C ima is the image complexity factor, which is calculated by the gray-level co-occurrence matrix considering contrast, energy and entropy.

4. The steel structure welding quality inspection method according to claim 2, characterized in that: Training objective function L LoRA ,include: In the objective function L LoRA The anisotropic TV term is introduced to constrain the training to generate image I en Smoothness within the mask region of : in, is the horizontal gradient operator, is the vertical gradient operator; the anisotropic TV term in the model suppresses the training generated image I en It removes the jagged artifacts of weld defects while retaining the tortuous morphology of real cracks.

5. The steel structure welding quality inspection method according to claim 2, characterized in that: The conditional control loss function is combined with the weld partial mask M(x, y) to perform geometric constraints, including: Using the ControlNet loss function, the weld seam mask M(x, y) is input into the ControlNet encoder to generate the conditional feature map F c and the main branch feature map F in the generative model SD Perform channel weighted fusion: F Fusion =σ(W1F SD +W2F c )☉F SD Among them, W1 and W2 are weight matrices, and σ is the Sigmoid activation function.

6. The steel structure welding quality inspection method according to claim 2, characterized in that: While using the conditional control loss function in combination with the weld seam partial mask M(x, y) to perform geometric constraints, it also includes: Based on the microsurface theory, the unlabeled real welding area image of the steel structure is randomly sampled in the image generation stage. real Based on the surface roughness ρ and metalness m, the real welding area image I of the marked steel structure is real Calculate the light reflection characteristics f for each pixel r (ω i ,ω o ), based on the light reflection characteristics of each pixel f r (ω i ,ω o ) to get the generated image I en , to control the images generated by training to be more physically reasonable: Where D(h) is the normal distribution function, F(v, h) is the Fresnel term, G(i, o, h) is a model that considers the reduction of effective light due to mutual occlusion between microsurfaces, n is the surface normal of the object, i is the direction of incident light, o is the viewing direction, and h is the half-angle vector; ω i Indicates the direction of incident light, that is, the direction in which the light is directed toward the surface of the object; ω o Indicates the direction of the outgoing light, that is, the direction in which the light is emitted after being reflected from the surface of the object.

7. The steel structure welding quality inspection method according to claim 2, characterized in that: Steel Structure Welding Image Set I com Perform data processing to generate a deformable mesh G that matches the type of welding defect i,j , and preprocessed image set I pre ,include: Steel Structure Welding Image Set I com The image in the image is decoupled in the CIE-Lad space to separate the luminance information and the chrominance information; the L channel is obtained based on the luminance information; the a and b channels are obtained based on the chrominance information; The parameter γ of the nonlinear gamma function is introduced to correct the L channel to reduce the influence of ambient light: L′(x,y)=L(x,y) 1 / γ ; Perform chromaticity equalization on channels a and b to eliminate the interference of ambient color temperature on the weld image.

8. The steel structure welding quality inspection method according to claim 7, characterized in that: The parameter γ of the nonlinear gamma function is introduced to correct the L channel to reduce the influence of ambient light, including: Using dual-factor dynamic gamma adjustment, the parameter γ of the gamma function is jointly controlled by the defect density factor D and the light influence factor T: D=∑[M defect (x,y)] / ∑[M(x,y)] T=median(|L(x,y)-L mid |·W(x,y)) y=0.8·tanh(D / 0.3)+1.2·(1-e -L / 50 ) Among them, M defect For masks with type labels of solder defects, L mid is the median brightness of the L channel, W(x, y) is the Gaussian weight function, L(x, y) is the brightness value at the coordinate (x, y) of the L channel of the image; e is a natural constant; tanh is the hyperbolic tangent function.

9. The steel structure welding quality inspection method according to claim 7, characterized in that: Perform color balancing on the a and b channels to eliminate the interference of ambient color temperature on the weld image and ensure that the defect detection step relies only on the physical features in the weld image, including: Perform statistical normalization on the chromaticity channel values ​​a and b to eliminate color temperature offset: Among them, μ a and σ a are the mean and standard deviation of the input image channels, μ std and σ std is the corresponding chromaticity statistical parameter under standard illumination, a and b are the chromaticity channel values ​​in the image color space.

10. The steel structure welding quality inspection method according to claim 7, characterized in that: The grid deformation energy function E(u) is: Where N is the total number of grids, w1, w2 and w3 are weight coefficients, Used to constrain the smoothness of the chroma channel and avoid noise interference; ||u k || 2 Used to prevent the mesh from being adjusted too large, the final mesh vertex displacement value is: in k =(in x ,in y )=arg minE(u) Among them, u x and u y are the displacements of the mesh vertices respectively.

11. The steel structure welding quality inspection method according to claim 7, characterized in that: The preprocessed image set I pre Input a pre-trained steel structure welding defect detection model for construction engineering to output welding defect features in the weld area, including: The construction engineering steel structure welding defect detection model includes a multi-task neural network IDN, which includes three sub-tasks: defect detection, defect quantification, and feature alignment. The construction engineering steel structure welding defect detection model adopts a weighted multi-task loss function L total : L total =λ1L de +λ2L re +λ3L id Among them, λ1, λ2 and λ3 are weight coefficients respectively, L de is the defect detection loss function, L re is the defect quantification loss function, L id is the feature alignment loss; the weight coefficients λ1, λ2, and λ3 are initially set to 1.0, 0.5, and 0.2, respectively, based on the subtask priority. During the training of the steel structure welding defect detection model for construction engineering, the weight values ​​are dynamically adjusted by monitoring the degree of loss of each subtask to prevent a single subtask from dominating the training process: in, The cumulative loss mean of a single subtask; The losses of the task heads of the three subtasks of defect detection, defect quantification and feature alignment are back-propagated simultaneously, continuously adjusting the parameters of the multi-task neural network IDN and jointly updating the weights of the backbone network, forcing the model to focus on the consistency of local details of defects, global morphology and physical features.

12. The steel structure welding quality inspection method according to claim 11, characterized in that: Accepts a deformable mesh G i,j The relevant parameter change Δ is used as the offset of the deformable convolution, including: The deformable mesh G i,j The relevant parameter change Δ is used as prior knowledge to guide the offset direction of the convolution kernel. For a single sampling point of the convolution kernel, the offset calculation method is: in, is the x-direction offset, Δ i,j,0 is the deformable mesh G i,j Parameter change in the x direction, W f is the size of the feature map extracted by the backbone network in the x direction, W d is the size of the change in the relevant parameter Δ in the x direction; is the y-direction offset, Δ i,j,1 is the parameter change in the y direction, H f 、H d are the sizes of the feature map and the related parameter change Δ in the y direction, respectively.

13. The steel structure welding quality inspection method according to claim 11, characterized in that: Defect detection loss function L de To ensure the model accurately classifies defect types and locates their locations: L cls =-a t (1-p t ) η log(p t ); L de =λ cls L cls +λ box L box ; Among them, L cls is the classification loss function, α t is the category weight, p t is the model's predicted probability for the positive category, η is used to suppress the gradient of easy-to-classify samples; L box is the positioning loss function, IoU is used to measure the degree of boundary overlap, d is the Euclidean distance, c is the diagonal length of the minimum closed area, α is the preset parameter, and v is the aspect ratio penalty term; λ cls and λ box is the weighting coefficient.

14. The steel structure welding quality inspection method according to claim 11, characterized in that: Defect quantification loss function L re The quantization parameter T s As the threshold boundary, maintain a smooth transition between qualified and unqualified sample areas: in, is the physical characteristic value of the defect predicted by the model, δ is the control parameter, δ=0.1T s .

15. The steel structure welding quality inspection method according to claim 10, characterized in that: Feature alignment loss function L id , using cosine similarity loss based on HOG and LBP: Among them, φ is the feature extraction function, which is used to capture the texture and geometric characteristics of welding defects; The mesh features corresponding to the welding defect area are predicted for the model. It is the mesh feature of the preset standard welding defect area.

16. A computer-readable storage medium having computer-executable instructions stored thereon, wherein: When the computer executable instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Weld defect identification method based on visual Transform

    CN119313639A

  • Defect picture generation method and device, electronic equipment and storage medium

    CN120198549A