A Visual Inspection Method for the Welding Quality of Lithium Battery Posts

The STDCNet-based visual detection method addresses precision and speed issues in lithium battery terminal welding by employing data augmentation and advanced feature extraction, resulting in efficient and accurate defect identification.

CN119672023BActive Publication Date: 2025-07-15JIANGSU MINGYIXIN INTELLIGENT EQUIPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510187112.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-07-15
Estimated Expiration
2045-02-20

AI Technical Summary

Technical Problem

The existing lithium battery pole welding quality detection technology has problems such as low detection accuracy, insufficient generalization adaptability, slow detection speed, and large samples required.

Method used

A visual detection method for the welding quality of the electrode column of lithium battery is adopted, including data preprocessing, construction and training of visual detection models, features are extracted using STDCNet network, pyramid pooling module and attention fusion module are designed, and combined with Lovaszloss loss function and mixed evaluation indicators are used to perform semantic segmentation and post-processing.

Benefits of technology

It improves the accuracy and speed of electrode column welding quality detection of lithium battery, reduces manual intervention, adapts to different light source conditions, and is suitable for actual scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119672023B_ABST
    Figure CN119672023B_ABST
Patent Text Reader

Abstract

The present invention discloses a visual inspection method for the welding quality of lithium battery pole columns, including: Step S1, obtaining lithium battery pole column welding images and pixel-level annotation images corresponding to each welding image to form a sample set; Step S2, preprocessing the training sample set train; Step S3, building a visual inspection model; Step S4, training the visual inspection model, saving the training weight file of the visual inspection model, and generating a visual inspection model; Step S5, respectively inputting the lithium battery pole column welding images to be tested into the trained visual inspection model to obtain a segmentation result map, and processing the segmentation result map to obtain a semantic segmentation region result map; Step S6, post-processing the semantic segmentation region result map, processing the filtering of internal mixing and too small pixels in the segmentation, to obtain the final semantic segmentation type region result map. The present invention solves the disadvantages of low detection accuracy, insufficient generalization adaptability, slow detection speed, and large number of samples required in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of welding defect detection, and in particular to a visual inspection method for the welding quality of lithium battery poles. Background Art

[0002] As a high-energy density energy storage device, lithium batteries play a crucial role in new energy vehicles, portable electronic devices, and large-scale energy storage systems. The welding of lithium battery poles, as a key link in the lithium battery assembly process, is directly related to the safety, reliability, and electrical performance of the battery. The welding quality of lithium batteries not only affects the electrical connection stability of the battery but also determines the sealing and thermal stability of the battery during the cyclic charge and discharge process, thus affecting the service life and safety of the entire battery system.

[0003] During the manufacturing process of lithium batteries, the welding process of poles (usually metal components at the positive and negative connections) faces many challenges. Microscopic defects in the welding area, such as incomplete fusion, pores, cracks, etc., may all become risk sources for internal short circuits or liquid leakage in the battery. Therefore, it is crucial to conduct strict non-destructive inspections on the welding quality of poles to ensure that each battery meets the established quality standards and safety requirements.

[0004] Traditionally, the detection of the welding quality of lithium battery poles relies on manual visual inspection. However, this method is greatly affected by the experience, fatigue, and subjective judgment of inspectors, and it is difficult to achieve high-precision and high-efficiency defect identification. In view of this, the adoption of advanced visual inspection technologies, especially vision-based automatic inspection methods, has become an inevitable trend to improve the inspection efficiency and accuracy.

[0005] However, due to the complexity of the material reflection characteristics, welding sparks, and ambient light in the welding area of lithium battery poles, the original images often have problems such as low contrast and blurred details, which bring great difficulties to quality inspection and defect identification.

[0006] To address this problem, existing detection technologies, such as defect detection methods based on multi-thresholds and support vector machines, and defect detection methods based on convolutional neural networks, although they can detect the welding quality and welding defects to a certain extent, have limitations in practical applications. For example, although multi-thresholds can highlight certain features, different thresholds often need to be set for different defects, and the parameters are difficult to adjust. Moreover, the generalization ability under different light source conditions for the same type of defect is very weak, making it difficult to apply in practice. Most defect detection methods based on convolutional neural networks generally lose a lot of image details due to excessive downsampling for large-resolution images of industrial cameras in practice (usually 5 million pixels to 50 million pixels), resulting in insufficient detection ability, long detection time, and the limitation of requiring a large number of defective samples.

[0007] Therefore, in view of the above problems, a visual inspection method for the welding quality of lithium battery poles is provided. Summary of the Invention

[0008] The purpose of the present invention is to provide a visual inspection method for the welding quality of lithium battery poles to overcome the existing defects, and solve the problems of low detection accuracy, insufficient generalization and adaptation ability, slow detection speed, and large number of samples required in the prior art.

[0009] The technical solution to achieve the above purpose is as follows:

[0010] A visual inspection method for the welding quality of lithium battery poles, including:

[0011] Step S1: Obtain the welding images of lithium battery poles and the pixel-level annotation images corresponding to each welding image to form a sample set. Among them, 80% of the samples are selected as the training sample set train, and the remaining samples are used as the test sample set val;

[0012] Step S2: Preprocess the training sample set train;

[0013] Step S3: Build a visual inspection model;

[0014] Step S4: Train the built visual inspection model, save the training weight file of the visual inspection model, and generate a visual inspection model;

[0015] Step S5: Input the welding images of the lithium battery poles to be tested into the trained visual inspection model respectively to obtain a segmentation result map, and process the segmentation result map to obtain a semantic segmentation region result map;

[0016] Step S6: Post-process the obtained semantic segmentation region result map to process the filtering of internal mixing and too small pixels in the segmentation to obtain the final semantic segmentation type region result map.

[0017] Preferably, in step S2, preprocessing the training sample set train includes:

[0018] Calculating the frequency of each category in the training sample set train And normalizing it to a frequency:

[0019] ;

[0020] ;

[0021] In the formula, is the serial number of the class, is the sample, is the pixel distribution of the statistical sample, is the set of the number of corresponding pixels for all types, is the set after being converted into frequencies;

[0022] Calculate the inverse frequency of the training sample set train :

[0023] ;

[0024] Perform Softmax normalization and smooth the weights for the inverse frequency according to the given parameter :

[0025] ;

[0026] In the formula, is the coefficient affecting the smoothness of the weight distribution, is the set of weights after normalization and smoothing;

[0027] On the basis of obtaining the above parameters, calculate the parameter , calculate the minimum width and height in the labeled samples, and calculate the number of classes in the labeled samples. When including the background cls: there are two classes , when there are multiple classes ;

[0028] Among them, the formula for calculating the parameter is as follows:

[0029] ;

[0030] In the formula, is the frequency of class , is the total number of classes, is the maximum value among all class frequencies;

[0031] First, magnify by 10,000 times and round up to maintain a certain precision, then restore it to the original ratio and limit the minimum value to 0.001, thereby obtaining the parameter ;

[0032] Calculate the mean and standard deviation of the image channels of the dataset, and perform hybrid augmentation such as flipping, random rotation, random scaling, saturation, and random Gaussian noise on the images in the training sample set train and automatically generate corresponding labels. Combine the processed images with train to form the training dataset train1.

[0033] Preferably, in the step S3, constructing a visual detection model includes:

[0034] Backbone network for feature extraction through the STDCNet network;

[0035] Pool the feature maps at different scales through the pyramid pooling module, and then splice or fuse the pooled features, specifically including:

[0036] The pyramid pooling module contains three global average pooling operations, and the corresponding pooling kernel sizes are 1×1, 2×2, and 4×4 respectively. The convolution operation uses a 1×1 convolution kernel, and the number of output channels is less than the number of input channels. Add the upsampled features and use a 3×3 convolution operation to generate fine features;

[0037] Design a decoder. In the three-layer network of the decoder, gradually increase the spatial size of the feature map while gradually reducing the number of channels of the features;

[0038] Design an attention fusion module, utilize the channel attention mechanism to generate a weight matrix , and multiply the input features by the weight matrix. After weighting, obtain the fused feature map, that is:

[0039] ;

[0040] ;

[0041] In the formula, is the splicing of the feature maps of AvgPool( ), MaxPool( ), AvgPool( ), MaxPool( ), is the convolution operation, is the upsampling of , is the feature map of the convolutional layer, is the high-order semantic feature map after the corresponding pyramid pooling module operation and the high-order semantic feature map after passing through the attention fusion module;

[0042] Design a loss function. Since the vast majority of the lithium battery welding images are usually negative samples, the loss function is designed as:

[0043] Modify the binary cross-entropy loss to a type-weighted multi-class loss:

[0044] ;

[0045] In the formula, is the total number of classes, is the target distribution of the th class, is the probability distribution of the prediction for the Probability of class;

[0046] Furthermore, to address the issue of excessive background proportion in the images of lithium battery pole welding, which belongs to sample extreme imbalance, in order to reduce the proportion of background pixels during calculation and further reduce the computational amount, only the losses of some samples are calculated. The loss is adjusted to:

[0047] ;

[0048] ;

[0049] ;

[0050] In the formula, is the pixel The predicted probability belonging to the target class, is the total number of pixels in the image;

[0051] Considering the imbalance between samples, the loss function uses Lovasz loss:

[0052] ;

[0053] In the formula, is the task type cls obtained by preprocessing the training sample set train, is the normalization constant, representing the total number of pixels of the class is the class set of valid pixels, is the class IoU gradient change, is the class sorting classification error;

[0054] The final loss function is calculated as:

[0055] ;

[0056] In the formula, is hyperparameter;

[0057] Design evaluation metrics. In the lithium battery pole welding image dataset, there are extremely large sample imbalance and small target problems. The metrics use a hybrid metric of t = 0.4 * mIOU and 0.6 * DICE, and then a visual detection model is obtained.

[0058] Preferably, in step S4, training the constructed visual detection includes:

[0059] ​The welding images and their corresponding label images in the training sample set train1 after data augmentation are utilized;

[0060] For preprocessing, normalization is performed using the mean and standard deviation of the image channels of the data set. The stochastic gradient descent method is adopted, and learning rate warm-up is carried out, and iterative training is performed respectively;

[0061] During the iterative training process, after each iteration, the trained visual detection model is used to verify the test sample set val;

[0062] When the index is greater than the training is stopped and the parameters of the visual detection model are saved, thus completing the training of the visual detection model;

[0063] Among them, is the saving period for model evaluation, and

[0064] Preferably, in the step S6, for dealing with the filtering of internal mixing and too small pixels in the segmentation, the operation is as follows:

[0065] According to the type distribution detected in the pole welding image, check images of two sizes are used to perform dilation and closing operations on the segmentation result image;

[0066] The remaining small regions are expanded using region growing, and the region boundaries are smoothed by label propagation and the mixing between labels is eliminated.

[0067] The beneficial effects of the present invention are:

[0068] 1) During the data preprocessing process of the present invention, data automatic augmentation operation is carried out, corresponding annotations are automatically generated, and the distribution of the data set is automatically statistically calculated, including weights and the number of pixels participating in the loss function calculation, etc.; the clarity, contrast, and chromaticity of some images in the training sample set are randomly changed, the sample size is expanded, which helps to improve the generalization performance of the segmentation network;

[0069] 2) In the process of designing the visual detection model of the present invention, the backbone network for feature extraction uses the STDCNet backbone network. Compared with the commonly used Resnet or HRnet, the computational complexity of the network is lower, and it can effectively extract spatial and temporal information, thereby improving the feature representation ability. And it has been actually verified that the segmentation result of the lithium electrode post welding image has not decreased; in the decoder part, pyramid pooling is performed on the feature map, and then the pooled features are concatenated or fused, deepening the fusion of semantic information at different scales to obtain more comprehensive semantic information. Compared with most spatial pyramid fusions, only average pooling and max pooling are used to further reduce the computational amount. A 1×1 convolutional layer and an activation function are used on the concatenated feature map to reduce the number of channels of the feature map and increase the non-linear transformation. This can further reduce the computational amount and improve the feature expression ability; the lightweight decoder gradually reduces the number of channels of the feature while gradually increasing the spatial size of the feature map, reducing the redundancy of the decoder; the attention module fuses the feature map of low-level semantic information and the feature map of high-level semantic information, allowing the module to calculate the weights of the two feature maps, and then adding them together, the effect is better than most of the direct addition of feature maps;

[0070] 3) The present invention processes the semantic segmentation map obtained on the test image to filter out internal miscellaneous and too small pixels. The morphological erosion operation and morphological dilation operation are used to fill the small holes in the semantic segmentation map. The label propagation smooths the region boundary and eliminates the mixture between labels, and finally the polygon chain approximation algorithm is used to simplify the result visualization of the large object of the post welding detection;

[0071] 4) Through a series of processes, the present invention makes most of the parameters that have a great impact on the visual detection model be greatly reduced by manual intervention through statistical calculation of the image data of the data set, while improving the stability of the method, making this method easier to use in actual scenarios;

[0072] In summary, the present invention not only meets the lithium battery welding quality detection, has a high defect detection accuracy rate, but also has a fast detection speed, and is easy to be applied and extended in the lithium battery post welding quality detection. Brief Description of the Drawings

[0073] Figure 1 is the flowchart of a visual detection method for the welding quality of lithium battery posts of the present invention;

[0074] Figure 2 is the structural diagram of the visual detection model design in the present invention;

[0075] Figure 3 is the structural diagram of the channel attention module in the visual detection model of the present invention;

[0076] Figure 4 It is another structural diagram of the channel attention module in the visual detection model of the present invention. Detailed implementation manners

[0077] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0078] The present invention will be further described below with reference to the accompanying drawings.

[0079] As Figure 1 shown, a visual inspection method for the welding quality of lithium battery poles includes:

[0080] Step S1, obtaining the welding images of lithium battery poles and the pixel-level annotation images corresponding to each welding image to form a sample set. Among them, 80% of the samples are selected as the training sample set train, and the remaining samples are used as the test sample set val.

[0081] Step S2, preprocessing the training sample set train.

[0082] In the embodiment, preprocessing the training sample set train includes:

[0083] Calculating the frequency of the categories in the training sample set train and normalizing it to a frequency:

[0084] ;

[0085] ;

[0086] In the formula, is the serial number of the class, is the sample, is the pixel distribution of the statistical sample, is the set of the pixel numbers corresponding to all types, is the set after being converted into a frequency;

[0087] Calculating the inverse frequency of the training sample set train :

[0088] ;

[0089] Perform Softmax normalization on the inverse frequency to smooth the weights according to the given parameters :

[0090] ;

[0091] In the formula, is the coefficient affecting the smoothness of the weight distribution, is the set of weights after normalization and smoothing;

[0092] On the basis of obtaining the above parameters, calculate the parameter , calculate the minimum width and height in the labeled samples, and calculate the number of categories in the labeled samples. When there are two categories including the background cls, , when there are multiple categories ;

[0093] Among them, the formula for calculating the parameter is as follows:

[0094] ;

[0095] In the formula, is the frequency of category , is the total number of categories, is the maximum value among all category frequencies;

[0096] First, magnify by 10,000 times and round up to maintain a certain precision, then restore it to the original ratio and limit the minimum value to 0.001, thereby obtaining the parameter ;

[0097] Calculate the mean and standard deviation of the image channels of the dataset, and perform mixed augmentation such as flipping, random rotation, random scaling, saturation, and random Gaussian noise on the images in the training sample set train and automatically generate corresponding labels. Then merge the processed images with train to form the training dataset train1.

[0098] Step S3, build a visual detection model, as shown in Figure 2 .

[0099] In the embodiment, build a visual detection model, including:

[0100] According to the manually set parameter , whether to use automatic calculation. When using automatic calculation, according to the minimum width and height, and Preprocess the original image before it enters the network, reducing the image by a certain proportion, and as a parameter limits the degree of reduction to ensure that the smallest annotation type can be detected;

[0101] Use the backbone network of STDCNet to extract features, initialize with the weights pre-trained on the dataset and adjust on the private lithium battery pole welding images as the backbone network of the model to extract features. In lithium battery pole welding, there are small types such as solder dross and welding height. This network is used to extract features, avoiding the loss of too much detailed information;

[0102] Pool the feature maps at different scales through the pyramid pooling module, and then splice or fuse the pooled features. Specifically, it includes:

[0103] The pyramid pooling module contains three global average pooling operations, and the corresponding pooling kernel sizes are 1×1, 2×2, and 4×4 respectively. The convolution operation uses a 1×1 convolution kernel, and the number of output channels is less than the number of input channels. Add the upsampled features and use a 3×3 convolution operation to generate fine features;

[0104] Design a decoder. The three-layer network in the decoder gradually increases the spatial size of the feature map while gradually reducing the number of channels of the feature, further improving the computational efficiency;

[0105] Design an attention fusion module, as Figure 3 、 4 shown, use the channel attention mechanism to generate a weight matrix , and multiply the input features by the weight matrix. After weighting, the fused feature map is obtained, that is:

[0106] ;

[0107] ;

[0108] In the formula, is the splicing of the feature maps of AvgPool( ), MaxPool( ), AvgPool( ), MaxPool( ), is the convolution operation, is the upsampling of , is the feature map of the convolutional layer, is the high-order semantic feature map after the corresponding pyramid pooling module operation and the high-order semantic feature map after passing through the attention fusion module;

[0109] Design a loss function. Since the vast majority of the lithium battery welding images are usually negative samples (background or pixels that do not need to be detected), the loss function is designed as follows:

[0110] Modify the binary cross-entropy loss to a multi-class loss weighted by type:

[0111] ;

[0112] In the formula, is the total number of classes, is the target distribution of the th class, is the probability of the th class in the predicted probability distribution;

[0113] Furthermore, to handle the situation where the background proportion in the lithium battery pole welding image is too large, which belongs to extremely unbalanced samples, in order to reduce the proportion of background pixels in the calculation and further reduce the computational amount, only calculate the loss of some samples, the loss is adjusted to:

[0114] ;

[0115] ;

[0116] ;

[0117] In the formula, is the predicted probability that the pixel belongs to the target class, is the total number of pixels in the image;

[0118] Considering the imbalance between samples, the loss function uses Lovasz loss:

[0119] ;

[0120] In the formula, is the task type cls obtained by preprocessing the training sample set train, is the normalization constant, indicating the total number of pixels of class , is the set of valid pixels of class , is the IoU gradient change of class , is the sorted classification error of class ;

[0121] The final loss function is calculated as:

[0122] ;

[0123] In the formula, is hyperparameter of

[0124] For the design evaluation index, there are great sample imbalance and small target problems in the lithium battery pole welding image dataset. The index uses a mixed index of t = 0.4*mIOU and 0.6*DICE to obtain a visual detection model.

[0125] Step S4: Train the built visual detection model, save the training weight file of the visual detection model, and generate the visual detection model.

[0126] In the embodiment, training the built visual detection includes:

[0127] Using the welding images and their corresponding label images in the augmented training sample set train1;

[0128] For preprocessing, normalize using the mean and standard deviation of the dataset image channels, and adopt the stochastic gradient descent method with learning rate warm-up for iterative training respectively;

[0129] During the iterative training process, after every iterations, use the trained visual detection model to verify the test sample set val;

[0130] When the index is greater than stop training and save the visual detection model parameters to complete the training of the visual detection model;

[0131] Among them, is the model evaluation saving period, is the reference accuracy rate.

[0132] Step S5: Input the lithium battery pole welding images to be tested into the trained visual detection model respectively to obtain the segmentation result images, and process the segmentation result images to obtain the semantic segmentation region result images.

[0133] Step S6: Post-process the obtained semantic segmentation region result images to process the filtering of internal confusion and too small pixels in the segmentation to obtain the final semantic segmentation type region result images.

[0134] In the embodiment, for the filtering of internal confusion and too small pixels in the segmentation, the operations are as follows:

[0135] According to the type distribution detected in the pole welding image, use kernels of two sizes to perform dilation and closing operations on the segmentation result image;

[0136] The two sizes of kernels are respectively:

[0137] ;

[0138] ;

[0139] Use region growing to expand the remaining small regions, and use label propagation to smooth the region boundaries and eliminate the confusion between labels.

[0140] Extract segmentation maps of different categories in multiple threads, and the thread for each category is , because some detection items in the lithium battery pole welding image, such as welding fume, lack of welding, and virtual welding, have large areas, and the number of original contour points is very large, which is not conducive to the final visualization rendering and data transmission and storage of the method. In , an improved polygon chain approximation algorithm based on Douglas-Peucker is implemented to simplify polygons or polyline chains, reduce the number of contour points, and at the same time try to maintain the original shape.

[0141] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A visual inspection method for the welding quality of lithium battery pole columns, characterized in that, Including: Step S1: Obtain the lithium battery pole welding images and the pixel-level annotation images corresponding to each welding image to form a sample set. Among them, 80% of the samples are selected as the training sample set train, and the remaining samples are used as the test sample set val; Step S2: Preprocess the training sample set train; Step S3: Build a visual detection model; Step S4: Train the built visual detection model, save the training weight file of the visual detection model, and generate the visual detection model; Step S5: Input the lithium battery pole welding images to be tested into the trained visual detection model respectively to obtain the segmentation result images, and process the segmentation result images to obtain the semantic segmentation region result images; Step S6: Post-process the obtained semantic segmentation region result images, process the filtering of internal confusion and too small pixels in the segmentation, and obtain the final semantic segmentation type region result images; In the said step S3, building a visual detection model includes: A backbone network that extracts features through the STDCNet network; Pool the feature maps at different scales through the pyramid pooling module, and then splice or fuse the pooled features. Specifically, it includes: The pyramid pooling module contains three global average pooling operations, and the corresponding pooling kernel sizes are 1×1, 2×2, and 4×4 respectively. The convolution operation uses a 1×1 convolution kernel, and the number of output channels is less than the number of input channels. Add the upsampled features and use a 3×3 convolution operation to generate fine features; Design a decoder. In the three-layer network of the decoder, while gradually increasing the spatial size of the feature map, gradually reduce the number of channels of the features; Design an attention fusion module that uses channel attention mechanism to generate a weight matrix , and multiply the input features by the weight matrix. After weighting, the fused feature map is obtained, that is: ; ; Wherein, is the concatenation of the feature maps of AvgPool( ), MaxPool( ), AvgPool( ), MaxPool( ); is the convolution operation, is the upsampling of , is the feature map of the convolutional layer, is the high-order semantic feature map after the corresponding pyramid pooling module operation and the high-order semantic feature map after passing through the attention fusion module; Design a loss function. Since the vast majority of images of lithium battery welding are usually negative samples, the loss function is designed as follows: Modify the binary cross-entropy loss to a type-weighted multi-class loss: ; In the formula, is the total number of categories, is the category target distribution, is the probability of the category in the predicted probability distribution; Furthermore, to address the issue that the background proportion in the welding image of lithium battery poles is too large, which belongs to sample extreme imbalance, in order to reduce the proportion of background pixels during calculation and further reduce the computational load, only the losses of some samples are calculated, The loss is adjusted to: ; ; ; In the formula, is the pixel is the predicted probability belonging to the target category, is the total number of pixels in the image; Considering the imbalance between samples, the loss function uses Lovasz loss: ; In the formula, is the task type cls obtained by preprocessing the training sample set train, is the normalization constant, representing the total number of pixels of the class , is the set of valid pixels of the class , is the IoU gradient change of the class , is the sorting classification error of the class ; The final loss function is calculated as: ; wherein, is hyperparameter; Design an evaluation metric. There are extremely large sample imbalance and small target problems in the lithium battery pole welding image dataset. The metric uses a mixed metric of t = 0.4*mIOU and 0.6*DICE, and then obtain the visual detection model.

2. The visual inspection method for the welding quality of a lithium battery pole column according to claim 1, wherein, In the said step S2, preprocessing the training sample set train includes: Calculate the frequency of the train category in the training sample set And normalize it to frequency: ; ; In the formula, is the serial number of the class, is the sample, is the pixel distribution of the statistical sample, is the set of the pixel numbers corresponding to all types, is the set after being converted into frequencies; Calculate the inverse frequency of the training sample set train : ; Perform Softmax normalization smoothing weights on the inverse frequency according to the given parameters : ; In the formula, is the coefficient affecting the smoothness of the weight distribution, is the set of weights after normalization and smoothing; Based on obtaining the above parameters, calculate the parameter , and calculate the minimum width and height in the labeled samples. Calculate the number of classes in the labeled samples. When there are two classes including the background cls: , and when there are multiple classes ; Among them, the calculation parameters The formula is as follows: ; Wherein, is the category frequency, is the total number of categories, is the maximum value among all category frequencies; First, magnify it by 10,000 times, round up to maintain a certain precision, then restore it to the original ratio, and limit the minimum value to 0.001, thus obtaining the parameter ; Calculate the mean and standard deviation of the image channels of the dataset, and perform mixed augmentation such as flipping, random rotation, random scaling, saturation, and random Gaussian noise on the images in the training sample set train and automatically generate the corresponding annotations. Merge the processed images with train to form the training dataset train1.

3. The visual inspection method for the welding quality of a lithium battery pole column according to claim 2, wherein, In the said step S4, training the built visual detection includes: Utilize the welding images and their corresponding label images in the training sample set train1 after data augmentation; The preprocessing uses the mean and standard deviation of the dataset image channels for normalization processing, adopts the stochastic gradient descent method, and performs learning rate warm-up and iterative training respectively; During the iterative training process, after every iterations, the trained visual detection model is used to validate the test sample set val; Stop training and save the visual detection model parameters when the indicator is greater than to complete the training of the visual detection model; Among them, is the saving period for model evaluation, is the reference accuracy rate.

4. The visual inspection method for the welding quality of a lithium battery pole column according to claim 1, characterized in that, In the said step S6, processing the filtering of internal confusion and too small pixels in the segmentation, the operations are as follows: According to the type distribution detected in the pole welding image, use two sizes of kernels to perform dilation and closing operations on the segmentation result image; Use region growing to expand the remaining small regions, and use label propagation to smooth the region boundaries and eliminate the confusion between labels.

Citation Information

Patent Citations

  • New energy lithium battery surface defect detection method based on adaptive deep learning

    CN111105405A

  • Lithium battery module busbar weld appearance detection algorithm and system

    CN114298964A