Lithium battery cap welding mark defect segmentation method and device, electronic equipment and medium

By improving the deep learning network model and combining channel attention and skip connection modules, the problem of low accuracy in solder stamp defect segmentation was solved, achieving higher accuracy in solder stamp defect identification and segmentation. This reduced the circulation of defective products, improved the identification and segmentation of solder stamp defects in lithium battery caps, and enhanced the production quality of lithium batteries.

CN120833330BActive Publication Date: 2026-02-10GUANGDONG YIKEXING MANUFACTURING TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511325333.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-17
Publication Date
2026-02-10
Estimated Expiration
2045-09-17

AI Technical Summary

Technical Problem

In existing technologies, the problem with solder stamp segmentation technology in handling complex image scenes is how to effectively solve the problem of poor segmentation results in complex industrial scenarios. In particular, the detailed features of solder stamp defects cannot be fully extracted, resulting in low segmentation accuracy. This may lead to the circulation of defective products and affect the quality of lithium battery production.

Method used

A deep learning network model with improved structure is adopted, including an encoder and four decoders. By embedding a channel attention module in the encoder and introducing a skip connection module between the encoder and decoders, the channel weights are dynamically calibrated and the spatial position is focused. By combining low-level detail information and high-level contextual information, the accuracy of weld stamp defect recognition and segmentation is improved.

Benefits of technology

It significantly improves the accuracy of identifying and segmenting solder joint defects, reduces the circulation of defective products, and enhances the overall production quality of lithium batteries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120833330B_ABST
    Figure CN120833330B_ABST
Patent Text Reader

Abstract

The application discloses a lithium battery cover cap welding mark defect segmentation method and device, electronic equipment and medium, and relates to the technical field of lithium battery defect detection. The method comprises the following steps: acquiring a lithium battery cover cap welding mark image to be processed; inputting the lithium battery cover cap welding mark image to be processed into a preset deep learning network model, performing welding mark defect identification processing on the lithium battery cover cap welding mark image, and extracting a defect prediction result; wherein the deep learning network model comprises an encoder, a first decoder, a second decoder, a third decoder and a fourth decoder; the first decoder, the second decoder, the third decoder and the fourth decoder each comprise a jump connection module and a decoding convolution layer; a channel attention module is connected between adjacent encoding convolution layers in the encoder; and an image post-processing is performed according to the defect prediction result to obtain a welding mark defect segmentation image. The recognition accuracy and segmentation accuracy of the welding mark defect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of lithium battery defect detection, and in particular to a lithium battery cover cap weld mark defect segmentation method and device, electronic equipment and a medium. BACKGROUND

[0002] Early weld mark defect segmentation technology is based on threshold segmentation of image processing technology. However, because of the influence of various noises and errors, it is often difficult to accurately segment the entire defect. As a result, image semantic segmentation technology based on full convolutional neural network appears. The image semantic segmentation technology can directly input an image of any size and output a segmentation image of the same size, without the need for complex preprocessing as in traditional methods. The image semantic segmentation technology identifies features through a neural network to improve segmentation accuracy. However, using a simple upsampling method to restore spatial resolution results in poor segmentation accuracy when processing edge details or small defects. In addition, the integration of features of different scales is not sufficient, and it is difficult to capture multi-scale context information, which performs poorly when processing complex industrial defects. In view of this, UNet (U-shaped full convolutional neural network) emerges as the times require. However, U-Net is a relatively simple image segmentation network, which may not be able to handle complex image scenes or images with fine-grained semantic information, especially the weld mark defects have many features in details. If the features cannot be completely extracted, it will result in low segmentation accuracy. In weld mark defects, if small target defects are missed due to low segmentation accuracy, it may lead to the circulation of defective products, affecting the overall production quality of lithium batteries. SUMMARY

[0003] The present application aims to at least solve one of the technical problems existing in the prior art. To this end, the present application provides a lithium battery cover cap weld mark defect segmentation method and device, electronic equipment and a medium, which can realize higher precision weld mark defect recognition through a pre-set deep learning network model with improved structure, thereby improving the recognition accuracy and segmentation accuracy of weld mark defects.

[0004] In a first aspect, an embodiment of the present application provides a lithium battery cover cap weld mark defect segmentation method, comprising:

[0005] obtaining a lithium battery cover cap weld mark image to be processed;

[0006] The image of the to-be-processed lithium battery cover cap welding mark is input into a preset deep learning network model, welding mark defect recognition processing is performed on the image of the lithium battery cover cap welding mark, and a defect prediction result is extracted; the deep learning network model comprises an encoder, a first decoder connected to an output end of the encoder, a second decoder, a third decoder, and a fourth decoder; a channel attention module is connected between adjacent encoding convolution layers in the encoder; the first decoder, the second decoder, the third decoder, and the fourth decoder form a layer-by-layer decoding structure and each comprise a skip connection module and a decoding convolution layer; the welding mark defect recognition processing comprises: performing layer-by-layer encoding processing on the image of the lithium battery cover cap welding mark by the encoder to obtain a first encoding feature map, a second encoding feature map, a third encoding feature map, a fourth encoding feature map, and a fifth encoding feature map; performing layer-by-layer feature fusion decoding processing on the first encoding feature map, the second encoding feature map, the third encoding feature map, the fourth encoding feature map, and the fifth encoding feature map by the first decoder, the second decoder, the third decoder, and the fourth decoder to obtain fourth decoding information; and the tenth decoding feature map in the fourth decoding information is determined as the defect prediction result.

[0007] Image post-processing is performed according to the defect prediction result to obtain a welding mark defect segmentation image.

[0008] In a second aspect, an embodiment of the present application provides a lithium battery cover cap welding mark defect segmentation device, comprising at least one processor and a memory in communication connection with the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the lithium battery cover cap welding mark defect segmentation method according to any one of the embodiments of the first aspect.

[0009] In a third aspect, an embodiment of the present application provides an electronic device comprising the lithium battery cover cap welding mark defect segmentation device according to the embodiment of the second aspect.

[0010] In a fourth aspect, an embodiment of the present application provides a computer readable storage medium storing computer executable instructions for causing a computer to execute the lithium battery cover cap welding mark defect segmentation method according to any one of the embodiments of the first aspect.

[0011] The embodiment of the present application comprises: in the process of defect segmentation of the lithium battery cover cap weld mark image, first, the lithium battery cover cap weld mark image to be processed is obtained; then, the lithium battery cover cap weld mark image to be processed is input into a preset deep learning network model, weld defect identification processing is performed on the lithium battery cover cap weld mark image, and a defect prediction result is extracted; wherein the deep learning network model comprises: an encoder, a first decoder connected to the output end of the encoder, a second decoder, a third decoder and a fourth decoder; the channel attention module is connected between the adjacent encoding convolution layers in the encoder; the first decoder, the second decoder, the third decoder and the fourth decoder constitute a layer-by-layer decoding structure, and all comprise a skip connection module and a decoding convolution layer; the weld defect identification processing comprises: through the encoder, the lithium battery cover cap weld mark image is processed layer by layer to obtain a first encoding feature map, a second encoding feature map, a third encoding feature map, a fourth encoding feature map and a fifth encoding feature map; through the first decoder, the second decoder, the third decoder and the fourth decoder, the first encoding feature map, the second encoding feature map, the third encoding feature map, the fourth encoding feature map and the fifth encoding feature map are processed layer by layer to obtain fourth decoding information; the tenth decoding feature map in the fourth decoding information is determined as the defect prediction result; in the structure improved preset deep learning network model, the channel attention module is embedded between each volume layer of the encoder, so as to dynamically calibrate the channel weight and focus on the spatial position, thereby significantly enhancing the extraction ability of the defect fine features and effectively suppressing the background noise; and by introducing the skip connection module between the encoders and decoders at different levels, the preset deep learning network model can combine the low-level detail information and the high-level context information to realize weld defect identification with higher precision, thereby improving the identification precision and segmentation precision of the weld defect. Finally, the image post-processing is performed according to the defect prediction result to obtain a weld defect segmentation image. In this way, the precision of the weld defect segmentation is improved, which is beneficial to reduce the circulation of defective products and improve the overall production quality of the lithium battery. That is to say, the embodiment of the present application can realize weld defect identification with higher precision through the structure improved preset deep learning network model, thereby improving the identification precision and segmentation precision of the weld defect, which is beneficial to reduce the circulation of defective products and improve the overall production quality of the lithium battery. BRIEF DESCRIPTION OF DRAWINGS

[0012] Figure 1 is a structural schematic diagram of a deep learning network model for performing weld defect identification processing provided by an embodiment of the present application;

[0013] Figure 2 is a flowchart of a lithium battery cover cap weld defect segmentation method provided by an embodiment of the present application;

[0014] Figure 3 is a specific structure schematic diagram of a deep learning network model provided by an embodiment of the present application;

[0015] Figure 4 is a hardware structure schematic diagram of a lithium battery cover cap welding mark defect segmentation device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0016] In order to make the purpose, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below in combination with the drawings and embodiments.

[0017] It should be noted that although a logical order is shown in the flowchart in the description of the present application, in some cases, the steps shown or described can be performed in an order different from that in the flowchart. In the description of the present application, the meaning of several is one or more, and the meaning of multiple is two and more than two. The description of "first", "second" is only for the purpose of distinguishing technical features, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features or the sequence of indicated technical features.

[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0019] First, some terms involved in the present application are explained:

[0020] Feature map: feature data obtained after convolution operation of a convolutional neural network, usually in three-dimensional form.

[0021] Downsampling is used for: reducing resolution, feature extraction, increasing receptive field, reducing overfitting, multi-scale feature fusion, etc. Among them, reducing resolution: reducing the spatial size (i.e. width and height) of data, so that the network can process data faster and reduce the amount of calculation. Feature extraction: while reducing the resolution, the features of the image are extracted through convolution operation. With the deepening of the level, the network can capture more abstract features. Increasing receptive field: with each down-sampling, the receptive field (i.e. the size of the input image region that the network can perceive) of the network will increase, which helps to detect larger size patterns. Reducing overfitting: by reducing the spatial size of the data, down-sampling helps to reduce the complexity of the model and reduce the risk of overfitting. Multi-scale feature fusion: in some advanced network architectures, high-level features and low-level features after down-sampling can be combined to utilize feature information of different scales.

[0022] Upsampling is used for: increasing resolution, recovering details, segmentation tasks; among them, increasing resolution: enlarging the spatial size of data, recovering or exceeding the resolution of the original input image; recovering details: some details may be lost when downsampling, upsampling helps to recover these details, making the output more accurate; for segmentation tasks: in image segmentation and other tasks, it is usually required to output an image with the same resolution as the input, and upsampling is a key step to achieve this goal; ReLU (Rectified Linear Unit) activation function is one of the most commonly used activation functions in deep learning, and it is widely popular due to its simple calculation and high training efficiency, and its formula is as follows: This means that if the input is x positive number, the output of the ReLU function is x, and if x is negative, the output is 0.

[0023] Sigmoid activation function is a very classic activation function, widely used in early neural networks. It compresses the input value to between 0 and 1, so that the output value has the meaning of probability, and its formula is as follows:

[0024] ; Where x is the input value.

[0025] The embodiments of the present application will be further described below with reference to the accompanying drawings.

[0026] As shown in Figure 1 , the deep learning network model 1000 is divided into an encoder 500 and four decoders, specifically, the deep learning network model 1000 for performing weld mark defect recognition processing includes: an encoder 500, a first decoder 100, a second decoder 200, a third decoder 300 and a fourth decoder 400; the output end of the encoder 500 is connected to the input end of the first decoder 100, the second decoder 200, the third decoder 300 and the fourth decoder 400; the first decoder 100, the second decoder 200, the third decoder 300 and the fourth decoder 400 constitute a layer-by-layer decoding structure, which includes: the output end of the first decoder 100 is connected to the input end of the second decoder 200, the third decoder 300 and the fourth decoder 400; the output end of the second decoder 200 is connected to the input end of the third decoder 300 and the fourth decoder 400; the output end of the third decoder 300 and the input end of the fourth decoder 400 are connected. And the adjacent encoding convolution layers in the encoder are connected with a channel attention module.

[0027] As shown in Figure 3As shown, the encoder 500 comprises: a first encoding unit 510, a second encoding unit 520, a third encoding unit 530, a fourth encoding unit 540 and a fifth encoding unit 550 connected in sequence; the first encoding unit 510, the second encoding unit 520, the third encoding unit 530, the fourth encoding unit 540 and the fifth encoding unit 550 each comprise: an encoding convolutional layer and a channel attention module connected in sequence.

[0028] Specifically, the first encoding unit 510 comprises: a first encoding convolutional layer A0-0 and a first channel attention module B0 connected in sequence. The first encoding unit 510 is configured to receive a lithium battery cap weld mark image to be processed, and output a first encoded feature map obtained by encoding after first encoding processing of the first encoding convolutional layer A0-0 and the first channel attention module B0.

[0029] Specifically, the second encoding unit 520 comprises: a second encoding convolutional layer A1-0 and a second channel attention module B1 connected in sequence. The second encoding unit 520 is configured to receive the first encoded feature map, and output a second encoded feature map obtained by encoding after second encoding processing of the second encoding convolutional layer A1-0 and the second channel attention module B1.

[0030] Specifically, the third encoding unit 530 comprises: a third encoding convolutional layer A2-0 and a third channel attention module B2 connected in sequence. The third encoding unit 530 is configured to receive the second encoded feature map, and output a third encoded feature map obtained by encoding after third encoding processing of the third encoding convolutional layer A2-0 and the third channel attention module B2.

[0031] Specifically, the fourth encoding unit 540 comprises: a fourth encoding convolutional layer A3-0 and a fourth channel attention module B3 connected in sequence. The fourth encoding unit 540 is configured to receive the fourth encoded feature map, and output a fourth encoded feature map obtained by fourth encoding processing of the fourth encoding convolutional layer A3-0 and the fourth channel attention module B3.

[0032] Specifically, the fifth encoding unit 550 comprises: a fifth encoding convolutional layer A4-0 and a fifth channel attention module B4 connected in sequence. The fifth encoding unit 550 is configured to receive the fourth encoded feature map, and output a fifth encoded feature map obtained by encoding after fifth encoding processing of the fifth encoding convolutional layer A4-0 and the fifth channel attention module B4.

[0033] Specifically, the specific structures of the first encoding convolutional layer A0-0, the second encoding convolutional layer A1-0, the third encoding convolutional layer A2-0, the fourth encoding convolutional layer A3-0, and the fifth encoding convolutional layer A4-0 in the encoder 500 are the same, and each includes: a first convolutional unit, a first ReLU (Rectified Linear Unit) activation function, a second convolutional unit, a second ReLU (Rectified Linear Unit) activation function, and a maximum value pooling.

[0034] Specifically, through the processing of the first convolutional unit, the first ReLU (Rectified Linear Unit) activation function unit, the second convolutional unit, the second ReLU (Rectified Linear Unit) activation function unit, and the maximum value pooling, a complete process of feature extraction and compression is realized. Specifically, first, low-level and local features are extracted from the original pixels through the first convolutional unit and the first ReLU (Rectified Linear Unit) activation function unit; then, higher-level and more abstract features are combined and refined from the low-level and local features through the second convolutional unit and the second ReLU (Rectified Linear Unit) activation function unit; finally, the higher-level and more abstract features are reduced and compressed through the maximum value pooling to obtain an initial encoding feature map.

[0035] Specifically, the structures and functions of the first channel attention module B0, the second channel attention module B1, the third channel attention module B2, the fourth channel attention module B3, and the fifth channel attention module B4 in the encoder 500 are the same, and each is used to reweight the input initial encoding feature map to emphasize important features and suppress unimportant features in the initial encoding feature map, and output a target encoding feature map; in this way, the utilization efficiency of the network for features can be improved, thereby improving the performance of the deep learning network model 1000.

[0036] Specifically, the structures of the first channel attention module B0, the second channel attention module B1, the third channel attention module B2, the fourth channel attention module B3, and the fifth channel attention module B4 each include an adaptive average pooling layer, a third convolution unit, a third ReLU (Rectified Linear Unit) activation function unit, a fourth convolution unit, a Sigmoid activation function unit, and an output layer. Specifically, in each channel attention module, the spatial dimension of each channel of the input initial encoding feature map is compressed to 1x1 through the adaptive average pooling layer; secondly, the channel number of the initial encoding feature map is compressed through the third convolution unit to obtain a compressed feature map; then, the compressed feature map is subjected to nonlinear activation through the third ReLU (Rectified Linear Unit) activation function unit; then, the channel number of the feature map is restored through the fourth convolution unit to obtain a restored feature map; then, the restored feature map is subjected to nonlinear activation through the Sigmoid activation function unit; finally, the original input is multiplied by the output activated by the Sigmoid activation function unit through the output layer to obtain a weighted feature map. In this way, important features in the initial encoding feature map will be strengthened, and unimportant features will be suppressed.

[0037] As shown in FIG. 1, the first decoder 100, the second decoder 200, the third decoder 300, and the fourth decoder 400 each include a skip connection module and a decoding convolution layer. Figure 3

[0038] Specifically, the first decoder 100 includes a first skip connection module C0-1 and a first decoding convolution layer D0-1 connected in sequence.

[0039] Specifically, the second decoder 200 includes a second skip connection module C0-2 and a second decoding convolution layer D0-2 connected in sequence, a third skip connection module C1-1 and a third decoding convolution layer D1-1 connected in sequence.

[0040] Specifically, the third decoder 300 includes a fourth skip connection module C0-3 and a fourth decoding convolution layer D0-3 connected in sequence, a fifth skip connection module C1-2 and a fifth decoding convolution layer D1-2 connected in sequence, a sixth skip connection module C2-1 and a sixth decoding convolution layer D2-1 connected in sequence.

[0041] Specifically, the fourth decoder 400 includes a seventh skip connection module C0-4 and a seventh decoding convolution layer D0-4 connected in sequence, an eighth skip connection module C1-3 and an eighth decoding convolution layer D1-3 connected in sequence, a ninth skip connection module C2-2 and a ninth decoding convolution layer D2-2 connected in sequence, a tenth skip connection module C3-1 and a tenth decoding convolution layer D3-1 connected in sequence.

[0042] ​Specifically, the connection relationship among the first decoder 100, the second decoder 200, the third decoder 300 and the fourth decoder 400, the connection relationship among the respective skip connection modules and the respective decoding convolutional layers are specifically as shown in Figure 3 The specific process of the decoding processing performed by each decoder is the same, which is described as follows.

[0043] Specifically, in the deep learning network model 1000, in the process of corresponding decoding processing, the first skip connection module C0-1, the second skip connection module C0-2, the third skip connection module C1-1, the fourth skip connection module C0-3, the fifth skip connection module C1-2, the sixth skip connection module C2-1, the seventh skip connection module C0-4, the eighth skip connection module C1-3, the ninth skip connection module C2-2, and the tenth skip connection module C3-1 have the same function, which are all used to connect the C (channel) dimension of the input feature map in NCHW (batch, channel, height, width), and the number of channels after connection is C=C1+C2+C3; wherein C1, C2 and C3 are respectively the number of channels of the three feature maps input into the skip connection module.

[0044] Specifically, in the deep learning network model 1000, the first decoding convolutional layer D0-1, the second decoding convolutional layer D0-2, the third decoding convolutional layer D1-1, the fourth decoding convolutional layer D0-3, the fifth decoding convolutional layer D1-2, the sixth decoding convolutional layer D2-1, the seventh decoding convolutional layer D0-4, the eighth decoding convolutional layer D1-3, the ninth decoding convolutional layer D2-2, and the tenth decoding convolutional layer D3-1 have the same function and structure. Each decoding convolutional layer includes: a fifth convolutional unit, a first two-dimensional batch normalization layer (Batch Normalization), a fourth ReLU (Rectified Linear Unit) activation function unit, a sixth convolutional unit, a second two-dimensional batch normalization layer (Batch Normalization), a fifth ReLU (Rectified Linear Unit) activation function, and a bilinear interpolation unit.

[0045] It can be understood that in the process of corresponding decoding processing, in each decoding convolutional layer, the fifth convolutional unit, the first two-dimensional batch normalization layer (Batch Normalization), the fourth ReLU (Rectified Linear Unit) activation function unit, the sixth convolutional unit, the second two-dimensional batch normalization layer (Batch Normalization), the fifth ReLU (Rectified Linear Unit) activation function, and the bilinear interpolation unit cooperate with each other to complete decoding of the input feature map and obtain a decoded feature map. The bilinear interpolation unit performs up-sampling to recover details and restore image resolution. The two-dimensional batch normalization layer is added between the convolutional and activation operations, the normalization operation is performed on each small batch of data, the output of the intermediate layer of the network is more stable, and the distribution of the activation value is closer to the normal distribution. The normalization operation reduces the internal covariate shift, and usually accelerates the training speed of the deep neural network. The normalization operation helps to alleviate the gradient vanishing problem.

[0046] It should be emphasized that the convolutional layer of the encoder 500 is different from the convolutional layer of the decoder in that the convolutional layer of the encoder 500 is finally down-sampled using maximum value pooling for extracting detailed features, while the last convolutional layer of the decoder is up-sampled using bilinear interpolation for recovering details and restoring image resolution. In addition, the two-dimensional batch normalization is added between the convolutional and activation operations in the convolutional layer of the decoder, the normalization operation is performed on each small batch of data, the output of the intermediate layer of the network is more stable, and the distribution of the activation value is closer to the normal distribution. The normalization operation reduces the internal covariate shift, and usually accelerates the training speed of the deep neural network. The normalization operation helps to alleviate the gradient vanishing problem.

[0047] It should be noted that UNet can work on very few training images and produce more accurate segmentation by modifying and extending the fully convolutional neural network, and pass fine-grained features between the encoding and decoding stages through the skip connection, which makes the model better preserve spatial resolution and improve sensitivity to targets, and has good effect on small sample training, which is very helpful for the situation that the defect sample is rare in some industrial defect scenes. But U-Net is a relatively simple image segmentation network, and the current UNet network (including: an encoder 500, a decoder) structure is too simple, and it cannot well perceive the detail features when segmenting the weld mark defects. The embodiment of the present application adds four channel attention modules to the encoder 500 of the UNet network to enhance its feature extraction capability, and three decoders are added in the middle. Therefore, the optimized deep learning network model 1000 of the present application includes: 1 encoder 500 and 4 decoders, and the 4 decoders are connected structures, and the multi-scale feature fusion capability is enhanced by fusing the results of four times of decoding to improve the segmentation precision. The embodiment of the present application realizes the lithium battery cover cap weld mark defect segmentation method based on the deep learning network model 1000, which can realize higher precision weld mark defect recognition through the preset deep learning network model 1000 with structural improvement, so as to improve the recognition precision and segmentation precision of the weld mark defect, which is helpful to reduce the circulation of defective products and improve the overall production quality of lithium batteries.

[0048] Based on the above model structure, the following embodiments of the lithium battery cover cap weld mark defect segmentation method of the present application are proposed.

[0049] In a first aspect, as Figure 2 indicated, the lithium battery cover cap weld mark defect segmentation method can include but is not limited to steps S100 to S300.

[0050] Step S100: Obtain the lithium battery cover cap weld mark image to be processed.

[0051] Step S200: input the lithium battery cap weld mark image to be processed into a preset deep learning network model, perform weld mark defect identification processing on the lithium battery cap weld mark image, and extract a defect prediction result; the deep learning network model comprises an encoder, a first decoder connected to the output end of the encoder, a second decoder, a third decoder, and a fourth decoder; the channel attention module is connected between adjacent encoding convolution layers in the encoder; the first decoder, the second decoder, the third decoder, and the fourth decoder constitute a layer-by-layer decoding structure, and each comprises a skip connection module and a decoding convolution layer; the weld mark defect identification processing comprises: performing layer-by-layer encoding processing on the lithium battery cap weld mark image through the encoder to obtain a first encoding feature map, a second encoding feature map, a third encoding feature map, a fourth encoding feature map, and a fifth encoding feature map; performing layer-by-layer feature fusion decoding processing on the first encoding feature map, the second encoding feature map, the third encoding feature map, the fourth encoding feature map, and the fifth encoding feature map through the first decoder, the second decoder, the third decoder, and the fourth decoder to obtain fourth decoding information; and determining the tenth decoding feature map in the fourth decoding information as the defect prediction result.

[0052] Step S300: perform image post-processing according to the defect prediction result to obtain a weld mark defect segmentation image.

[0053] Further description of step S100. Step S100 comprises: acquiring the collected initial first lithium battery cap weld mark image; performing size adjustment processing to adjust the image size of the first lithium battery cap weld mark image to a preset input size to obtain a second lithium battery cap weld mark image, wherein the preset input size is determined by the deep learning network model; and performing channel format conversion processing on the second lithium battery cap weld mark image to obtain the lithium battery cap weld mark image to be processed; the channel format conversion processing is used to convert from an RGB (red, green, and blue) channel format to an NCHW (batch, channel, height, and width) format. The preset input size can be modified according to actual conditions; the preset input size is not specifically limited in the present application.

[0054] The embodiment of the present application obtains the lithium battery cover cap welding mark image to be processed first in the process of defect segmentation of the lithium battery cover cap welding mark image. Then, the lithium battery cover cap welding mark image to be processed is input into a preset deep learning network model to perform welding defect identification processing on the lithium battery cover cap welding mark image, and a defect prediction result is extracted. The deep learning network model comprises an encoder, a first decoder connected to the output end of the encoder, a second decoder, a third decoder and a fourth decoder. The channel attention module is connected between the adjacent encoding convolution layers in the encoder. The first decoder, the second decoder, the third decoder and the fourth decoder constitute a layer-by-layer decoding structure, and each comprises a skip connection module and a decoding convolution layer. The welding defect identification processing comprises: performing layer-by-layer encoding processing on the lithium battery cover cap welding mark image through the encoder to obtain a first encoding feature map, a second encoding feature map, a third encoding feature map, a fourth encoding feature map and a fifth encoding feature map; performing layer-by-layer feature fusion decoding processing on the first encoding feature map, the second encoding feature map, the third encoding feature map, the fourth encoding feature map and the fifth encoding feature map through the first decoder, the second decoder, the third decoder and the fourth decoder to obtain fourth decoding information; determining the tenth decoding feature map in the fourth decoding information as the defect prediction result; in the structure-improved preset deep learning network model, the channel attention module is embedded between each volume layer of the encoder, so that the channel weight can be dynamically calibrated and the spatial position can be focused, thereby significantly enhancing the extraction ability of the defect fine features and effectively suppressing the background noise; and the skip connection module is introduced between the encoders and decoders at different levels, so that the preset deep learning network model can combine low-level detail information and high-level context information to realize welding defect identification with higher precision, thereby improving the identification precision and segmentation precision of the welding defects. Finally, image post-processing is performed according to the defect prediction result to obtain a welding defect segmentation image. In this way, the precision of the welding defect segmentation is improved, which is beneficial to reducing the circulation of defective products and improving the overall production quality of the lithium battery. That is to say, the embodiment of the present application can realize welding defect identification with higher precision through the structure-improved preset deep learning network model, thereby improving the identification precision and segmentation precision of the welding defects, which is beneficial to reducing the circulation of defective products and improving the overall production quality of the lithium battery.

[0055] According to some embodiments of the present application, step S200 further comprises steps S210-S230.

[0056] Step S210: through the encoder, the lithium battery cap weld mark image is processed layer by layer, and the first encoding feature map, the second encoding feature map, the third encoding feature map, the fourth encoding feature map and the fifth encoding feature map are obtained.

[0057] In this step, according to some embodiments of the application, the encoder comprises: first, second, third, fourth and fifth encoding units connected in turn; the first, second, third, fourth and fifth encoding units each comprise: an encoding convolutional layer and a channel attention module connected in turn.

[0058] Specifically, step S210 includes but is not limited to steps S211 to S215.

[0059] Step S211: through the first encoding unit, the first encoding processing is performed on the lithium battery cap weld mark image, and the first encoding feature map is obtained.

[0060] Step S212: through the second encoding unit, the second encoding processing is performed on the first encoding feature map, and the second encoding feature map is obtained.

[0061] Step S213: through the third encoding unit, the third encoding processing is performed on the second encoding feature map, and the third encoding feature map is obtained.

[0062] Step S214: through the fourth encoding unit, the fourth encoding processing is performed on the third encoding feature map, and the fourth encoding feature map is obtained.

[0063] Step S215: through the fifth encoding unit, the fifth encoding processing is performed on the fourth encoding feature map, and the fifth encoding feature map is obtained.

[0064] It should be noted that the first, second, third, fourth and fifth encoding units each comprise: an encoding convolutional layer and a channel attention module connected in turn; and in the encoder, the structure and function of each convolutional layer are the same, and the structure and function of each channel attention module are the same; therefore, the processing objects of the first, second, third, fourth and fifth encoding processing are different, but the specific processing processes are the same.

[0065] Specifically, the specific structures of the first encoding convolutional layer A0-0, the second encoding convolutional layer A1-0, the third encoding convolutional layer A2-0, the fourth encoding convolutional layer A3-0, and the fifth encoding convolutional layer A4-0 in the encoder are the same, and each includes a first convolutional unit, a first ReLU (Rectified Linear Unit) activation function, a second convolutional unit, a second ReLU (Rectified Linear Unit) activation function, and a maximum value pooling. Specifically, through the processing of the first convolutional unit, the first ReLU (Rectified Linear Unit) activation function unit, the second convolutional unit, the second ReLU (Rectified Linear Unit) activation function unit, and the maximum value pooling, a complete process of feature extraction and compression is realized. Specifically, first, the first convolutional unit and the first ReLU (Rectified Linear Unit) activation function unit extract low-level and local features from the original pixels; then, the second convolutional unit and the second ReLU (Rectified Linear Unit) activation function unit combine and refine higher-level and more abstract features from the low-level and local features; and finally, the maximum value pooling reduces the dimension and compresses the higher-level and more abstract features to obtain an initial encoding feature map.

[0066] Specifically, the structures and functions of the first channel attention module B0, the second channel attention module B1, the third channel attention module B2, the fourth channel attention module B3, and the fifth channel attention module B4 in the encoder are the same, and each is used to reweight the input initial encoding feature map to emphasize important features and suppress unimportant features in the initial encoding feature map, and output a target encoding feature map. In this way, the utilization efficiency of the network for features can be improved, thereby improving the performance of the deep learning network model.

[0067] Through steps S211 to S215, more rich and abstract feature representations can be learned through step-by-step encoding, the extraction ability of important features is strengthened, and the misjudgment of image details is reduced.

[0068] Step S220: Through the first decoder, the second decoder, the third decoder, and the fourth decoder, the first encoding feature map, the second encoding feature map, the third encoding feature map, the fourth encoding feature map, and the fifth encoding feature map are subjected to layer-by-layer feature fusion decoding processing to obtain fourth decoding information.

[0069] In this step, the first decoder, the second decoder, the third decoder, and the fourth decoder each include a skip connection module and a decoding convolutional layer.

[0070] According to some embodiments of the present application, step S220 further includes, but is not limited to, steps S221 to S224.

[0071] Step S221: performing, by the first decoder, first layer fusion decoding processing on the first encoded feature map and the second encoded feature map to obtain first decoding information; the first decoding information comprises a first decoding feature map.

[0072] In this step, the first decoder comprises a first skip connection module C0-1 and a first decoding convolutional layer D0-1 connected in sequence. After receiving the first encoded feature map and the second encoded feature map, the first decoder performs first layer fusion decoding processing on the first encoded feature map and the second encoded feature map through the first skip connection module C0-1 and the first decoding convolutional layer D0-1 to obtain the first decoding feature map.

[0073] Step S222: performing, by the second decoder, second layer fusion decoding processing on the first encoded feature map, the second encoded feature map, the third encoded feature map and the first decoding information to obtain second decoding information; the second decoding information comprises a second decoding feature map and a third decoding feature map.

[0074] In this step, the second decoder comprises a second skip connection module C0-2 and a second decoding convolutional layer D0-2 connected in sequence, and a third skip connection module C1-1 and a third decoding convolutional layer D1-1 connected in sequence.

[0075] According to some embodiments of the present application, step S222 comprises but is not limited to steps S2221 to S2222.

[0076] Step S2221: performing, by the second decoder, decoding processing on the second encoded feature map and the third encoded feature map to obtain the second decoding feature map.

[0077] Step S2222: performing decoding processing on the first encoded feature map, the first decoding information and the second decoding feature map to obtain the third decoding feature map.

[0078] It can be understood that, since the structures and functions of the second decoding convolutional layer D0-2 and the third decoding convolutional layer D1-1 are the same (as described in the above embodiments, which will not be described here again), the processing objects of the decoding processing performed in steps S2221 to S2222 are different, but the specific processing procedures are the same, and the present application will not describe the specific processing procedures of the decoding processing here.

[0079] Step S223: performing, by the third decoder, third layer fusion decoding processing on the first encoded feature map, the second encoded feature map, the third encoded feature map, the fourth encoded feature map, the first decoding information and the second decoding information to obtain third decoding information; the third decoding information comprises a fourth decoding feature map, a fifth decoding feature map and a sixth decoding feature map.

[0080] In this step, the third decoder comprises: a fourth jump connection module C0-3 and a fourth decoding convolutional layer D0-3 connected in sequence, a fifth jump connection module C1-2 and a fifth decoding convolutional layer D1-2 connected in sequence, a sixth jump connection module C2-1 and a sixth decoding convolutional layer D2-1 connected in sequence.

[0081] According to some embodiments of the present application, step S223 includes but is not limited to steps S2231-S2232.

[0082] Step S2231: decoding processing is performed by the third decoder according to the third encoded feature map and the fourth encoded feature map to obtain a fourth decoded feature map.

[0083] Step S2232: decoding processing is performed according to the second encoded feature map, the second decoded feature map, and the fourth decoded feature map to obtain a fifth decoded feature map.

[0084] Step S2233: decoding processing is performed according to the first encoded feature map, the first decoded feature map, the third decoded feature map, and the fifth decoded feature map to obtain a sixth decoded feature map.

[0085] It can be understood that, since the structures and functions of the fourth decoding convolutional layer D0-3, the fifth decoding convolutional layer D1-2, and the sixth decoding convolutional layer D2-1 are the same (as described in the above embodiments, which will not be described here), the processing objects of the decoding processing performed in steps S2231-S2232 are different, but the specific processing procedures are the same, and the specific procedures of the decoding processing will not be described here.

[0086] Step S224: fourth layer fusion decoding processing is performed by the fourth decoder according to the first encoded feature map, the second encoded feature map, the third encoded feature map, the fourth encoded feature map, the fifth encoded feature map, the first decoding information, the second decoding information, and the third decoding information to obtain fourth decoding information; the fourth decoding information includes: a seventh decoded feature map, an eighth decoded feature map, a ninth decoded feature map, and a tenth decoded feature map.

[0087] In this step, the fourth decoder comprises: a seventh jump connection module C0-4 and a seventh decoding convolutional layer D0-4 connected in sequence, an eighth jump connection module C1-3 and an eighth decoding convolutional layer D1-3 connected in sequence, a ninth jump connection module C2-2 and a ninth decoding convolutional layer D2-2 connected in sequence, and a tenth jump connection module C3-1 and a tenth decoding convolutional layer D3-1 connected in sequence.

[0088] According to some embodiments of the present application, step S224 includes but is not limited to steps S2241-S2244.

[0089] Step S2241: decoding processing is performed on the fourth encoded feature map and the fifth encoded feature map by a fourth decoder to obtain a seventh decoded feature map.

[0090] Step S2242: decoding processing is performed on the third encoded feature map, the fourth decoded feature map and the seventh decoded feature map to obtain an eighth decoded feature map.

[0091] Step S2243: decoding processing is performed on the second encoded feature map, the second decoded feature map, the fifth decoded feature map and the eighth decoded feature map to obtain a ninth decoded feature map.

[0092] Step S2244: decoding processing is performed on the first encoded feature map, the first decoded feature map, the third decoded feature map, the sixth decoded feature map and the ninth decoded feature map to obtain a tenth decoded feature map.

[0093] It can be understood that, since the structures and functions of the seventh decoding convolutional layer D0-4, the eighth decoding convolutional layer D1-3, the ninth decoding convolutional layer D2-2 and the tenth decoding convolutional layer D3-1 are the same (which has been described in the above embodiment and will not be described here again), the processing objects of the decoding processing in steps S2241 to S2244 are different, but the specific processing procedures are the same, and the specific processing procedures of the decoding processing will not be described here again.

[0094] Through step S200, by introducing the skip connection between the encoders and decoders at different levels, the deep learning network model can combine the low-level detail information and the high-level context information; and by fusing the results of four times of decoding to enhance the multi-scale feature fusion capability and improve the segmentation accuracy.

[0095] Step S230: determining the tenth decoded feature map in the fourth decoding information as the defect prediction result.

[0096] Specifically, the tenth feature decoding map in the fourth decoding information has the best effect, and therefore, the tenth feature decoding map is determined as the target output image (also the defect prediction result described above), and specifically, the target output image is a result mask image; wherein the number of channels of the tenth feature decoding map is equal to the number of defect categories to be segmented.

[0097] However, to obtain the final segmentation image, image post-processing needs to be performed on the output defect prediction result; therefore, step S300 also needs to be performed.

[0098] Further illustrate step S300. Specifically, step S300 comprises: performing softmax processing on the defect prediction result (i.e. the target output image of the deep learning neural network model) based on a softmax function, converting into a predicted probability map; determining the most possible defect category corresponding to each pixel point from the predicted probability map, outputting a defect segmentation result; adjusting the size of the target output image to the size of the initial first lithium battery cap weld mark image, obtaining an initial segmentation image; and finally mapping the defect segmentation result to the color coding of the initial segmentation image, generating a colorful weld mark defect segmentation image. The softmax function is a commonly used activation function in multi-class classification problems, especially in the output layer of a neural network. The function of the softmax function is to convert a vector into a set of probability distributions, and the value of each element represents the relative probability of the class in all classes, and its formula is as follows:

[0099] ; wherein, is the exponential of each element of the input vector z, and the denominator is the sum of the exponents of all input elements.

[0100] In summary, the embodiment of the present application provides a lithium battery cap weld mark defect segmentation method based on deep learning which can improve the segmentation accuracy and small target segmentation capability through steps S100 to S300.

[0101] In combination with Figure 1 and Figure 3 , taking an example, the specific step process of the lithium battery cap weld mark defect segmentation method provided by the embodiment of the present application is illustrated.

[0102] Step S1: performing size adjustment processing on the initial first lithium battery cap weld mark image collected by the image collection device to obtain a second lithium battery cap weld mark image.

[0103] Step S2: performing channel format conversion processing on the second lithium battery cap weld mark image to obtain a lithium battery cap weld mark image to be processed.

[0104] Step S3: the lithium battery cap weld mark image to be processed first enters the first encoding convolution layer A0-0 of the encoder and then enters the first channel attention module B0, to obtain the first encoding feature map P0-0.

[0105] Step S4: the first encoding feature map P0-0 enters the second encoding convolution layer A1-0 of the encoder and then enters the second channel attention module B1, to obtain the second encoding feature map P1-0.

[0106] Step S5: The first decoder 100 receives the first encoded feature map P0-0 and the second encoded feature map P1-0, and obtains the first decoded feature map P0-1 through the first skip connection module C0-1 and the first decoding convolutional layer D0-1.

[0107] Step S6: The second encoded feature map P1-0 enters the third encoding convolutional layer A2-0 of the encoder and then enters the third channel attention module B2, to obtain the third encoded feature map P2-0.

[0108] Step S7: The second encoded feature map P1-0 and the third encoded feature map P2-0 enter the second decoder 200, and obtain the second decoded feature map P1-1 through the third skip connection module C1-1 and the third decoding convolutional layer D1-1.

[0109] Step S8: The first encoded feature map P0-0, the first decoded feature map P0-1 and the second decoded feature map P1-1 enter the second decoder 200, and obtain the third decoded feature map P0-2 through the second skip connection module C0-2 and the second decoding convolutional layer D0-2.

[0110] Step S9: The third encoded feature map P2-0 enters the fourth encoding convolutional layer A3-0 of the encoder and then enters the fourth channel attention module B3, to obtain the fourth encoded feature map P3-0.

[0111] Step S10: The third encoded feature map P2-0 and the fourth encoded feature map P3-0 enter the third decoder 300, and obtain the fourth decoded feature map P2-1 through the sixth skip connection module C2-1 and the sixth decoding convolutional layer D2-1.

[0112] Step S11: The second encoded feature map P1-0, the second decoded feature map P1-1 and the fourth decoded feature map P2-1 enter the third decoder 300, and obtain the fifth decoded feature map P1-2 through the fifth skip connection module C1-2 and the fifth decoding convolutional layer D1-2.

[0113] Step S12: The first encoded feature map P0-0, the first decoded feature map P0-1, the third decoded feature map P0-2 and the fifth decoded feature map P1-2 enter the third decoder 300, and obtain the sixth decoded feature map P0-3 through the fourth skip connection module C0-3 and the fourth decoding convolutional layer D0-3.

[0114] Step S13: The fourth encoded feature map P3-0 enters the fifth encoding convolutional layer A4-0 of the encoder and then enters the fifth channel attention module B4, to obtain the fifth encoded feature map P4-0.

[0115] Step S14: the fourth encoded feature map P3-0 and the fifth encoded feature map P4-0 enter the fourth decoder 400, pass through the tenth jump connection module C3-1 and the tenth decoding convolutional layer D3-1, and the seventh decoding feature map P3-1 is obtained.

[0116] Step S15: the third encoded feature map P2-0, the fourth decoding feature map P2-1 and the seventh decoding feature map P3-1 enter the fourth decoder 400, pass through the ninth jump connection module C2-2 and the ninth decoding convolutional layer D2-2, and the eighth decoding feature map P2-2 is obtained.

[0117] Step S16: the second encoded feature map P1-0, the second decoding feature map P1-1, the fifth decoding feature map P1-2 and the eighth decoding feature map P2-2 enter the fourth decoder 400, pass through the eighth jump connection module C1-3 and the eighth decoding convolutional layer D1-3, and the ninth decoding feature map P1-3 is obtained.

[0118] Step S17: the first encoded feature map P0-0, the first decoding feature map P0-1, the third decoding feature map P0-2, the sixth decoding feature map P0-3 and the ninth decoding feature map P1-3 enter the fourth decoder 400, pass through the seventh jump connection module C0-4 and the seventh decoding convolutional layer D0-4, and the tenth decoding feature map P0-4 is obtained.

[0119] The output of the deep learning neural network model is four, which are the first decoding feature map P0-1, the third decoding feature map P0-2, the sixth decoding feature map P0-3 and the tenth decoding feature map P0-4, and the number of channels of these feature maps is equal to the number of defect categories to be segmented; in the inference process, the deep learning neural network model can be pruned, that is, one of the outputs is selected as the final output image, and the tenth decoding feature map P0-4 has the best effect, and the tenth decoding feature map P0-4 is determined as the defect prediction result output by the deep learning neural network model: but to obtain the final defect segmentation image, image post-processing is needed for the output defect prediction result (the specific process of image post-processing is referred to the above embodiment, which is not repeated here), and the solder print defect segmentation image is obtained.

[0120] It should be noted that the process of training the deep learning neural network model is: the initial neural network model is continuously trained by using the training set until the initial neural network model converges to obtain the deep learning neural network model. In the training process, the cross-entropy loss and the dice loss of the four outputs (i.e. the first decoding feature map P0-1, the third decoding feature map P0-2, the sixth decoding feature map P0-3 and the tenth decoding feature map P0-4) of the deep learning neural network model are calculated respectively, and the total loss value is obtained by summation. When the training loss and the validation loss both decrease steadily with the increase of the training round, and finally converge to a lower value, it is judged that the model has good learning performance.

[0121] The cross-entropy loss can be used to evaluate the difference of probability distribution of multiple categories. The commonly used formula of cross-entropy loss is as follows:

[0122] ;

[0123] Wherein, y is a one-hot encoded vector, representing the true label, and p is the class probability distribution predicted by the model, representing the i-th class.

[0124] The Dice similarity coefficient loss function (Dice Coefficient) is a loss function based on the Dice coefficient, which is used to measure the similarity of two sample sets, and is particularly suitable for measuring the similarity between the predicted segmentation graph and the real annotation graph in the image segmentation task. For multi-classification problems, the commonly used Dice loss can be extended to average the loss of all categories, and its formula is as follows:

[0125] .

[0126] The improved UNet of the present application and other model verification comparison results are shown in Table 1.

[0127] Table 1

[0128]

[0129] It can be seen that the average intersection over union of the improved UNet (i.e. the deep learning neural network model) of the present application is improved by 1.27% compared with UNet, the average pixel accuracy is improved by 1.16% compared with UNet, and the average precision is also improved by 0.61% compared with the original.

[0130] In summary, the deep learning neural network model of the embodiment of the present application can learn more rich and abstract feature representations. By introducing a skip connection between the encoders and decoders at different levels, the network can combine low-level detailed information and high-level contextual information, enhance the extraction ability of important features, and reduce misjudgment of image details, thereby improving the accuracy of the welding mark defect segmentation. In addition, the deep learning neural network model not only outputs a prediction result in the last stage, but also outputs a prediction result in multiple intermediate stages, which helps the gradient flow and improves the stability and final performance of the training as much as possible.

[0131] As shown in Figure 4 The present application also provides a lithium battery cap welding mark defect segmentation device, which comprises:

[0132] The processor 401 can be implemented in the form of a general central processing unit, a microprocessor, an application specific integrated circuit, or one or more integrated circuits, and is used to execute related programs to implement the technical solutions provided by the embodiments of the present application.

[0133] The memory 402 can be implemented in the form of a read-only memory, a static storage device, a dynamic storage device, or a random access memory. The memory 402 can store an operating system and other application programs. When the technical solutions provided by the embodiments of the present application are implemented by software or firmware, the related program codes are stored in the memory 402 and are called and executed by the processor 401 to implement the lithium battery cap welding mark defect segmentation method of the embodiments of the present application.

[0134] The input / output interface 403 is used to realize information input and output.

[0135] The communication interface 404 is used to realize the communication interaction between the device and other devices. The communication can be realized by a wired manner (such as a USB, a network cable, etc.) or a wireless manner (such as a mobile network, WIFI, Bluetooth, etc.).

[0136] The bus 405 transmits information between various components (such as the processor 401, the memory 402, the input / output interface 403, and the communication interface 404) of the device.

[0137] The processor 401, the memory 402, the input / output interface 403, and the communication interface 404 are connected to each other through the bus 405 for internal communication.

[0138] The embodiments of the present application also provide an electronic device comprising the lithium battery cap welding mark defect segmentation device as described above.

[0139] The embodiment of the present application further provides a storage medium, which is a computer readable storage medium, and stores a computer program. The computer program is executed by a processor to implement the above-mentioned lithium battery cover welding mark defect segmentation method.

[0140] The memory, as a non-transitory computer readable storage medium, can be used to store non-transitory software programs and non-transitory computer executable programs. In addition, the memory can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some embodiments, the memory can optionally include a memory remotely arranged relative to the processor, and the remote memory can be connected to the processor through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The above-described device embodiments are only schematic, and units described as separate components can or can not be physically separated, and can be implemented in one place or distributed on multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment.

[0141] Those of ordinary skill in the art can understand that all or some of the steps in the above disclosed method and system can be implemented as software, firmware, hardware, and appropriate combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer readable medium, which can include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, as known to those of ordinary skill in the art, communication media generally includes computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism, and can include any information delivery medium.

[0142] The above is a specific description of the preferred embodiments of the present application, but the present application is not limited to the above embodiments, and those skilled in the art can make various equivalent modifications or replacements without departing from the spirit of the present application, and these equivalent modifications or replacements are all included in the scope defined by the present application.

Claims

1. A method for segmenting solder joint defects in lithium battery caps, characterized in that, include: Obtain the image of the solder mark on the lithium battery cap to be processed; The lithium battery cap solder image to be processed is input into a preset deep learning network model to perform solder defect identification processing on the lithium battery cap solder image and extract the defect prediction result. The deep learning network model includes: an encoder, a first decoder, a second decoder, a third decoder, and a fourth decoder connected to the output of the encoder; channel attention modules are connected between adjacent encoding convolutional layers in the encoder; the first decoder, the second decoder, the third decoder, and the fourth decoder constitute a layer-by-layer decoding structure, and each includes a skip connection module and a decoding convolutional layer; the solder defect identification processing includes: performing layer-by-layer encoding processing on the lithium battery cap solder image through the encoder to obtain a first encoded feature map, a second encoded feature map, a third encoded feature map, a fourth encoded feature map, and a fifth encoded feature map; performing layer-by-layer feature fusion decoding processing on the first decoder, the second decoder, the third decoder, and the fourth decoder to obtain fourth decoding information; and determining the tenth decoding feature map in the fourth decoding information as the defect prediction result. Based on the defect prediction results, image post-processing is performed to obtain a weld defect segmentation image; The encoder's output is connected to the inputs of the first decoder, the second decoder, the third decoder, and the fourth decoder, respectively; the first decoder's output is connected to the inputs of the second decoder, the third decoder, and the fourth decoder; the second decoder's output is connected to the inputs of the third decoder and the fourth decoder; and the third decoder's output is connected to the input of the fourth decoder. The first decoder includes: a first skip connection module and a first decoding convolutional layer connected in sequence; the second decoder includes: a second skip connection module and a second decoding convolutional layer connected in sequence, a third skip connection module and a third decoding convolutional layer connected in sequence; the third decoder includes: a fourth skip connection module and a fourth decoding convolutional layer connected in sequence, a fifth skip connection module and a fifth decoding convolutional layer connected in sequence, a sixth skip connection module and a sixth decoding convolutional layer connected in sequence; the fourth decoder includes: a seventh skip connection module and a seventh decoding convolutional layer connected in sequence, an eighth skip connection module and an eighth decoding convolutional layer connected in sequence, a ninth skip connection module and a ninth decoding convolutional layer connected in sequence, a tenth skip connection module and a tenth decoding convolutional layer connected in sequence.

2. The method for segmenting solder joint defects in lithium battery caps according to claim 1, characterized in that, The encoder includes: a first coding unit, a second coding unit, a third coding unit, a fourth coding unit, and a fifth coding unit connected in sequence; each of the first coding unit, the second coding unit, the third coding unit, the fourth coding unit, and the fifth coding unit includes: a coding convolutional layer and a channel attention module connected in sequence; The step of encoding the lithium battery cap solder image layer by layer using the encoder to obtain a first encoded feature map, a second encoded feature map, a third encoded feature map, a fourth encoded feature map, and a fifth encoded feature map includes: The first encoding unit performs a first encoding process on the lithium battery cap solder image to obtain the first encoded feature map. The second encoding unit performs a second encoding process on the first encoding feature map to obtain the second encoding feature map. The third encoding unit performs a third encoding process on the second encoding feature map to obtain the third encoding feature map; The fourth encoding unit performs a fourth encoding process on the third encoding feature map to obtain the fourth encoding feature map. The fifth encoding unit performs a fifth encoding process on the fourth encoding feature map to obtain the fifth encoding feature map.

3. The method for segmenting solder joint defects in lithium battery caps according to claim 1, characterized in that, The step involves performing layer-by-layer feature fusion decoding on the first, second, third, fourth, and fifth encoded feature maps using the first decoder, second decoder, third decoder, and fourth decoder to obtain fourth decoded information, including: The first decoder performs a first-layer fusion decoding process based on the first encoded feature map and the second encoded feature map to obtain first decoding information; the first decoding information includes: the first decoding feature map; The second decoder performs a second-layer fusion decoding process based on the first encoded feature map, the second encoded feature map, the third encoded feature map, and the first decoding information to obtain second decoding information; the second decoding information includes: the second decoding feature map and the third decoding feature map; The third decoder performs a third-layer fusion decoding process based on the first encoded feature map, the second encoded feature map, the third encoded feature map, the fourth encoded feature map, the first decoding information, and the second decoding information to obtain third decoding information; the third decoding information includes: a fourth decoding feature map, a fifth decoding feature map, and a sixth decoding feature map; The fourth decoder performs a fourth-layer fusion decoding process based on the first, second, third, fourth, and fifth encoded feature maps, the first, second, and third decoding information to obtain the fourth decoding information. The fourth decoding information includes a seventh, eighth, ninth, and tenth decoding feature map.

4. The method for segmenting solder joint defects in lithium battery caps according to claim 3, characterized in that, The second decoder performs a second-layer fusion decoding process based on the first encoded feature map, the second encoded feature map, the third encoded feature map, and the first decoding information to obtain second decoding information, including: The second decoder performs decoding processing based on the second encoded feature map and the third encoded feature map to obtain the second decoded feature map. The third decoding feature map is obtained by performing decoding processing based on the first encoded feature map, the first decoding information, and the second decoding feature map.

5. The method for segmenting solder joint defects in lithium battery caps according to claim 3, characterized in that, The process involves using the third decoder to perform a third-layer fusion decoding process based on the first encoded feature map, the second encoded feature map, the third encoded feature map, the fourth encoded feature map, the first decoding information, and the second decoding information to obtain third decoding information, including: The third decoder performs decoding processing based on the third encoded feature map and the fourth encoded feature map to obtain the fourth decoded feature map; The fifth decoding feature map is obtained by decoding the second encoded feature map, the second decoded feature map, and the fourth decoded feature map. The sixth decoding feature map is obtained by performing decoding processing based on the first encoded feature map, the first decoded feature map, the third decoded feature map, and the fifth decoded feature map.

6. The method for segmenting solder joint defects in lithium battery caps according to claim 3, characterized in that, The fourth decoder performs a fourth-layer fusion decoding process based on the first, second, third, fourth, and fifth encoded feature maps, the first decoding information, the second decoding information, and the third decoding information to obtain the fourth decoding information, including: The fourth decoder performs decoding processing based on the fourth and fifth encoded feature maps to obtain the seventh decoded feature map; The eighth decoding feature map is obtained by decoding the third encoded feature map, the fourth decoded feature map, and the seventh decoded feature map. The ninth decoding feature map is obtained by performing decoding processing based on the second encoded feature map, the second decoded feature map, the fifth decoded feature map, and the eighth decoded feature map; The tenth decoding feature map is obtained by decoding the first encoded feature map, the first decoded feature map, the third decoded feature map, the sixth decoded feature map, and the ninth decoded feature map.

7. A device for separating defects in solder stamps on lithium battery caps, characterized in that, It includes at least one processor and a memory for communicatively connecting to the at least one processor; the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the lithium battery cap solder mark defect segmentation method as described in any one of claims 1 to 6.

8. An electronic device, characterized in that, Includes the lithium battery cap solder mark defect segmentation device as described in claim 7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer to perform the lithium battery cap solder mark defect segmentation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Method, device and equipment for segmenting twin network defects of printed circuit board and medium

    CN118644673A

  • Pathology image cell segmentation method based on U-Net model

    CN119006497A