Busbar welding seam segmentation method and system based on improved YOLOv11
By improving the YOLOv11 model, embedding the LSKA module and using the Focaler-IoU loss function, the problems of insufficient segmentation accuracy and instability of small targets in Busbar weld segmentation are solved, and high-precision segmentation of weld and pole areas is achieved.
Patent Information
- Application Number
- CN202510791031.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-09-26
AI Technical Summary
Existing deep learning segmentation technology has problems in busbar weld segmentation tasks, such as insufficient segmentation accuracy and unstable small target segmentation, especially limited ability to recognize weld edges and poles in complex backgrounds.
An improved YOLOv11 model is adopted, the LSKA module is embedded, and the CIoU loss function is replaced by the Focaler-IoU loss function. The feature perception ability is enhanced through the large kernel convolution structure. The multi-scale feature fusion and morphological closing operation are combined to optimize the mask boundary and polar segmentation.
The feature extraction accuracy of weld and pole areas is improved, the mask boundary is clear, mis-segmentation is reduced, and the pole segmentation performance and the accuracy of center position calculation are optimized.
Smart Images

Figure CN120707577A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial visual inspection technology, and in particular to a Busbar weld segmentation method and system based on improved YOLOv11. Background Art
[0002] In industrial power transmission systems, busbar welding quality directly determines equipment safety and lifespan. Traditional weld inspection relies on manual visual inspection or basic image processing techniques, which suffer from three major drawbacks: low efficiency, high missed detection rates, and an inability to quantify defects. In recent years, deep learning-based visual inspection technology has been gradually applied. The following are some typical existing technologies:
[0003] (1) The U-Net model uses an encoder-decoder structure and fuses multi-scale features through skip connections. It is widely used in segmentation tasks that require fine boundaries. The paper "U-Net: Convolutional Networks for Biomedical Image Segmentation" proposes a U-Net model that fuses multi-scale features through skip connections to achieve high accuracy in weld X-ray image segmentation, which is particularly suitable for small sample scenarios. Patent CN116416432A proposes a pipeline weld image segmentation method based on an improved U-Net. It uses densely connected blocks combined with a parallel attention mechanism to construct a network downsampling module, replaces ordinary convolution with depthwise separable convolution, and uses a new loss function that combines weighted Dice and cross entropy functions to improve the model's target segmentation accuracy for pipeline weld images.
[0004] (2) The DeepLab model uses dilated convolution and conditional random fields (CRF) for semantic segmentation, which is suitable for processing weld segmentation tasks in complex backgrounds. The paper "Lightweight Aluminum Strip Surface Defect Segmentation Method Based on DeepLabv3+" proposes a lightweight semantic segmentation method based on the DeepLabv3+ network. It uses the lightweight network ShuffleNetv2 as the feature extraction network, embeds the coordinate attention mechanism into it, and makes lightweight improvements to the spatial pyramid pooling module, thus achieving lightweight model and flexible deployment in embedded systems.
[0005] (3) The YOLOv11 model is a single-stage object detection and segmentation model that divides the image into grids and predicts bounding boxes, categories, and masks. It is suitable for real-time industrial inspection tasks. The paper "PCB Defect Detection and Instance Segmentation Algorithm Based on TAC-YOLOv11s" proposes a TAC-YOLOv11s detection and segmentation model. By designing a cross-stage partially connected feature extraction network, adding a small object segmentation head module, and incorporating a triple attention mechanism, the algorithm improves the bounding box and mask accuracy.
[0006] Existing deep learning segmentation technology has the following problems in the Busbar weld segmentation task:
[0007] (1) Insufficient segmentation accuracy: U-Net has weak generalization capabilities in complex backgrounds, and noise interference may lead to inaccurate segmentation. Mask R-CNN is effective for multi-target segmentation, but it suffers from computational redundancy in single-ring weld tasks and insufficient processing of boundary details. Although DeepLab improves boundaries through dilated convolution, it has low segmentation accuracy for small targets (such as poles). YOLOv11 has limited ability to capture subtle features (such as small changes in weld edges or irregular textures), resulting in blurred or broken mask boundaries.
[0008] (2) Unstable segmentation of small objects: U-Net and DeepLab have limited feature extraction capabilities for small objects. Although Mask R-CNN has made some improvements, it still needs to be optimized to adapt to pole segmentation. Complex backgrounds (such as light and shadow or surface reflections) further reduce the model's ability to identify poles, affecting the calculation of the center position. Summary of the Invention
[0009] In order to solve the technical problems existing in the background technology, the present invention proposes a Busbar weld segmentation method and system based on improved YOLOv11.
[0010] In a first aspect, the present invention proposes a Busbar weld segmentation method based on an improved YOLOv11, comprising:
[0011] Construct a Busbar weld segmentation model. The Busbar weld segmentation model uses the YOLOv11 model as the baseline network, including the backbone network, neck network, head network, and mask branch. The LSKA module is embedded after each downsampling stage of the YOLOv11 backbone network. The CIoU loss function in the YOLOv11 model training process is replaced with the Focaler-IoU loss function.
[0012] The LSKA module is used to enhance the model's feature perception capability of the weld global structure and the small pole targets with linear computational complexity through a decomposable large kernel convolution structure.
[0013] An image of the busbar welding area is collected, and the image is input into a trained busbar weld segmentation model to output a binary mask of the weld and the pole.
[0014] Preferably, the processing process of the LSKA module specifically includes:
[0015] Receive the multi-scale feature map output by the backbone network and decompose the k×k large convolution kernel into a horizontal kernel of 1×(2d-1) and a vertical kernel of (2d-1)×1, where d is the dilation rate, usually set to 2 or 3;
[0016] First, use the horizontal kernel to scan along the width direction of the image to capture the horizontal continuity characteristics of the weld, and then use the vertical kernel to scan along the height direction to extract the longitudinal structural characteristics of the pole;
[0017] After fusing the horizontal continuity features and the vertical structural features, a channel-space dual-dimensional attention map is dynamically generated through 1×1 convolution, where the high-weight areas are focused on the weld edge and the pole center.
[0018] The attention map is multiplied point by point with the multi-scale feature map to enhance the global structural response of the annular weld and sharpen the polar boundary texture, and the output optimized features are passed to the next network layer.
[0019] Preferably, the Focaler-IoU loss function is specifically:
[0020]
[0021] in, is the intersection-over-union ratio of the predicted box A and the true box B; γ is the focus parameter, which is used to enhance the attention to low IoU and reduce the contribution to high IoU; λ is the bounding rectangle penalty weight, which introduces the geometric constraint of the minimum bounding rectangle C to optimize the regression of non-overlapping bounding boxes; is the bounding rectangle penalty term to ensure the accuracy of the spatial relationship of the bounding box.
[0022] Preferably, the training process of the Busbar weld segmentation model specifically includes:
[0023] Using the composite loss function L total =L Focaler-IoU +L Mask ,in:
[0024] L Mask =α·L BCE +(1-α)·L Dice ;
[0025] Among them, L BCE is the binary cross entropy loss; L Dice is the Dice loss, α is the balance factor, α = 0.5.
[0026] Preferably, it also includes:
[0027] The minimum circumscribed circle center coordinate P of the pole mask is extracted, the weld center line L is fitted using the least squares method, the shortest Euclidean distance d from the minimum circumscribed circle center coordinate P to the weld center line L is calculated, and the shortest Euclidean distance d is multiplied by the calibration coefficient to obtain the actual offset Δ.
[0028] Preferably, the process of generating the training data set of the Busbar weld segmentation model specifically includes:
[0029] Use industrial cameras to capture multiple original Busbar images under various lighting conditions and welding angles to ensure coverage of normal / defective weld states;
[0030] Label the weld area and pole area in the original Busbar image and generate a JSON format mask label file corresponding to the image to obtain the original dataset. The labels include weld and pole.
[0031] The original data set is preprocessed to obtain the training data set.
[0032] Preferably, the preprocessing specifically includes:
[0033] The original Busbar image in the original dataset is scaled to 640×640 pixels and the pixel values are normalized to the interval [0,1].
[0034] Random enhancement operations are applied to the processed original dataset to obtain the training dataset. The random enhancement operations include: horizontal flipping, ±15° rotation, ±10% scaling, Gaussian noise, and synchronous transformation of corresponding mask labels.
[0035] Preferably, the training data set is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0036] In the second aspect, the present invention proposes a Busbar weld segmentation system based on improved YOLOv11, comprising:
[0037] A model construction module is used to build a Busbar weld segmentation model. The Busbar weld segmentation model uses the YOLOv11 model as the baseline network, including a backbone network, a neck network, a head network, and a mask branch. The LSKA module is embedded after each downsampling stage of the YOLOv11 model backbone network. The CIoU loss function in the YOLOv11 model training process is replaced with the Focaler-IoU loss function. The LSKA module is used to enhance the model's feature perception of the global structure of the weld and small pole targets with linear computational complexity through a decomposable large-kernel convolution structure.
[0038] The segmentation module is used to collect images of the busbar welding area, input the images into the trained busbar weld segmentation model, and output binary masks of the weld and the pole.
[0039] In a third aspect, a computer-readable storage medium stores a computer program, wherein the computer program is called by a processor to implement the steps of any of the above methods.
[0040] In the present invention, the Busbar weld segmentation method and system based on the improved YOLOv11 is proposed. The LSKA module is embedded in the YOLOv11 backbone network, and a large receptive field is achieved through one-dimensional kernel decomposition, which solves the problem of small target feature loss, enhances the feature focus on the weld and pole area, enhances the feature extraction of the weld area, ensures the clear mask boundary, and reduces mis-segmentation. The small target detection accuracy is enhanced by multi-scale feature fusion, the pole segmentation performance is optimized, and the mask integrity and the center position calculation are accurate. The morphological closing operation is performed on the segmentation mask to repair the boundary, and the Euclidean distance between the pole center and the weld axis is calculated and combined with the physical calibration coefficient k to achieve accurate quantification of the offset. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a workflow diagram of a Busbar weld segmentation method based on improved YOLOv11 proposed in the present invention;
[0042] Figure 2 This is a schematic diagram of the YOLOv11 model network structure of the Busbar weld segmentation method based on the improved YOLOv11 proposed in the present invention;
[0043] Figure 3 This is a schematic diagram of the comparative structure of the decoupling heads of YOLOv8 and YOLOv11 based on the Busbar weld segmentation method of improved YOLOv11 proposed in the present invention. DETAILED DESCRIPTION
[0044] Reference Figure 1-3 The present invention proposes a Busbar weld segmentation method based on improved YOLOv11, comprising the following steps:
[0045] S1. Construct a Busbar weld segmentation model. The Busbar weld segmentation model uses the YOLOv11 model as the baseline network, including the backbone network, neck network, head network and mask branch; embed the LSKA module after each downsampling stage of the YOLOv11 model backbone network; replace the CIoU loss function in the YOLOv11 model training process with the Focaler-IoU loss function.
[0046] Specifically, the YOLOv11 model adopts an improved backbone and neck architecture, which enhances feature extraction capabilities, improves the accuracy of object detection and its performance in complex tasks. The YOLOv11 model introduces a refined architecture design and an optimized training process, which not only improves processing speed but also maintains the best balance between accuracy and performance. Through improvements in model design, YOLOv11m achieves higher mean average precision (mAP) on the COCO dataset and reduces 22% of parameters compared to YOLOv8m, making it more computationally efficient without compromising accuracy. The network structure of the YOLOv11 model is as follows: Figure 2 shown.
[0047] The overall structure of YOLOv11 can be divided into four core modules:
[0048] Backbone: YOLOv11's backbone network is a convolutional neural network based on CSPDarknet53. It significantly upgrades its predecessor by introducing the C3K2 block. The C3K2 block uses a 3×3 small kernel convolution and a feature segmentation strategy, reducing computational complexity while maintaining powerful feature extraction capabilities. The backbone network includes an initial convolutional layer for downsampling, followed by a series of C3K2 blocks for deep feature extraction, and incorporates the SPPF module to process multi-scale features.
[0049] Neck: Neck plays a key role in the entire architecture. It is responsible for aggregating and fusing multi-scale features from the backbone network and providing rich feature representation for the head network.
[0050] Head (head network): YOLOv11's Head network achieves decoupling of classification and regression tasks through the Decoupled Head structure. Combining multi-scale feature map input and efficient convolution operations, it can generate high-quality bounding box, category and confidence predictions. The comparison diagram of the decoupled head of YOLOv8 and YOLOv11 is shown below. Figure 3 shown.
[0051] Mask Branch: A lightweight mask prediction module is added after each head network, combined with upsampling and residual structure to output mask information related to the detection box position, achieving instance-level pixel segmentation.
[0052] Specifically, the LSKA module is used to enhance the model's feature perception ability of the global structure of the weld and the small targets of the pole with linear computational complexity through a decomposable large kernel convolution structure.
[0053] In this embodiment, the processing process of the LSKA module specifically includes:
[0054] Receive the multi-scale feature map output by the backbone network and decompose the k×k large convolution kernel into a horizontal kernel of 1×(2d-1) and a vertical kernel of (2d-1)×1, where d is the dilation rate, usually set to 2 or 3;
[0055] First, use the horizontal kernel to scan along the width direction of the image to capture the horizontal continuity characteristics of the weld, and then use the vertical kernel to scan along the height direction to extract the longitudinal structural characteristics of the pole;
[0056] After fusing the horizontal continuity features and the vertical structural features, a channel-space dual-dimensional attention map is dynamically generated through 1×1 convolution, where the high-weight areas are focused on the weld edge and the pole center.
[0057] The attention map is multiplied point by point with the multi-scale feature map to enhance the global structural response of the annular weld and sharpen the polar boundary texture, and the output optimized features are passed to the next network layer.
[0058] It should be noted that in order to enhance the long-distance dependency modeling and feature response capabilities of the YOLOv11 network for the Busbar weld boundary and pole area, this application introduces the LSKA module in the Backbone part of YOLOv11. LSKA is an efficient large-core attention mechanism that significantly reduces computational complexity and memory usage by decomposing the two-dimensional deep convolution kernel into cascaded horizontal (1×k) and vertical (k×1) one-dimensional kernels, while retaining the receptive field advantage of the large kernel. LSKA is particularly suitable for industrial segmentation tasks that need to capture both global structures (such as the overall annular features of the weld) and local details (such as the pole edge), and can effectively improve the clarity of the mask boundary and the integrity of small target segmentation.
[0059] Specifically, the LSKA working principle is as follows:
[0060] LSKA is based on the improvement of traditional large kernel attention. It optimizes computational efficiency and enhances feature expression capabilities by decomposing the two-dimensional deep convolution kernel into a one-dimensional kernel sequence. Its core principles include the following steps:
[0061] (1) Large nuclear decomposition:
[0062] Traditional LKA uses k×k two-dimensional depth convolution kernels (including ordinary depth convolution and dilated depth convolution) to capture long-distance dependencies, but its parameter count and computational complexity grow quadratically with the kernel size k (O(k 2 ), which limits the application of large core size.
[0063] LSKA decomposes the k×k kernel into cascaded 1×k (horizontal direction) and k×1 (vertical direction) one-dimensional kernels to process the spatial information of the feature map respectively. C×H×W ,The calculation process of LSKA is as follows:
[0064] Horizontal convolution: For each channel C, a 1×(2d-1) kernel is used for depthwise convolution to capture local information in the horizontal direction:
[0065]
[0066] Vertical convolution: horizontal convolution result Use a (2d-1)×1 kernel for depthwise convolution to capture local information in the vertical direction:
[0067]
[0068] Dilated convolution processing: Dilated depth convolution kernel (kernel size is d is the expansion rate), which can also be decomposed into Cascaded one-dimensional kernels capture long-range dependencies:
[0069]
[0070] Attention map generation: The fused feature Z is transformed into C Convert to channel-level attention map:
[0071] A C =W 1×1 *Z C ;
[0072] Feature recalibration: Attention map A C With the original feature map F C Perform Hadamard product to generate enhanced features:
[0073]
[0074] Among them, W is the convolution kernel weight, is the Hadamard product, d is the dilation rate (usually set to 2 or 3), This is a floor operation.
[0075] (2) Large kernel receptive field: LSKA achieves a wide effective receptive field (ERF) through a large kernel (e.g., 35×35 or larger), which can capture the global ring structure of the weld and the background texture differences. At the same time, it alleviates the grid effect through dilated convolution and ensures the fine expression of boundary details. According to experimental verification, when the kernel size is 35×35, LSKA's ERF is significantly better than that of small kernel convolution (e.g., 3×3), which is comparable to traditional LKA, but with a significantly lower computational cost.
[0076] (3) Computational efficiency: The number of parameters and FLOPs of LSKA increases linearly with the kernel size k (O(k)), while the traditional LKA increases quadratically (O(k 2 )). For example, for a kernel size of 35×35, the number of parameters of LSKA is about 30% of that of the traditional LKA, and the number of FLOPs is reduced by about 50%. Parameter calculation:
[0077]
[0078] Similar to FLOPs calculation, the linear growth of LSKA enables it to support ultra-large cores (such as 65×65) without significantly increasing the computational burden.
[0079] (4) Shape bias: LSKA is biased towards encoding shape information, reducing reliance on texture. In the Busbar weld segmentation task, welds and poles have clear geometric features (such as annular welds and circular poles). LSKA’s shape bias significantly improves the clarity of the mask boundary and the integrity of the pole geometry, reducing the interference of complex background (such as light and shadow, surface reflection) on segmentation.
[0080] Specifically, the YOLOv11 model structure construction and improvement include:
[0081] (1) Backbone network construction: Based on the CSPDarknet53 architecture, the C3K2 convolutional structure is integrated to reduce the number of parameters and improve feature expression capabilities.
[0082] (2) Introducing the large-core attention mechanism:
[0083] Embedding position: After each stage (P1 to P5) of Backbone outputs the feature map, the LSKA module is added to process the downsampled feature map;
[0084] The kernel size is set to 35×35 with a dilation rate of d = 2 to balance the receptive field and computational efficiency. Based on the requirements of the weld segmentation task, a 35×35 kernel can effectively capture the global structure of the annular weld while preserving the local details of the poles.
[0085] Module Structure: The input feature map undergoes horizontal and vertical one-dimensional convolution using LSKA to generate local and global features. An attention map is generated through 1×1 convolution, dynamically adjusting the spatial and channel weights of the feature map. The output feature map is fused with the original feature map and fed into the subsequent C3K2 module.
[0086] (3) Mask branch construction: Based on the output of the head network, a lightweight mask prediction module is added, and operations such as upsampling and residual connection are used to restore the spatial resolution. The binary mask corresponding to the detection box is output to achieve instance-level segmentation.
[0087] In this embodiment, the Focaler-IoU loss function is specifically:
[0088]
[0089] in, is the intersection-over-union ratio of the predicted box A and the true box B; γ is the focus parameter, which is used to enhance the attention to low IoU and reduce the contribution to high IoU; λ is the bounding rectangle penalty weight, which introduces the geometric constraint of the minimum bounding rectangle C to optimize the regression of non-overlapping bounding boxes; is the bounding rectangle penalty term to ensure the accuracy of the spatial relationship of the bounding box.
[0090] It should be noted that in the original YOLOv11 algorithm, the bounding box loss uses the CIoU loss function, and the mask loss is usually combined with BCE Loss and Dice Loss. However, in the Busbar weld segmentation task, the weld and pole areas usually occupy a small proportion of the image, resulting in an extremely unbalanced distribution of foreground and background pixels. It is difficult for traditional loss functions to effectively optimize the segmentation accuracy of small targets and boundary areas. In addition, the CIoU loss has limited gradient information in complex scenes (such as non-overlapping or nested bounding boxes), which may lead to insufficient bounding box positioning accuracy. To solve the above problems, this application proposes to use the Focaler-IoU loss function to replace the CIoU loss function, which is used to calculate the overlapping loss of the bounding box and the mask, and optimize the mask segmentation accuracy at the same time. The Focaler-IoU loss function combines the geometric characteristics of the IoU loss with the focusing mechanism of Focal Loss, and enhances the regression ability of the weld bounding box of small targets (such as poles) and complex backgrounds by dynamically adjusting the weights of difficult samples. The design of Focaler-IoU is particularly suitable for industrial scenarios with a low proportion of foreground pixels, and can improve the positioning accuracy and segmentation quality of the model.
[0091] Specifically, Focaler-IoU works as follows:
[0092] Focusing mechanism: by (1-IoU) γ ,Focaler-IoU dynamically reduces the loss contribution to high IoU samples and focuses on difficult samples with low IoU (such as small target poles or welds with blurred boundaries), thereby improving the model's adaptability to complex scenes.
[0093] Geometric constraints: The bounding rectangle penalty enhances the spatial relationship modeling of bounding boxes, providing more meaningful gradient information, especially when the bounding boxes do not overlap or nest.
[0094] Category imbalance optimization: Focaler-IoU indirectly alleviates the pixel imbalance problem between foreground and background, and improves the segmentation accuracy of small objects by focusing on difficult samples.
[0095] In this embodiment, the training process of the Busbar weld segmentation model specifically includes:
[0096] Using the composite loss function L total =L Focaler-IoU +L Mask ,in:
[0097] L Mask =α·L BCE +(1-α)·L Dice ;
[0098] Among them, L BCE is the binary cross entropy loss; L Dice is the Dice loss, α is the balance factor, α = 0.5.
[0099] S2. Collect images of the busbar welding area, input the images into the trained busbar weld segmentation model, and output binary masks of the weld and the pole.
[0100] In this embodiment, the process of generating the training data set of the Busbar weld segmentation model specifically includes:
[0101] Use industrial cameras to capture multiple original Busbar images under various lighting conditions and welding angles to ensure coverage of normal / defective weld states;
[0102] Label the weld area and pole area in the original Busbar image and generate a JSON format mask label file corresponding to the image to obtain the original dataset. The labels include weld and pole.
[0103] The original data set is preprocessed to obtain the training data set.
[0104] In this embodiment, the preprocessing specifically includes:
[0105] The original Busbar image in the original dataset is scaled to 640×640 pixels and the pixel values are normalized to the interval [0,1].
[0106] Random enhancement operations are applied to the processed original dataset to obtain the training dataset. The random enhancement operations include: horizontal flipping, ±15° rotation, ±10% scaling, Gaussian noise, and synchronous transformation of corresponding mask labels.
[0107] In this embodiment, the training data set is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0108] Specifically, during image acquisition, a high-resolution industrial camera is used to capture welding images containing busbars. The acquisition conditions include various situations such as lighting changes and different welding states to enhance the robustness of the model. When labeling samples, the Labelme image annotation tool is used to manually and finely annotate the boundaries of the weld area and pole area in each image, and generate the corresponding JSON format mask file. Each target area is assigned a unique category identifier for semantic distinction in subsequent model training. When organizing data, images, annotation files, and category labels are organized into a YOLOv11-compatible data structure in a unified format, and divided into training sets, validation sets, and test sets to ensure the consistency and repeatability of model training and evaluation.
[0109] In this embodiment, it also includes:
[0110] Extract the minimum circumscribed circle center coordinate P of the pole mask, use the least squares method to fit the weld centerline L, calculate the shortest Euclidean distance d from the minimum circumscribed circle center coordinate P to the weld centerline L, and multiply the shortest Euclidean distance d by the calibration coefficient to obtain the actual offset Δ. Set an offset threshold and compare the actual offset Δ with the offset threshold to determine whether it exceeds the process tolerance.
[0111] For images with multiple poles, the above steps are performed separately to output the offset value of each pole for subsequent automatic sorting or early warning.
[0112] In this embodiment, the weld width is also measured. The specific measurement process is as follows:
[0113] (1) Weld seam extraction: Extract the contour edge from the repaired weld seam mask and use image processing tools such as OpenCV to obtain the upper and lower boundary coordinates of the weld seam.
[0114] (2) Width calculation method:
[0115] Scan the image horizontally; calculate the vertical distance between the upper and lower boundaries of the weld in each column of pixels; multiply the pixel difference by the physical calibration ratio corresponding to the image to convert it into the actual physical width; calculate the average width of all scan points, and record indicators such as the maximum, minimum, and standard deviation.
[0116] (3) Width curve fitting: Fit the weld width data into a continuous curve to determine whether it meets the process width standard.
[0117] Reference Figure 1-3 The present invention proposes a Busbar weld segmentation system based on improved YOLOv11, comprising:
[0118] The model construction module is used to build the Busbar weld segmentation model. The Busbar weld segmentation model uses the YOLOv11 model as the baseline network, including the backbone network, neck network, head network, and mask branch. The LSKA module is embedded after each downsampling stage of the YOLOv11 model backbone network. The CIoU loss function in the YOLOv11 model training process is replaced with the Focaler-IoU loss function. The LSKA module is used to enhance the model's feature perception of the global structure of the weld and small pole targets with linear computational complexity through a decomposable large kernel convolution structure.
[0119] The segmentation module is used to collect images of the busbar welding area, input the images into the trained busbar weld segmentation model, and output binary masks of the weld and the pole.
[0120] An embodiment of the present application provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are executed by a processor, they are used to implement the technical solution shown in the above method embodiment. The implementation principles and beneficial effects are similar and will not be repeated here.
[0121] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any technician familiar with the technical field, within the technical scope disclosed by the present invention, who makes equivalent replacements or changes based on the technical solution and inventive concept of the present invention, should be covered by the scope of protection of the present invention.
Claims
1. A Busbar weld segmentation method based on improved YOLOv11, characterized in that: include: Construct a Busbar weld segmentation model. The Busbar weld segmentation model uses the YOLOv11 model as the baseline network, including the backbone network, neck network, head network, and mask branch. The LSKA module is embedded after each downsampling stage of the YOLOv11 backbone network. The CIoU loss function in the YOLOv11 model training process is replaced with the Focaler-IoU loss function. The LSKA module is used to enhance the model's feature perception capability of the weld global structure and the small pole targets with linear computational complexity through a decomposable large kernel convolution structure. An image of the busbar welding area is collected, and the image is input into a trained busbar weld segmentation model to output a binary mask of the weld and the pole.
2. The Busbar weld segmentation method based on improved YOLOv11 according to claim 1, characterized in that: The processing process of the LSKA module specifically includes: Receive the multi-scale feature map output by the backbone network and decompose the k×k large convolution kernel into a horizontal kernel of 1×(2d-1) and a vertical kernel of (2d-1)×1, where d is the dilation rate, usually set to 2 or 3; First, use the horizontal kernel to scan along the width direction of the image to capture the horizontal continuity characteristics of the weld, and then use the vertical kernel to scan along the height direction to extract the longitudinal structural characteristics of the pole; After fusing the horizontal continuity features and the vertical structural features, a channel-space dual-dimensional attention map is dynamically generated through 1×1 convolution, where the high-weight areas are focused on the weld edge and the pole center. The attention map is multiplied point by point with the multi-scale feature map to enhance the global structural response of the annular weld and sharpen the polar boundary texture, and the output optimized features are passed to the next network layer.
3. The Busbar weld segmentation method based on improved YOLOv11 according to claim 1, characterized in that: The Focaler-IoU loss function is specifically: in, is the intersection-over-union ratio of the predicted box A and the true box B; γ is the focus parameter, which is used to enhance the attention to low IoU and reduce the contribution to high IoU; λ is the bounding rectangle penalty weight, which introduces the geometric constraint of the minimum bounding rectangle C to optimize the regression of non-overlapping bounding boxes; is the bounding rectangle penalty term to ensure the accuracy of the spatial relationship of the bounding box.
4. The Busbar weld segmentation method based on improved YOLOv11 according to claim 3 is characterized in that: The training process of the Busbar weld segmentation model specifically includes: Using the composite loss function L total =L Focaler-IoU +L Mask ,in: L Mask =α·L BCE +(1-a)·L Dice ; Among them, L BCE is the binary cross entropy loss; L Dice is the Dice loss, α is the balance factor, α = 0.
5.
5. The Busbar weld segmentation method based on improved YOLOv11 according to claim 1, characterized in that: Also includes: The minimum circumscribed circle center coordinate P of the pole mask is extracted, the weld center line L is fitted using the least squares method, the shortest Euclidean distance d from the minimum circumscribed circle center coordinate P to the weld center line L is calculated, and the shortest Euclidean distance d is multiplied by the calibration coefficient to obtain the actual offset Δ.
6. The Busbar weld segmentation method based on improved YOLOv11 according to claim 1, characterized in that: The generation process of the training data set of the Busbar weld segmentation model specifically includes: Use industrial cameras to capture multiple original Busbar images under various lighting conditions and welding angles to ensure coverage of normal / defective weld states; Label the weld area and pole area in the original Busbar image and generate a JSON format mask label file corresponding to the image to obtain the original dataset. The labels include weld and pole. The original data set is preprocessed to obtain the training data set.
7. The Busbar weld segmentation method based on improved YOLOv11 according to claim 6, characterized in that: The pretreatment specifically includes: The original Busbar image in the original dataset is scaled to 640×640 pixels and the pixel values are normalized to the interval [0,1]. Random enhancement operations are applied to the processed original dataset to obtain the training dataset. The random enhancement operations include: horizontal flipping, ±15° rotation, ±10% scaling, Gaussian noise, and synchronous transformation of corresponding mask labels.
8. The Busbar weld segmentation method based on improved YOLOv11 according to claim 6, characterized in that: The training data set is divided into training set, validation set, and test set in a ratio of 8:1:
1.
9. A Busbar weld segmentation system based on improved YOLOv11, characterized in that: include: A model construction module is used to build a Busbar weld segmentation model. The Busbar weld segmentation model uses the YOLOv11 model as the baseline network, including a backbone network, a neck network, a head network, and a mask branch. The LSKA module is embedded after each downsampling stage of the YOLOv11 model backbone network. The CIoU loss function in the YOLOv11 model training process is replaced with the Focaler-IoU loss function. The LSKA module is used to enhance the model's feature perception of the global structure of the weld and small pole targets with linear computational complexity through a decomposable large-kernel convolution structure. The segmentation module is used to collect images of the busbar welding area, input the images into the trained busbar weld segmentation model, and output binary masks of the weld and the pole.
10. A computer-readable storage medium, characterized in that A computer program is stored, and the computer program is called by a processor to implement the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Pipeline welding seam image segmentation method based on improved UNet
CN116416432A
Cited By
Weld joint extraction method based on multi-dimensional information fusion
CN121033034A
Natural disaster intelligent detection method and device and storage medium
CN121259535A
Anti-shielding, multi-scale and self-adaptive deformation welding spot defect detection method
CN121329930A
Construction method of water supply and drainage pipe network system model
CN121365485A
A method for constructing a sewer network system model
CN121365485B