A welding fusion line identification method, device, readable storage medium and equipment
Patent Information
- Application Number
- CN202610759368.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-09-01
AI Technical Summary
[0003]本发明的目的在于克服现有技术中的不足,提供一种焊接熔合线识别方法、装置、可读存储介质及设备,直接对焊后金相图像进行实测,并针对不同类型的焊缝进行分割识别,解决了当前人工量测速度慢、在线间接测量易受干扰的问题
1、本发明根据不同焊缝类型的焊缝金相图像训练焊缝分割模型,能够准确识别不同焊缝类型下焊缝金相图像对应的焊接熔合线,能够直接对焊后金相图像进行实测,解决了当前人工量测速度慢、在线间接测量易受干扰的问题。
Smart Images

Figure CN122676191A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, apparatus, readable storage medium, and device for identifying welding fusion lines, belonging to the field of welding measurement technology. Background Technology
[0002] Metallurgical microscopes are essential tools for studying the microstructure of metallic materials. By observing the microstructure of a material's cross-section, their physical properties and processing quality can be directly assessed. In the field of welding, the position and morphology of the fusion line in the metallographic image of the weld cross-section directly reflect the weld penetration depth and are a key indicator for measuring weld quality. Therefore, obtaining an accurate weld fusion line is a crucial factor affecting penetration depth calculation. Traditional metallographic image analysis mainly relies on manual observation of samples under a microscope, depending heavily on standardized manual operation and experience. Moreover, existing online penetration depth detection methods are indirect measurements, such as OCT signal measurement, which are easily affected by strong interference from spatter, plasma, and severe keyhole fluctuations during the welding process, leading to signal loss or demodulation errors. Measurement stability needs improvement. The results of this type of measurement are greatly affected by process interference and cannot provide true, traceable penetration depth data after welding, thus it cannot completely replace metallographic testing. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device, readable storage medium and equipment for identifying welding fusion lines. It can directly measure the metallographic image after welding and segment and identify different types of welds, thus solving the problems of slow manual measurement and easy interference in online indirect measurement.
[0004] To solve the above-mentioned technical problems, the present invention is implemented using the following technical solution: The first aspect of this invention provides a method for identifying weld fusion lines, comprising: Obtain the metallographic image of the weld and the weld type of the target weldment; Input the metallographic image of the weld seam and the weld seam type of the target weld into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weld. The training of the weld segmentation model includes: Based on the weld type of the weld, the base material region, the weld region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set; An initial weld seam segmentation model was constructed using an improved BiSeNet network; The initial weld segmentation model is trained using a training set until it can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a well-trained weld segmentation model.
[0005] Furthermore, the weld seam segmentation model includes an interconnected input layer, a fusion layer, and an output layer; The fusion layer includes multiple fusion modules, which are used to generate fusion features corresponding to different weld types based on the input weld metallographic feature map; the fusion module includes a dual-path parallel module and a spatial attention module; The dual-path parallel module is used to extract weld edge pixel features and global semantic features at the spatial and semantic levels, respectively. The spatial attention module is used to fuse weld edge pixel features and global semantic features to generate fused features that enhance the weld fusion line region. The output layer is used to output welding fusion lines corresponding to different weld types based on the fusion characteristics.
[0006] Furthermore, based on the weld type of the weldment, the base material region, the weldment region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set, including: The weld types include butt welds, fillet welds, and T-welds; The label is represented as: ; in, Represents a set of tags. Indicates the parent material area label. Labels indicating the weldment area Labels indicating fusion line / solder joint boundaries Indicates the height of the metallographic image of the weld. This indicates the width of the metallographic image of the weld.
[0007] Further, the step of training an initial weld segmentation model using a training set until the initial weld segmentation model can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a trained weld segmentation model, includes: Obtain the metallographic feature map of the weld seam from the training sample images; Spatial path and context path sampling processes were performed on the metallographic feature map of the weld to obtain the edge pixel features and global semantic features of the weld. The pixel features of the weld edge and the global semantic features are fused to generate fused features that strengthen the weld fusion line region. Based on the fusion features, the label positions on the training sample images are predicted until the predicted label positions match the actual label positions in the training sample images, thus obtaining a trained weld seam segmentation model.
[0008] Furthermore, the metallographic feature map of the weld is subjected to spatial path and context path sampling processing to obtain weld edge pixel features and global semantic features, including: Spatial path sampling processing is represented by the following formula: ; in, Represents the pixel features of the weld edge. Indicates the size is A convolutional layer with a stride of 2. Represents the linear rectified activation function. This indicates batch normalization processing. This image shows the metallographic features of the weld. The following formula represents context path sampling processing: ; in, Represents global semantic features. This indicates global average pooling. This indicates attention optimization processing. This indicates the feature extraction and processing of the backbone network.
[0009] Furthermore, the process of fusing the pixel features of the weld edge and the global semantic features to generate fused features for the enhanced weld fusion line region includes: The fusion process is represented by the following formula: ; ; ; in, Indicates fusion characteristics, Represents the spatial attention weight map. Indicates intermediate fusion features, This represents the Sigmoid function. Indicates the size is Convolutional layers, Indicates global average pooling. Indicates global max pooling. , Indicates learnable weights, Represents the pixel features of the weld edge. Represents global semantic features.
[0010] Furthermore, the step of predicting the label positions on the training sample images based on the fusion features until the predicted label positions match the true label positions in the training sample images, thereby obtaining a trained weld seam segmentation model, includes: Cross-entropy and boundary loss function are used to measure the consistency between the predicted label position and the real label position in the training sample image. When the loss function value is minimized, the trained weld segmentation model is obtained. The loss function is expressed as: ; ; ; in, This represents the value of the loss function. This represents the value of the cross-entropy loss function. This represents the boundary loss function value. The hyperparameter representing the balance between cross-entropy loss and boundary loss; This represents the set of pixels representing the fusion line / weld point boundaries on the training sample image. Represents the first training sample image The real label of each pixel Represents the first training sample image The probability of label prediction for each pixel. Represents the first training sample image The predicted probability of the label for each pixel as the fusion line / solder joint boundary.
[0011] A second aspect of the present invention provides a welding fusion line identification device, comprising: The acquisition module is used to acquire the metallographic image of the weld and the weld type of the target weldment; Input the metallographic image of the weld seam and the weld seam type of the target weld into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weld. The training of the weld segmentation model includes: Based on the weld type of the weld, the base material region, the weld region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set; An initial weld seam segmentation model was constructed using an improved BiSeNet network; The initial weld segmentation model is trained using a training set until it can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a well-trained weld segmentation model.
[0012] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the welding fusion line identification method as described above.
[0013] A fourth aspect of the present invention provides a computer device, comprising: Memory, used to store instructions; A processor is configured to execute the instructions, causing the device to perform the welding fusion line identification method as described above.
[0014] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: 1. This invention trains a weld segmentation model based on the metallographic images of welds of different weld types, which can accurately identify the welding fusion line corresponding to the metallographic images of welds under different weld types, and can directly measure the metallographic images after welding, thus solving the problems of slow manual measurement and easy interference in online indirect measurement.
[0015] 2. The present invention performs spatial path and context path sampling processing on the metallographic feature map of the weld, and fuses the sampled weld edge pixel features and global semantic features to generate fusion features that strengthen the weld fusion line region, making the weld boundary identification more accurate. Attached Figure Description
[0016] Figure 1 This is a flowchart of the training process for the weld seam segmentation model provided in this embodiment of the invention. Figure 2 This is a schematic diagram of the weld seam segmentation model provided in an embodiment of the present invention; Figure 3 This is a flowchart of the trained weld seam segmentation model provided in the embodiments of the present invention. Detailed Implementation
[0017] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention. Example 1
[0018] This embodiment provides a method for identifying weld fusion lines, including: Obtain the metallographic image of the weld and the weld type of the target weldment; In this embodiment, the weld types include butt welds, fillet welds, and T-welds. The metallographic images of the welds need to be preprocessed. Specifically, a high-resolution industrial camera or metallographic microscope is used to acquire metallographic images, and preprocessing operations such as contrast-limited adaptive histogram equalization, filtering and noise reduction, and geometric correction are performed to improve image quality. Input the metallographic image of the weld seam and the weld seam type of the target weldment into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weldment.
[0019] like Figure 1 As shown, the training of the weld seam segmentation model includes: Step 1: Based on the weld type of the weldment, divide the base material region, weldment region, and fusion line / weld point boundary on the weld metallographic image and add corresponding labels to build a training set; Weld types include butt welds, fillet welds, and T-welds; Add labels to the base material area, weldment area, and fusion line / weld point boundaries, as follows: ; in, Represents a set of tags. Indicates the parent material area label. Labels indicating the weldment area Labels indicating fusion line / solder joint boundaries Indicates the height of the metallographic image of the weld. This indicates the width of the metallographic image of the weld.
[0020] Step 2: Construct an initial weld segmentation model using an improved BiSeNet network; specifically: The weld seam segmentation model consists of interconnected input, fusion, and output layers; The fusion layer includes multiple fusion modules, which are used to generate fusion features corresponding to different weld types based on the input weld metallographic feature map; the fusion module includes a dual-path parallel module and a spatial attention module; The dual-path parallel module's spatial path branch and context path branch are used to extract weld edge pixel features and global semantic features at the spatial and semantic levels, respectively. The spatial attention module is used to fuse weld edge pixel features and global semantic features to generate fused features that enhance the weld fusion line region. like Figure 2 As shown, in this embodiment, the fusion layer includes a butt weld feature fusion module, a fillet weld feature fusion module, and a T-weld feature fusion module; The three fusion modules have the same structure. Based on the metallographic feature map of the weld seam corresponding to the weld seam type, the three fusion modules generate fusion features of butt weld seam, fillet weld seam, and T-weld seam respectively. The output layer is used to output welding fusion lines corresponding to different weld types based on the fusion characteristics.
[0021] Step 3, as follows Figure 3 As shown, an initial weld segmentation model is trained using a training set until it can identify the weld fusion line corresponding to the metallographic image of welds under different weld types, thus obtaining a trained weld segmentation model; specifically: Obtain the metallographic feature map of the weld seam from the training sample images; Spatial path and context path sampling are performed on the metallographic feature map of the weld to obtain weld edge pixel features and global semantic features, including: Spatial path sampling processing is represented by the following formula: ; in, Represents the pixel features of the weld edge. Indicates the size is A convolutional layer with a stride of 2. Represents the linear rectified activation function. This indicates batch normalization processing. This image shows the metallographic features of the weld. The following formula represents context path sampling processing: ; in, Represents global semantic features. This indicates global average pooling. This indicates attention optimization processing. This indicates the feature extraction and processing of the backbone network.
[0022] The pixel features of the weld edge and the global semantic features are fused to generate fused features for the enhanced weld fusion line region, including: The fusion process is represented by the following formula: ; ; ; in, Indicates fusion characteristics, Represents the spatial attention weight map. Indicates intermediate fusion features, This represents the Sigmoid function. Indicates the size is Convolutional layers, Indicates global average pooling. Indicates global max pooling. , Indicates learnable weights, Represents the pixel features of the weld edge. Represents global semantic features; Based on the fusion features, the label positions on the training sample images are predicted until the predicted label positions match the true label positions in the training sample images, thus obtaining the trained weld seam segmentation model, including: Cross-entropy and boundary loss function are used to measure the consistency between the predicted label position and the real label position in the training sample image. When the loss function value is minimized, the trained weld segmentation model is obtained. The loss function is expressed as: ; ; ; in, This represents the value of the loss function. This represents the value of the cross-entropy loss function. This represents the boundary loss function value. The hyperparameter representing the balance between cross-entropy loss and boundary loss; This represents the set of pixels representing the fusion line / weld point boundaries on the training sample image. Represents the first training sample image The real label of each pixel Represents the first training sample image The probability of label prediction for each pixel. Represents the first training sample image The predicted probability of the label for each pixel as the fusion line / solder joint boundary.
[0023] By dividing the weld fusion line on the metallographic image of the target weldment, the accurate weld penetration or weld throat size can be calculated. For example, the target weldment is a bogie frame for rail vehicles, the weld type is T-type weld, the material is S355J2W weathering steel, the plate thickness is 12mm, and gas shielded welding is used for welding; Before weld identification, metallographic samples were cut along the cross-section of the weld and then embedded, polished, and etched with 4% nitric acid alcohol to obtain clear metallographic images of the weld. The obtained weld metallographic image and T-weld type are input into the trained weld segmentation model. Accurate weld fusion lines are then delineated on the weld metallographic image of the rail vehicle bogie frame. The lengths of the two weld legs are measured based on these weld fusion lines. , Length of the intersection of the two weld legs By evaluating the symmetry of the weld, if If the weld quality does not exceed the preset threshold, the fusion depth can be calculated. , ; For example, the target weldment is an aluminum alloy corner of a new energy vehicle battery pack, the weld type is fillet weld, the battery pack shell material is 6061 aluminum alloy, the plate thickness is 4mm, and the welding is carried out using pulsed MIG welding process; Before weld identification, metallographic samples are cut along the cross-section of the weld and then mounted, polished and etched with Keller's reagent to obtain a clear metallographic image of the weld. The obtained weld metallographic image and fillet weld type are input into the trained weld segmentation model to accurately delineate the weld fusion line on the weld metallographic image of the aluminum alloy corner of the new energy vehicle battery pack. The lengths of the two weld legs are then measured based on the weld fusion line. , This allows us to calculate the weld throat dimensions. , . Example 2
[0024] This embodiment provides a welding fusion line identification device, including: The acquisition module is used to acquire the metallographic image of the weld and the weld type of the target weldment; Input the metallographic image of the weld seam and the weld seam type of the target weld into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weld. The training of the weld segmentation model includes: Based on the weld type of the weld, the base material region, the weld region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set; An initial weld seam segmentation model was constructed using an improved BiSeNet network; The initial weld segmentation model is trained using a training set until it can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a well-trained weld segmentation model.
[0025] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here. Example 3
[0026] This embodiment provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the following method steps: Obtain the metallographic image of the weld and the weld type of the target weldment; Input the metallographic image of the weld seam and the weld seam type of the target weld into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weld. The training of the weld segmentation model includes: Based on the weld type of the weld, the base material region, the weld region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set; An initial weld seam segmentation model was constructed using an improved BiSeNet network; The initial weld segmentation model is trained using a training set until it can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a well-trained weld segmentation model. Example 4
[0027] This embodiment provides a computer device, including: Memory, used to store instructions; A processor is configured to execute the instructions, causing the device to perform the following method steps: Obtain the metallographic image of the weld and the weld type of the target weldment; Input the metallographic image of the weld seam and the weld seam type of the target weld into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weld. The training of the weld segmentation model includes: Based on the weld type of the weld, the base material region, the weld region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set; An initial weld seam segmentation model was constructed using an improved BiSeNet network; The initial weld segmentation model is trained using a training set until it can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a well-trained weld segmentation model.
[0028] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage CD-ROMs, optical storage, etc.) containing computer-usable program code.
[0029] This application is described with reference to flowchart illustrations of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each step in the flowchart can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing device, generate instructions for implementing the process. Figure 1 One or more processes or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0030] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 The function specified in one or more processes.
[0031] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 Steps of a specified function in one or more processes.
[0032] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A method for identifying weld fusion lines, characterized in that, include: Obtain the metallographic image of the weld and the weld type of the target weldment; Input the metallographic image of the weld seam and the weld seam type of the target weld into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weld. The training of the weld segmentation model includes: Based on the weld type of the weld, the base material region, the weld region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set; An initial weld seam segmentation model was constructed using an improved BiSeNet network; The initial weld segmentation model is trained using a training set until it can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a well-trained weld segmentation model.
2. The welding fusion line identification method according to claim 1, characterized in that, The weld seam segmentation model includes a connected input layer, a fusion layer, and an output layer; The fusion layer includes multiple fusion modules, which are used to generate fusion features corresponding to different weld types based on the input weld metallographic feature map; the fusion module includes a dual-path parallel module and a spatial attention module; The dual-path parallel module is used to extract weld edge pixel features and global semantic features at the spatial and semantic levels, respectively. The spatial attention module is used to fuse weld edge pixel features and global semantic features to generate fused features that enhance the weld fusion line region. The output layer is used to output welding fusion lines corresponding to different weld types based on the fusion characteristics.
3. The method for identifying welding fusion lines according to claim 1, characterized in that, The weld type based on the weldment is used to divide the base material region, weldment region, and fusion line / weld point boundary on the weld metallographic image and add corresponding labels to construct a training set, including: The weld types include butt welds, fillet welds, and T-welds; The label is represented as: ; in, Represents a set of tags. Indicates the parent material area label. Labels indicating the weldment area Labels indicating fusion line / solder joint boundaries Indicates the height of the metallographic image of the weld. This indicates the width of the metallographic image of the weld.
4. The method for identifying welding fusion lines according to claim 1, characterized in that, The process involves training an initial weld segmentation model using a training set until the initial weld segmentation model can identify the weld fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a trained weld segmentation model, including: Obtain the metallographic feature map of the weld seam from the training sample images; Spatial path and context path sampling processes were performed on the metallographic feature map of the weld to obtain the edge pixel features and global semantic features of the weld. The pixel features of the weld edge and the global semantic features are fused to generate fused features that strengthen the weld fusion line region. Based on the fusion features, the label positions on the training sample images are predicted until the predicted label positions match the actual label positions in the training sample images, thus obtaining a trained weld seam segmentation model.
5. The welding fusion line identification method according to claim 4, characterized in that, The metallographic feature map of the weld is sampled using spatial path and context path methods to obtain weld edge pixel features and global semantic features, including: Spatial path sampling processing is represented by the following formula: ; in, Represents the pixel features of the weld edge. Indicates the size is A convolutional layer with a stride of 2. Represents the linear rectified activation function. This indicates batch normalization processing. This image shows the metallographic features of the weld. The following formula represents context path sampling processing: ; in, Represents global semantic features. This indicates global average pooling. This indicates attention optimization processing. This indicates the feature extraction and processing of the backbone network.
6. The welding fusion line identification method according to claim 4, characterized in that, The process of fusing the pixel features of the weld edge and the global semantic features to generate fused features for the enhanced weld fusion line region includes: The fusion process is represented by the following formula: ; ; ; in, Indicates fusion characteristics, Represents the spatial attention weight map. Indicates intermediate fusion features, This represents the Sigmoid function. Indicates the size is Convolutional layers, This indicates that average pooling is performed on each channel in the spatial dimension. Indicates global max pooling. , Indicates learnable weights, Represents the pixel features of the weld edge. Represents global semantic features.
7. The welding fusion line identification method according to claim 4, characterized in that, The step of predicting the label position on the training sample image based on the fusion features until the predicted label position matches the true label position in the training sample image, thus obtaining the trained weld seam segmentation model, includes: Cross-entropy and boundary loss function are used to measure the consistency between the predicted label position and the real label position in the training sample image. When the loss function value is minimized, the trained weld segmentation model is obtained. The loss function is expressed as: ; ; ; in, This represents the value of the loss function. This represents the value of the cross-entropy loss function. This represents the boundary loss function value. The hyperparameter representing the balance between cross-entropy loss and boundary loss; This represents the set of pixels representing the fusion line / weld point boundaries on the training sample image. Represents the first training sample image The real label of each pixel Represents the first training sample image The probability of label prediction for each pixel. Represents the first training sample image The predicted probability of the label for each pixel as the fusion line / solder joint boundary.
8. A welding fusion line identification device, characterized in that, include: The acquisition module is used to acquire the metallographic image of the weld and the weld type of the target weldment; Input the metallographic image of the weld seam and the weld seam type of the target weld into the pre-trained weld seam segmentation model, and divide the weld fusion line on the metallographic image of the weld seam of the target weld. The training of the weld segmentation model includes: Based on the weld type of the weld, the base material region, the weld region, and the fusion line / weld point boundary are divided on the weld metallographic image and corresponding labels are added to construct a training set; An initial weld seam segmentation model was constructed using an improved BiSeNet network; The initial weld segmentation model is trained using a training set until it can identify the welding fusion line corresponding to the metallographic image of the weld under different weld types, thus obtaining a well-trained weld segmentation model.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the welding fusion line identification method as described in any one of claims 1 to 7.
10. A computer device, characterized in that, include: Memory, used to store instructions; A processor for executing the instructions, causing the device to perform the welding fusion line identification method as described in any one of claims 1 to 7.