Method and system for measuring the size of a circular weld of a cylindrical battery

By using the semantic segmentation network of the STDC-Seg architecture and inverse mapping polar coordinate transformation, the problems of high reflectivity and boundary ambiguity in the weld seam inspection of cylindrical batteries are solved, achieving high-precision and high-robust weld seam measurement, which meets the high standard requirements of power battery manufacturing.

CN122335947APending Publication Date: 2026-07-03XIAMEN WEIYA INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
XIAMEN WEIYA INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-05-22
Publication Date
2026-07-03

Smart Images

  • Figure CN122335947A_ABST
    Figure CN122335947A_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for measuring the dimensions of annular welds in cylindrical batteries, relating to the field of dimensional metrology. Addressing the challenges of detecting high reflectivity, blurred boundaries, and curved shapes in cylindrical battery welds, this invention constructs an end-to-end high-precision measurement scheme. First, an improved STDC-Seg semantic segmentation network is employed, fusing supervised detail and multi-scale features to accurately segment the weld region under complex lighting and surface interference. Second, based on a binary mask image, inverse polar coordinate transformation is used to non-destructively unfold the annular weld into a strip-shaped planar image. Finally, combining the camera calibration parameters with the scale relationship of the polar coordinate transformation, high-precision dimensional measurement is performed on the two-dimensional planar image to obtain the physical dimensions of the weld. This invention effectively solves the problem of accurate measurement of cylindrical curved surface welds by deeply coupling targeted semantic segmentation with optimized polar coordinate transformation, significantly improving the robustness and accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of dimensional measurement, and in particular to a method and system for measuring the dimensions of the annular weld seam of a cylindrical battery. Background Technology

[0002] In the manufacturing process of power batteries, laser welding is one of the core processes, including the encapsulation of electrode tabs and the sealing of the casing for cylindrical batteries. The geometric dimensions of the weld, especially its width and length, directly determine the battery's sealing performance, safety, and cycle life. Deviations in weld dimensions can lead to serious safety hazards such as insufficient airtightness, internal short circuits, or even explosions. Therefore, high-precision and high-efficiency automated inspection of weld dimensions is crucial.

[0003] Traditional inspection methods mainly rely on manual visual inspection or simple image processing techniques. However, the inspection of weld seams in cylindrical batteries faces many technical challenges: First, the surface of the metal casing has strong specular reflective properties, and phenomena such as spatter and oxidation generated during the welding process can easily lead to local overexposure or noise in the image, seriously interfering with the clear imaging of the weld seam area; second, the weld seam and the base material have little difference in material and color, and there is a heat-affected zone, resulting in a gradient transition at the boundary rather than a clear edge, causing the boundary to be blurred; finally, the weld seam surrounds the cylinder and appears as an arc or ring in the two-dimensional image, and direct measurement will introduce curvature distortion, and the starting position of the weld seam is random.

[0004] While there are reports of using semantic segmentation for weld seam recognition or polar coordinate transformation for ring target measurement in existing technologies, these technologies are usually applied independently, and their combination is merely a simple process assembly. They fail to systematically optimize for specific challenges in cylindrical battery weld seam inspection, such as high reflectivity and blurred boundaries, resulting in insufficient detection accuracy and robustness under complex working conditions. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method and system for measuring the size of the annular weld seam of a cylindrical battery, so as to achieve high-precision and high-robust automated measurement of the annular weld seam of a cylindrical battery.

[0006] To achieve the objective, the present invention provides the following technical solution: A method for measuring the dimensions of the annular weld seam of a cylindrical battery, comprising the following steps: Step S1: Acquire the original image of the annular weld containing the cylindrical battery using a camera; Step S2: Input the original image into the pre-trained semantic segmentation network to obtain a binary mask image containing only the annular weld seam; wherein, the semantic segmentation network is based on the STDC-Seg architecture and includes a prediction head that outputs the segmentation results, the prediction head including a parallel semantic head and a detail head; the detail head is used to enhance the segmentation accuracy of the weld seam boundary, and the semantic head is used to generate the binary mask image. Step S3: Based on the above binary mask image, determine the annular region of the original image, perform polar coordinate transformation based on inverse mapping on the annular region, and unfold the annular region into a two-dimensional planar image; the above inverse mapping is performed by calculating the polar radius and polar angle corresponding to each pixel in the two-dimensional planar image in the original image and sampling them. Step S4: Perform image processing operations on the above two-dimensional planar image to extract the contour of the annular weld and calculate the pixel length and pixel width of the annular weld in the pixel coordinate system. Step S5: Combining the pre-calibrated camera parameters and the scale relationship of polar coordinate transformation, convert the above pixel length and pixel width into millimeter-level weld physical dimensions.

[0007] Furthermore, in step S2 above, the semantic segmentation network includes a backbone network for extracting features, an attention refining module for enhancing high-level semantics, a feature fusion module for fusing high- and low-level features, and the prediction head mentioned above.

[0008] Furthermore, the aforementioned detail head is trained through a multi-scale edge label generation module based on the Laplacian operator; when training the semantic segmentation network, a joint loss function is used for optimization. The joint loss function consists of Dice loss and cross-entropy loss for overall segmentation accuracy, and L1 loss for boundary constraints.

[0009] Furthermore, the aforementioned multi-scale edge label generation module is specifically used to: perform Laplacian convolutions with strides of 1, 2, and 4 on the segmentation annotation maps respectively to obtain three edge response maps of different scales; and then upsample the three edge response maps of different scales to their original size and fuse them to generate detail annotation maps for supervising detail head training.

[0010] Furthermore, in step S2 above, the training data used to train the semantic segmentation network has undergone data augmentation processing before being input into the network. This data augmentation processing includes at least the following: HSV color space enhancement is used to simulate metal reflection under different light source conditions; Specular reflection simulation is used to superimpose high-brightness spots onto random areas of the image to enhance the model's ability to resist reflective interference; and MixUp is a blending enhancement tool used to blend two images at random ratios to improve the generalization ability of a model.

[0011] Furthermore, in step S3 above, the inverse mapping of the polar coordinate transformation specifically includes: Determine the coordinates of the center of the annular region. , ) and maximum radius Set the height of the two-dimensional planar image to Width is 2π ;in, It is the radius in pixels; For any pixel position in a two-dimensional plane image ( , ), calculate its corresponding polar angle according to the following formula. With polar radius :

[0012]

[0013] in, The width of the above two-dimensional planar image, This is the angle fine-tuning constant; Based on the transformation relationship between polar coordinates and Cartesian coordinates, calculate the corresponding Cartesian coordinates (x, y) in the original image: Finally, by performing bilinear interpolation sampling on the original image at Cartesian coordinates (x, y), a two-dimensional planar image is obtained at (x, y). , The pixel value at ().

[0014] A system for measuring the dimensions of annular weld seams in cylindrical batteries, used to perform the above-described method, comprising: The image acquisition module is used to acquire the original image containing the annular weld seam of the cylindrical battery; The weld seam segmentation module has an embedded semantic segmentation network based on the STDC-Seg architecture and containing detailed supervision, which is used to accurately segment the weld seam region from the original image. The image unfolding module is used to perform an inverse mapping polar coordinate transformation on the annular region based on the segmentation results, and unfold it into a planar image; The dimension measurement module is used to process planar images, calculate the pixel dimensions of welds, and convert them into physical dimensions by combining calibration parameters and scale relationships.

[0015] Compared with the prior art, the present invention has the following advantages: Firstly, this invention introduces the STDC-Seg semantic segmentation network with detail head supervision, and combines it with targeted data enhancement such as specular reflection simulation, which can effectively overcome interference such as high metal reflectivity and blurred boundaries, achieving fine and robust segmentation of the weld area. Compared with general segmentation models, the segmentation network of this invention has higher positioning accuracy for weld boundaries, especially performing excellently in weak boundary areas such as the heat-affected zone.

[0016] Secondly, this invention uses polar coordinate transformation based on inverse mapping to unfold the segmented annular weld seam, avoiding the pixel holes and overlap problems common in traditional forward mapping, ensuring the quality of the two-dimensional planar image, and providing a reliable foundation for subsequent high-precision dimensional measurement.

[0017] Thirdly, this invention deeply couples targeted semantic segmentation with optimized polar coordinate transformation, forming a complete end-to-end detection scheme. The segmentation step accurately locates the region of interest for the measurement step, greatly reducing the interference of background noise on polar coordinate transformation and measurement; while the polar coordinate transformation transforms the complex circular measurement problem into a simple linear measurement problem. This synergistic effect significantly improves the accuracy and stability of the entire detection system in complex industrial environments.

[0018] Fourth, by combining the geometric constraints of camera calibration and polar coordinate transformation, this invention establishes a precise mapping model from pixel size to physical size, realizing the measurement of weld geometry with micron-level precision, and meeting the high standard requirements of power battery manufacturing. Attached Figure Description

[0019] Figure 1 This is a flowchart of the cylindrical battery weld size detection method based on semantic segmentation and polar coordinate expansion in this invention.

[0020] Figure 2 This is the overall network structure of STDC-Seg in this invention.

[0021] Figure 3 This is the network structure of the ConvX unit module in this invention.

[0022] Figure 4 This is the network structure of the STDC module in this invention.

[0023] Figure 5 This is the network structure of the Attention Refinement Module (ARM) in this invention.

[0024] Figure 6 This is the network structure of the Feature Fusion Module (FFM) in this invention.

[0025] Figure 7 This is the network structure of the prediction head in this invention.

[0026] Figure 8 This is the network structure of the multi-scale edge label generation module in this invention.

[0027] Figure 9 This is a structural block diagram of the cylindrical battery weld seam size detection system based on semantic segmentation and polar coordinate expansion in this invention. Detailed Implementation

[0028] Specific embodiments of the present invention will now be described with reference to the accompanying drawings. Many details are described below to provide a comprehensive understanding of the invention; however, those skilled in the art will be able to implement the invention without these details.

[0029] like Figures 1 to 8 As shown, a method and system for measuring the dimensions of the annular weld seam of a cylindrical battery includes the following steps: Step S1: Obtain the original image of the annular weld containing the cylindrical battery using a camera.

[0030] Specifically, an industrial camera (e.g., an area-array CCD camera) is used in conjunction with a ring light source or a coaxial light source to acquire an original image containing the annular weld seam on the cylindrical battery casing. To improve the accuracy of subsequent processing, the acquired image can be preprocessed, such as filtered for noise reduction, before being used in step S2.

[0031] Step S2: Input the original image into a pre-trained semantic segmentation network to obtain a binary mask image containing only the annular weld seam.

[0032] Because the weld area is often accompanied by high reflectivity and interference, and the boundary with the base material is blurred, traditional segmentation networks struggle to achieve ideal results. Therefore, this invention employs a semantic segmentation network based on the STDC-Seg network.

[0033] like Figure 2 As shown, the semantic segmentation network includes a backbone network (composed of ConvX and STDC modules) for extracting features, an attention refinement module (ARM) for enhancing high-level semantics, a feature fusion module (FFM) for fusing high- and low-level features, and a prediction head for outputting segmentation results.

[0034] like Figure 2 and Figure 3As shown, the ConvX unit module is used to achieve linear transformation and nonlinear enhancement of features while maintaining computational efficiency. Its core idea is to integrate convolution, normalization, and activation operations in a single module to construct a standardized feature transformation unit. The ConvX unit module consists of three layers: the first layer is a convolutional layer (Conv), used to extract spatial features and local patterns; the second layer is a batch normalization layer (BN), used to stabilize the training process and improve the model's generalization performance; and the third layer is a ReLU activation function, used to enhance the model's nonlinear expressive power. These three layers are sequentially connected to form a standard convolutional computation unit, which can be flexibly combined in the STDC main structure to construct feature layers with different receptive field depths. This module effectively improves the stability and efficiency of feature extraction, ensures the smoothness of gradient propagation between different layers of the network, and achieves enhanced feature discriminativeness with lower computational cost.

[0035] like Figure 2 and Figure 4 As shown, the STDC module aims to improve the network's expressive power and inference speed by achieving rapid aggregation and effective reuse of multi-level features while ensuring efficient feature extraction. The core idea is to extract features from different receptive fields using progressively stacked convolutional units, and to fuse shallow and deep features through a dense concatenation mechanism, thus balancing local details with global semantics. The STDC module consists of multiple cascaded convolutional sub-modules (ConvX). The first ConvX uses a 1×1 convolution for channel compression and feature mapping adjustment, while subsequent ConvXs use 3×3 convolutions to progressively extract spatial context information. If the input stride is 2, a 3×3 average pooling (AVG Pool) operation is introduced in the side path to maintain feature alignment. The outputs of all convolutional paths are concatenated and merged at the end through a feature fusion unit (Fusion) to achieve multi-scale feature integration. This design enables rich semantic modeling and structural reuse at shallower network layers, significantly reducing redundant computation and improving inference speed, while maintaining high feature recognition accuracy, providing an efficient feature extraction backbone structure for lightweight semantic segmentation networks.

[0036] like Figure 2 and Figure 5As shown, the Attention Refinement Module (ARM) aims to enhance high-level features at the channel level within the semantic path, thereby improving the global perception and semantic discriminative power of feature representations. The core idea of ​​this module is to utilize global contextual information to guide feature selection, suppressing redundant channels and highlighting key semantic channels through an attention mechanism. The structure of the Attention Refinement Module (ARM) includes: performing a 3x3 convolution on the input feature map to extract local context; then obtaining global statistical information in the channel dimension through global average pooling; followed by a 1x1 convolution, batch normalization, and sigmoid activation to generate channel attention weights; and finally, multiplying these weights with the original features channel-by-channel to achieve feature weighting. The ARM module can effectively enhance the feature representation capabilities of semantic branches without increasing computational load, improving the network's perception accuracy of target regions and providing cleaner and more discriminative high-level semantic information for subsequent feature fusion.

[0037] like Figure 2 and Figure 6 As shown, the Feature Fusion Module (FFM) aims to achieve effective information complementarity and joint optimization between spatial and semantic branches. The core idea of ​​this module is to unify spatial and semantic scales, fusing low-level detailed features with high-level semantic features to simultaneously preserve boundary details and global semantic consistency. Structurally, the FFM module receives high-resolution low-semantic features from the spatial path and low-resolution high-semantic features from the semantic path. First, the semantic features are upsampled to match the spatial scale. Then, the two are concatenated along the channel dimension, and channel compression and feature alignment are performed through a 1x1 convolution. Following batch normalization and non-linear activation, a 3x3 convolution is used to fully fuse multi-scale features, ultimately outputting a comprehensive feature map with rich spatial details and strong semantic expression. The Feature Fusion Module (FFM) significantly improves the boundary accuracy and region consistency of the segmentation results while ensuring computational efficiency, providing high-quality fused feature support for downstream semantic segmentation tasks.

[0038] like Figure 2 and Figure 7As shown, the prediction head is used to jointly model pixel-level semantic classification and detail boundary refinement in the semantic segmentation network. Its function is to simultaneously consider high-level semantic recognition and low-level detail recovery capabilities in the output stage, thereby generating segmentation results with accurate boundaries and semantic consistency. The core idea of ​​this module is to further refine and classify the fused feature map through multi-layer convolutional feature transformation, forming a semantic prediction map or a detail boundary map. The prediction head includes a parallel semantic head (Seg Head) and a detail head (Detail Head). The detail head is used to enhance the model's sensitivity to weld boundaries and improve the segmentation accuracy of weld boundaries; the semantic head is used to generate the final binary mask image. The specific structure of the prediction head includes: first, performing a 3×3 convolution operation on the input features to capture local contextual information; then, standardizing the feature distribution through a batch normalization layer and achieving non-linear enhancement through the ReLU activation function; finally, performing channel compression through a 1×1 convolution to map high-dimensional features to the category dimension or detail channel output. The prediction head can effectively integrate spatial and semantic information to achieve high-resolution semantic prediction and fine characterization of edge regions. It maintains high inference efficiency while improving segmentation accuracy, and provides a unified prediction output structure for semantic segmentation and detail supervision tasks.

[0039] like Figure 2 and Figure 8 As shown, to train the aforementioned detail head, this invention designs a multi-scale edge label generation module (Detail Ground-truth Generation). This module does not rely on manual edge annotation but automatically generates detail labels (Detail Ground-truth) directly from the segmentation annotation map (Seg GT). Specifically, the segmentation annotation map is convolved with Laplacian kernels with strides of 1, 2, and 4 to obtain three edge response maps at different scales, which are used to capture boundary information of different levels of detail. The three edge response maps at different scales are upsampled to the original image size and fused through a 1x1 convolutional layer to generate the final detail annotation map. In this way, the model can learn multi-scale boundary features, significantly improving its ability to recognize blurred boundaries.

[0040] When training the semantic segmentation network, a joint loss function is used for optimization, expressed by the formula:

[0041] in, For semantic segmentation loss, a combination of Dice loss and cross-entropy loss (BCE loss) is adopted to improve the overall segmentation accuracy; To minimize detail loss, L1 loss is applied to the boundary pixel region to strongly constrain the predicted boundary. It is the weighting coefficient that balances the two parts of the loss.

[0042] Regarding training data, to enhance the model's robustness to real-world conditions such as high reflectivity and uneven lighting, this invention employs various data augmentation strategies: HSV color space enhancement: Randomly adjust the brightness, saturation, and hue of training images in the HSV color space to simulate image changes under different light sources and metal reflection conditions.

[0043] Specular reflection simulation: High-brightness circular or elliptical spots are superimposed on random areas of the training image to simulate welding spatter or strong reflective points on the metal surface, forcing the model to learn to ignore such non-defect interference.

[0044] Random blurring: The training image is blurred using median filtering.

[0045] MixUp Enhancement: By fusing two different training images at the pixel level according to a random ratio generated by the Beta distribution, the model's generalization ability and robustness to imbalanced sample problems are improved.

[0046] The original image obtained in step S1 is input into the semantic segmentation network trained above. The semantic segmentation network outputs a binary mask image, in which the region with a pixel value of 1 is the accurately segmented weld seam region.

[0047] Step S3: Based on the binary mask image, determine the annular region of the original image, perform polar coordinate transformation based on inverse mapping on the annular region, and unfold the annular region into a two-dimensional planar image. The inverse mapping is performed by calculating and sampling the polar radius and polar angle corresponding to each pixel in the two-dimensional planar image in the original image to avoid pixel holes.

[0048] After obtaining the binary mask image of the weld area, its annular region in the original image can be determined (for example, by obtaining the center of the circle using the minimum circumcircle algorithm). , ) and maximum radius To facilitate measurement, the annular region needs to be unfolded into a planar strip image. Traditional forward mapping (i.e., mapping from the original image to a two-dimensional planar image) is prone to holes or overlaps. To solve this problem, this invention employs a reverse mapping method.

[0049] The core idea of ​​this inverse mapping method is to traverse every pixel in the two-dimensional planar image and calculate its corresponding position in the original image. The specific steps are as follows: First, set the dimensions of the two-dimensional planar image: height H = Width W = 2π ;in, It is the radius in pixels (i.e., the number of pixels occupied by the radius).

[0050] For any pixel in a two-dimensional plane image ( , )( The coordinates are row coordinates, with 0 representing the innermost circle; (These are column coordinates, with 0 representing the starting angle), and their corresponding polar coordinates ( , The calculation is as follows:

[0051]

[0052] in, It is a tiny constant used to adjust the starting point of the unfolding.

[0053] Then, the polar coordinates ( , Convert the x and y coordinates to Cartesian coordinates (x, y) in the original image:

[0054]

[0055] Finally, since Cartesian coordinates (x, y) are usually not integer coordinates, it is necessary to obtain the pixel value at that location by performing bilinear interpolation on the original image and then filling it into the two-dimensional plane image. , (Location). Since each pixel in a two-dimensional planar image is calculated to have an effective mapping, this method can completely avoid the pixel hole problem. Of course, if lower precision is required, nearest neighbor interpolation can also be used to obtain the pixel value at that location.

[0056] Step S4: Perform image processing operations on the two-dimensional planar image to extract the contour of the annular weld and calculate the pixel length and pixel width of the annular weld in the pixel coordinate system.

[0057] In the two-dimensional planar image obtained in step S3, the annular weld appears as an approximately straight strip-shaped region. At this point, its size can be calculated using conventional image processing methods. For example, the upper and lower boundaries of the weld can be extracted using edge detection (such as the Canny operator). Then, for multiple sampling points arranged horizontally along the two-dimensional planar image (corresponding to the weld's circumference), the distance between the upper and lower boundaries is calculated one by one to obtain the pixel width of the weld at each sampling point (i.e., the number of pixels the weld occupies in the vertical direction). The length of the entire two-dimensional planar image in the horizontal direction is the pixel length of the weld (i.e., the number of pixels the weld occupies in the horizontal direction).

[0058] Preferably, for the width of multiple sampling points, statistical measures such as average width, minimum width, and maximum width are calculated to effectively identify anomalies such as local narrowing. Among them, the average width is taken as the pixel width of the entire weld seam.

[0059] Step S5: Combining the pre-calibrated camera parameters and the scale relationship of polar coordinate transformation, the pixel length and pixel width are converted into millimeter-level weld physical dimensions.

[0060] Specifically, the spatial resolution, denoted as k (mm / pixel), is obtained through camera calibration. Through polar coordinate transformation, the conversion coefficient between the vertical direction (corresponding to the direction of the cylinder generatrix) and the horizontal direction (corresponding to the weld circumference) is k. Therefore, the physical length of the weld... With physical width The calculation is as follows:

[0061]

[0062] in, and These are the pixel length and pixel width measured in step S4 (with the average width as the pixel width).

[0063] Through the above steps, this invention achieves fully automated, high-precision, and highly robust detection of the annular weld seam of cylindrical batteries, from image acquisition to physical dimension output.

[0064] like Figures 1 to 9 As shown, this invention also discloses a system for measuring the dimensions of annular weld seams in cylindrical batteries, used to perform the above-described method. The system includes an image acquisition module, a weld seam segmentation module, an image unfolding module, and a dimension measurement module. The image acquisition module acquires an original image containing the annular weld seam of the cylindrical battery. The weld seam segmentation module embeds a semantic segmentation network based on the STDC-Seg architecture and including detailed supervision to accurately segment the weld seam region from the original image. The image unfolding module performs an inverse polar coordinate transformation on the annular region based on the segmentation results, unfolding it into a planar image. The dimension measurement module performs image processing on the planar image, calculates the pixel dimensions of the weld seam, and converts them into physical dimensions by combining calibration parameters and scale relationships.

[0065] The above are merely specific embodiments of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial modifications made to the present invention using this concept shall be considered as infringing upon the protection scope of the present invention.

Claims

1. A method for measuring the dimensions of the annular weld seam of a cylindrical battery, characterized in that, Includes the following steps: Step S1: Acquire the original image of the annular weld containing the cylindrical battery using a camera; Step S2: Input the original image into a pre-trained semantic segmentation network to obtain a binary mask image containing only the annular weld seam; wherein, the semantic segmentation network is based on the STDC-Seg architecture and includes a prediction head that outputs the segmentation results, the prediction head including a parallel semantic head and a detail head; the detail head is used to enhance the segmentation accuracy of the weld seam boundary, and the semantic head is used to generate the binary mask image; Step S3: Based on the binary mask image, determine the annular region of the original image, perform a polar coordinate transformation based on inverse mapping on the annular region, and unfold the annular region into a two-dimensional planar image; the inverse mapping is performed by calculating and sampling the polar radius and polar angle corresponding to each pixel in the two-dimensional planar image in the original image; Step S4: Perform image processing operations on the two-dimensional planar image to extract the contour of the annular weld and calculate the pixel length and pixel width of the annular weld in the pixel coordinate system. Step S5: Combining the pre-calibrated camera parameters and the scale relationship of polar coordinate transformation, the pixel length and pixel width are converted into millimeter-level weld physical dimensions.

2. The method for measuring the circumferential weld size of a cylindrical battery according to claim 1, characterized in that, In step S2, the semantic segmentation network includes a backbone network for extracting features, an attention refining module for enhancing high-level semantics, a feature fusion module for fusing high- and low-level features, and the prediction head.

3. A method for measuring the circumferential weld size of a cylindrical battery according to claim 1 or 2, characterized in that, The detail head is trained through a multi-scale edge label generation module based on the Laplacian operator; when training the semantic segmentation network, a joint loss function is used for optimization, which consists of Dice loss and cross-entropy loss for overall segmentation accuracy, and L1 loss for boundary constraints.

4. The method for measuring the circumferential weld size of a cylindrical battery according to claim 3, characterized in that, The multi-scale edge label generation module is specifically used to: perform Laplacian convolution with strides of 1, 2, and 4 on the segmentation annotation map to obtain three edge response maps of different scales; and then upsample the three edge response maps of different scales to their original size and fuse them to generate a detail annotation map for supervising detail head training.

5. The method for measuring the circumferential weld size of a cylindrical battery according to claim 3, characterized in that, In step S2, the training data used to train the semantic segmentation network has undergone data augmentation processing before being input into the network. This data augmentation processing includes at least the following: HSV color space enhancement is used to simulate metal reflection under different light source conditions; Specular reflection simulation is used to superimpose high-brightness spots onto random areas of the image to enhance the model's ability to resist reflective interference; and MixUp is a blending enhancement tool used to blend two images at random ratios to improve the generalization ability of a model.

6. The method for measuring the circumferential weld size of a cylindrical battery according to claim 1, characterized in that, In step S3, the inverse mapping of the polar coordinate transformation specifically includes: Determine the coordinates of the center of the annular region. , ) and maximum radius Set the height of the two-dimensional planar image to Width is 2π ;in, It is the radius in pixels; For any pixel position in a two-dimensional plane image ( , ), calculate its corresponding polar angle according to the following formula. With polar radius : in, The width of the above two-dimensional planar image, This is the angle fine-tuning constant; Based on the transformation relationship between polar coordinates and Cartesian coordinates, calculate the corresponding Cartesian coordinates (x, y) in the original image: Finally, by performing bilinear interpolation sampling on the original image at Cartesian coordinates (x, y), a two-dimensional planar image is obtained at (x, y). , The pixel value at ().

7. A system for measuring the dimensions of annular weld seams in a cylindrical battery, used to perform the method according to any one of claims 1 to 6, characterized in that, include: The image acquisition module is used to acquire the original image containing the annular weld seam of the cylindrical battery; The weld seam segmentation module has an embedded semantic segmentation network based on the STDC-Seg architecture and containing detailed supervision, which is used to accurately segment the weld seam region from the original image. The image unfolding module is used to perform an inverse mapping polar coordinate transformation on the annular region based on the segmentation results, and unfold it into a planar image; The dimension measurement module is used to process planar images, calculate the pixel dimensions of welds, and convert them into physical dimensions by combining calibration parameters and scale relationships.