A semi-supervised cell defect segmentation method and device

By combining semi-supervised learning with the U-Net architecture and a multi-scale conditional denoising model, and utilizing unlabeled data and complementary masking techniques, the inefficiency of traditional cell defect detection methods is solved, achieving high-precision and high-reliability cell defect segmentation.

CN118365655BActive Publication Date: 2026-08-04WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
WUHAN UNIV
Filing Date
2024-04-28
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Traditional cell defect detection methods rely on manual inspection or simple automated vision systems, which are time-consuming and inefficient, making it difficult to meet the requirements of high precision and high reliability. Furthermore, deep learning models struggle to cover all defect types when there is a lack of a large amount of labeled data.

Method used

A semi-supervised learning method is adopted, combining a small amount of labeled data and a large amount of unlabeled data. The diffusion model and multi-scale conditional denoising model of U-Net architecture are used to extract features, and the encoder-decoder network and temporal embedding module are used to perform image reconstruction and segmentation.

Benefits of technology

It significantly improves the accuracy and efficiency of cell defect segmentation, reduces the dependence on labeled data, enhances the model's generalization ability and the ability to identify complex defects, and ensures the safety and reliability of the product.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365655B_ABST
    Figure CN118365655B_ABST
Patent Text Reader

Abstract

The semi-supervised battery cell defect segmentation method disclosed by the application effectively improves the generalization ability and accuracy of the model by fusing a semi-supervised learning framework, a diffusion model based on U-Net, multi-scale condition control, and complementary MASK technology. It ingeniously utilizes a large amount of unlabeled data and limited labeled data, deeply mines image features through an encoding-decoding structure and a time embedding module, simultaneously enhances the recognition ability of various defects through multi-scale analysis, and innovatively applies the complementary MASK technology to accurately locate and segment the defect area, thereby improving the accuracy of battery cell defect segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and industrial inspection, specifically to a semi-supervised method and apparatus for segmenting battery cell defects. Background Technology

[0002] With the development of intelligent manufacturing, the construction of a manufacturing powerhouse increasingly emphasizes efficient and precise production processes. Against this backdrop, battery cells, as a core component of key components in new energy vehicles and mobile electronic devices, directly affect the performance and safety of the final products. Therefore, improving the accuracy and efficiency of defect detection in the battery cell production process has become an important means to improve the quality of battery cells and related products. Traditional battery cell defect detection methods mainly rely on manual inspection or simple automated vision systems. These methods are often time-consuming and inefficient, and cannot meet the requirements of high precision and high reliability. With the development of artificial intelligence technology, defect detection using deep learning has become possible. However, training deep learning models typically requires a large amount of labeled data, and obtaining a large number of accurately labeled defect samples in actual production is both difficult and costly. Furthermore, the diversity and complexity of battery cell defects mean that even high-performance deep learning models cannot completely cover all possible defect types, especially when trained with only limited labeled data. This limits the effectiveness of traditional supervised learning methods in battery cell defect detection.

[0003] Given these challenges, developing a defect detection method that can effectively utilize unlabeled data is particularly important. Semi-supervised learning, as a method for training models using a small amount of labeled data and a large amount of unlabeled data, offers a new approach to solving these problems. This method significantly reduces reliance on large amounts of labeled data, lowers labeling costs, and simultaneously improves the accuracy and generalization ability of defect detection.

[0004] The semi-supervised learning-based cell defect segmentation method proposed in this invention emerged in response to this technological background and demand. This method aims to improve the accuracy and efficiency of cell defect segmentation by combining a small amount of labeled data with a large amount of unlabeled data, utilizing a semi-supervised learning algorithm. This, in turn, supports the development of intelligent manufacturing, improves cell production quality, and ensures product safety and reliability. Summary of the Invention

[0005] To overcome the limitations of existing technologies, this invention designs a semi-supervised method and apparatus for battery cell defect segmentation. By combining a small amount of labeled data with a large amount of unlabeled data and utilizing a semi-supervised learning algorithm, the accuracy and efficiency of battery cell defect segmentation are improved, thereby supporting the development of intelligent manufacturing, improving the quality of battery cell production, and ensuring product safety and reliability.

[0006] The semi-supervised cell defect segmentation method designed in this invention includes the following steps:

[0007] Step S1: Construct a diffusion model based on the U-Net architecture. This diffusion model uses an encoder-decoder network and a temporal embedding module to extract features and reconstruct images from defect-free samples.

[0008] Step S2: Unsupervised training of the diffusion model is performed using unlabeled, defect-free samples;

[0009] Step S3: Construct a multi-scale conditional denoising model, which includes a multi-scale conditional control network, a denoising network, and a segmentation network.

[0010] The multi-scale conditional control network employs a multi-layer convolutional neural network to output multi-scale conditional control features. The denoising network consists of a feature extraction layer, a multi-scale feature fusion layer, and an output layer. The feature extraction layer extracts multi-scale image features from the input sample after adding noise. The multi-scale fusion layer fuses the outputs of the multi-scale conditional control network and the feature extraction layer. The output layer then outputs the denoised image. The segmentation network processes the input sample and the denoised image to obtain the segmentation result.

[0011] Step S4: Supervised training of the constructed multi-scale conditional denoising model is performed using the labeled defect samples.

[0012] Step S5: Use a set of n complementary masks to perform occlusion processing on the image to be detected, generate n-part reconstructed images, input the n-part reconstructed images into the trained diffusion model to obtain a single reconstructed image, and input the single reconstructed image and the test sample into the trained multi-scale conditional denoising model to obtain the segmentation result.

[0013] Furthermore, in step 1, both the encoding network and the decoding network contain 12 residual layers and 12 attention layers.

[0014] Furthermore, the training process in step 2 is as follows: the diffusion model is trained unsupervised using self-supervised learning, with noise loss as the target, and the backpropagation algorithm is used for training.

[0015] Furthermore, the network construction in step 3 is as follows:

[0016] Step S3-1: Input the defect sample into the multi-scale conditional control network, and output multi-scale conditional control features by using convolutional kernels of different sizes in each layer.

[0017] Step S3-2: Input the noisy sample into the denoising network. First, the sample passes through the feature extraction layer to obtain multi-scale image features. Then, it is input into the multi-scale feature fusion layer along with the multi-scale conditional control features obtained in the previous step to obtain the fused conditional adjustment features. Finally, the denoised image is obtained through the output layer.

[0018] Step S3-3: Input the defective sample and the denoised image into the segmentation network. The segmentation network performs convolutional feature extraction on the input image to obtain the segmentation result.

[0019] Furthermore, in step S3, the feature extraction layer and output layer of the denoising network are constructed based on the diffusion model in step S1.

[0020] Furthermore, the segmentation network adopts the ResNet-50 network.

[0021] Furthermore, the specific process of step 4 is as follows:

[0022] Step S4-1: Input the labeled defect sample y0 into the multi-scale conditional control network C, where C i This represents the output of the i-th layer of the multi-scale conditional control network, yielding multi-scale features C2, C3, and C4. The noisy sample x is then processed. t The input to the denoising network first passes through the feature extraction layer E to obtain multi-scale image features E1, E2, and E3. These features, along with the multi-scale conditional control features obtained in the previous step, are simultaneously input into the multi-scale feature fusion layer F to obtain the fused conditional adjustment features. Finally, the output layer D produces the denoised image.

[0023] Step S4-2: Compare the labeled defect sample y0 with the denoised image. Input to a segmentation network, segmentation network S extracts y0 and y0 respectively. Features were analyzed, and cosine similarity was used to calculate feature maps M at different scales. n The above abnormal graph:

[0024]

[0025] In the formula, n represents the nth feature layer of the segmentation network S, and the anomaly score (Score) for the anomaly localization input pair is:

[0026]

[0027] Where σ n Let represent the upsampling factor to maintain the same dimension in the pixel space image, and N represent the number of feature layers used. By determining the threshold, the segmentation result is obtained, and the segmentation loss L is derived. mask :

[0028]

[0029] Where M is the true value of the input image. The output of the outlier segmentation module applies smoothed L1 loss to reduce oversensitivity to outliers.

[0030] Based on the same inventive concept, this solution also designs an electronic device, including:

[0031] One or more processors;

[0032] Storage device for storing one or more programs;

[0033] When one or more programs are executed by the one or more processors, the one or more processors implement a semi-supervised cell defect segmentation method.

[0034] Based on the same inventive concept, this solution also designs a computer-readable medium storing a computer program, which, when executed by a processor, implements a semi-supervised method for segmenting battery cell defects.

[0035] The advantages of this invention are:

[0036] 1. This innovative semi-supervised training method combines unsupervised and supervised learning, fully leveraging the advantages of a large amount of unlabeled data and a small amount of labeled data, thereby reducing reliance on large amounts of labeled data. This semi-supervised learning strategy can significantly improve the model's generalization ability, especially when data labeling is costly or difficult to obtain large amounts of labeled data, effectively enhancing model performance. By introducing unlabeled data, the model can learn richer data distribution characteristics, helping to improve its predictive ability for unseen samples.

[0037] 2. An innovative multi-scale conditional control denoising method is employed. By using multi-scale conditional control, this method can meticulously capture features at different scales of the image, thereby improving the model's ability to recognize defects of different sizes, shapes, or textures. The application of multi-scale conditional control allows the model to maintain high-level semantic information while also paying attention to local details, effectively improving the model's accuracy and robustness. This strategy is particularly crucial for processing subtle differences in images, significantly enhancing the model's ability to handle complex defects and ensuring good performance under various conditions.

[0038] 3. The innovative application of complementary masks not only enhances the model's ability to identify defect regions but also improves the accuracy of image reconstruction. By applying complementary masks to the image to be detected and then reconstructing it, this method can capture more information in different regions, exhibiting higher sensitivity, particularly in detecting defect edges or minute defects. Furthermore, the use of complementary masks can, to some extent, compensate for information that may be missed under a single viewpoint or scale, providing the model with an effective information fusion strategy. This significantly improves the model's ability to identify and segment complex defects, enhancing its reliability and adaptability in practical applications. Attached Figure Description

[0039] Figure 1 This is a diffusion model architecture diagram according to an embodiment of the present invention.

[0040] Figure 2 This is a diagram of the multi-scale conditional denoising model architecture according to an embodiment of the present invention.

[0041] Figure 3 This is a system flowchart of the present invention. Detailed Implementation

[0042] The present invention will now be described in detail and completely with reference to the accompanying drawings. Those skilled in the art will be able to implement the present invention based on these descriptions.

[0043] Example 1

[0044] This invention discloses a semi-supervised method for segmenting battery cell defects, as shown in the attached figure. Figure 3 As shown, by integrating a semi-supervised learning framework, a U-Net-based diffusion model, multi-scale conditional control, and complementary masking techniques, the generalization ability and accuracy of the model are effectively improved. It cleverly utilizes a large amount of unlabeled data and limited labeled data, deeply mining image features through an encoder-decoder structure and a temporal embedding module. Simultaneously, it enhances the identification ability of various defects through multi-scale analysis and innovatively applies complementary masking techniques to accurately locate and segment defect regions, thereby improving the accuracy of cell defect segmentation.

[0045] A specific embodiment of this method includes the following steps:

[0046] Step S1: Construct a diffusion model based on the U-Net architecture, as shown in the attached diagram. Figure 1As shown, this model employs an encoder-decoder network and a temporal embedding module. In the encoder stage, the input data consists of unlabeled, defect-free samples. Temporal embedding is introduced through the temporal embedding module, followed by feature extraction using residual and attention layers. In the decoder stage, the input data is the encoder's output, which is also embedded through the temporal embedding module. Similarly, residual and attention layers are used to reconstruct image features and restore dimensions. An intermediate layer is located between the encoder and decoder, undergoing two deeper convolutional operations. A feature fusion layer connects the encoder and decoder. The specific implementation process is explained below:

[0047] Step S1-1: Input the defect-free sample into the encoder. The encoder first adds noise to the defect-free sample, then introduces temporal embedding into the noisy sample through the temporal embedding module, and uses the residual layer and attention layer to extract features from the sample.

[0048] Step S1-2: Input the output features of the encoder into the intermediate layer. The intermediate layer first introduces temporal embedding into the features through the temporal embedding module, and then performs two deeper convolution operations.

[0049] In steps S1-3, the output features of the intermediate layer are input into the decoder and introduced into temporal embedding through the temporal embedding module. Similarly, the residual layer and attention layer are used to reproduce the image features and the features recorded by the attention layer in S1-1 are skipped to obtain the reconstructed image.

[0050] As a preferred embodiment, in step S1, the encoding network includes 12 residual layers and 12 attention layers; the decoding network includes 12 residual layers and 12 attention layers.

[0051] As a preferred embodiment, the convolutional layers in the intermediate layers of step S1 use convolutional kernels of size 3*3;

[0052] Step S2 involves training the deep learning model constructed in step S1 using unlabeled, defect-free samples; the specific steps are as follows:

[0053] S2-1, In step S1-1, the time embedding t follows the following distribution:

[0054] t~Uniform({1,...,T})

[0055] The defect-free normal sample is x0, and the encoder generates a random Gaussian noise image ∈, which is taken from the normal distribution ∈ ~ N(0,1). These are constant parameters obtained from time embedding. The noisy sample x is obtained according to the following formula. t .

[0056]

[0057] S2-2, the noisy sample x t The input to the encoding network, and the noise output by the final neural network, is ∈ θ (x t The actual noise ∈ ~N(0,1). Based on the noise output of the neural network ∈ θ (x t ,t), the noisy sample x t Constant parameters obtained from time embedding The estimated normal sample size is obtained using the following formula.

[0058]

[0059] The loss function is then:

[0060]

[0061] As a preferred method, with noise loss To achieve this, the backpropagation algorithm is used to train the network structure in S1;

[0062] As a preferred approach, the diffusion model is trained using self-supervised learning for unsupervised training.

[0063] Step S3: Construct a multi-scale conditional denoising model, as shown in the attached figure. Figure 2 As shown, the model consists of a multi-scale conditional control network, a denoising network, and a segmentation network. The multi-scale conditional control network employs a multi-layer convolutional neural network; the denoising network comprises a feature extraction layer, a multi-scale feature fusion layer, and an output layer; and the segmentation network uses ResNet-50. The specific implementation process is described below:

[0064] Step S3-1: Input the defective samples into the multi-scale conditional control network, and output multi-scale conditional control features by using convolutional kernels of different sizes in each layer.

[0065] Step S3-2: Input the noisy sample into the denoising network. First, the sample passes through the feature extraction layer to obtain multi-scale image features. Then, it is input into the multi-scale feature fusion layer along with the multi-scale conditional control features obtained in the previous step to obtain the fused conditional adjustment features. Finally, the denoised image is obtained through the output layer.

[0066] Step S3-3: Input the sample and the denoised image into the segmentation network. The segmentation network performs convolutional feature extraction on the input image to obtain the segmentation result.

[0067] As a preferred embodiment, the feature extraction layer and output layer of the denoising network in step S3 are constructed based on the diffusion model of S1;

[0068] As a preferred embodiment, the multi-scale conditional control network in step S3 is a 4-convolutional neural network;

[0069] Step S4: Train the model constructed in step S3 using the labeled defect samples. The specific steps are as follows:

[0070] Step S4-1: Input the labeled defect sample y0 into the multi-scale conditional control network C, where C i Let represent the output of the i-th layer of the multi-scale conditional control network, and obtain the multi-scale features C2, C3, and C4. Then, the noisy defect sample y... t The input to the denoising network first passes through the feature extraction layer E to obtain multi-scale image features E1, E2, and E3. These multi-scale conditional control features, along with the conditions obtained in the previous step, are then input into the multi-scale feature fusion layer F to obtain the fused conditional adjustment features. Finally, the output layer D produces the denoised image. This process can be expressed as:

[0071]

[0072] Step S4-2, compare sample y0 with the denoised image Input to a segmentation network, segmentation network S extracts y0 and y0 respectively. Features were analyzed, and cosine similarity was used to calculate feature maps M at different scales. n The above abnormal graph:

[0073]

[0074] In the formula, n represents the nth feature layer of the segmentation network S, and the anomaly score (Score) for the anomaly localization input pair is:

[0075]

[0076] Where σ n Let represent the upsampling factor to maintain the same dimensionality in the pixel space image, and N represent the number of feature layers used. By determining the threshold, we finally obtain the segmentation result, and thus the segmentation loss L. mask :

[0077]

[0078] Where M is the true value of the input image. The output of the anomaly segmentation module. A smoothed L1 loss is applied to reduce oversensitivity to outliers. Under this training objective, the denoising network needs to learn the entire distribution of normal appearances and be controlled by a multi-scale conditional control network to restore anomalous regions to normal regions, while the segmentation network needs to learn to better segment anomalous parts.

[0079] As a preferred approach, the segmentation loss L mask To achieve this, the backpropagation algorithm is used to perform supervised training on the network structure in S3;

[0080] Step S5: Using the deep learning model trained in steps S2 and S4, detect the battery cell samples. Using a set of n complementary masks and the sample to be tested, n input images are obtained. The input images are reconstructed using the diffusion model in step S2, and the n partially reconstructed regions are reassembled into a single reconstructed image. Then, the reconstructed image and the sample to be tested are input into the multi-scale conditional denoising model in step S4, i.e., input into the multi-scale conditional control network and the denoising network respectively, finally obtaining the segmentation result.

[0081] Example 2

[0082] Based on the same inventive concept, the present invention also provides an electronic device, including one or more processors; a storage device for storing one or more programs; and when the one or more programs are executed by the one or more processors, the one or more processors implement the method described in Embodiment 1.

[0083] Since the device described in Embodiment 2 of this invention is an electronic device used in implementing the half-supervision cell defect segmentation method of Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this electronic device based on the method described in Embodiment 1 of this invention, and therefore will not be described again here. All electronic devices used in any method of this invention fall within the scope of protection of this invention.

[0084] Example 3

[0085] Based on the same inventive concept, the present invention also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the method described in Embodiment 1.

[0086] Since the device described in Embodiment 3 of this invention is a computer-readable medium used for implementing the half-supervision cell defect segmentation method of Embodiment 1 of this invention, those skilled in the art can understand the specific structure and variations of this electronic device based on the method described in Embodiment 1 of this invention, and therefore will not be repeated here. All electronic devices used in any method of this invention fall within the scope of protection of this invention.

[0087] It should be understood that the above description of the preferred embodiments is quite detailed and should not be construed as a limitation on the scope of protection of this application. Those skilled in the art, under the guidance of this invention, may make substitutions or modifications without departing from the scope of protection of the claims of this application, all of which fall within the scope of protection of this application. The scope of protection claimed in this application shall be determined by the appended claims.

Claims

1. A semi-supervised method for segmenting battery cell defects, characterized in that, Includes the following steps: Step S1: Construct a diffusion model based on the U-Net architecture. This diffusion model uses an encoder-decoder network and a temporal embedding module to extract features and reconstruct images from defect-free samples. Step S2: Unsupervised training of the diffusion model is performed using unlabeled, defect-free samples; Step S3: Construct a multi-scale conditional denoising model, which includes a multi-scale conditional control network, a denoising network, and a segmentation network, wherein: The multi-scale conditional control network employs a multi-layer convolutional neural network to output multi-scale conditional control features. The denoising network consists of a feature extraction layer, a multi-scale feature fusion layer, and an output layer. The feature extraction layer and the output layer are constructed based on the diffusion model in step S1. The feature extraction layer is used to extract multi-scale image features of the input sample after adding noise. The multi-scale fusion layer fuses the outputs of the multi-scale conditional control network and the feature extraction layer. The output layer then outputs the denoised image. The segmentation network processes the input sample and the denoised image to obtain the segmentation result. Step S4: Supervised training of the constructed multi-scale conditional denoising model is performed using the labeled defect samples. Step S5: Use a set of n complementary masks to perform occlusion processing on the image to be detected, generate n-part reconstructed images, input the n-part reconstructed images into the trained diffusion model to obtain a single reconstructed image, and input the single reconstructed image and the test sample into the trained multi-scale conditional denoising model to obtain the segmentation result.

2. The semi-supervised cell defect segmentation method according to claim 1, characterized in that: In step 1, both the encoding and decoding networks contain 12 residual layers and 12 attention layers.

3. The semi-supervised cell defect segmentation method according to claim 1, characterized in that: The training process in step 2 is as follows: The diffusion model is trained unsupervised using self-supervised learning, with noise loss as the target, and is trained using the backpropagation algorithm.

4. The semi-supervised cell defect segmentation method according to claim 1, characterized in that: The network construction in step 3 is as follows: Step S3-1: Input the defect sample into the multi-scale conditional control network, and output multi-scale conditional control features by using convolutional kernels of different sizes in each layer. Step S3-2: Input the noisy sample into the denoising network. First, the sample passes through the feature extraction layer to obtain multi-scale image features. Then, it is input into the multi-scale feature fusion layer along with the multi-scale conditional control features obtained in the previous step to obtain the fused conditional adjustment features. Finally, the denoised image is obtained through the output layer. Step S3-3: Input the defective sample and the denoised image into the segmentation network. The segmentation network performs convolutional feature extraction on the input image to obtain the segmentation result.

5. The semi-supervised cell defect segmentation method according to claim 1, characterized in that: The network construction in step 3 is as follows: The segmentation network adopts the ResNet-50 network.

6. The semi-supervised cell defect segmentation method according to claim 1, characterized in that: The specific process of step 4 is as follows: Step S4-1: The marked defect samples... Input a multi-scale conditional control network C, where This represents the output of the i-th layer of the multi-scale conditional control network, and we obtain... , , Multi-scale features, adding noise to the samples The input denoising network first passes the sample through the feature extraction layer E to obtain multi-scale image features. , , The multi-scale conditional control features obtained in the previous step are simultaneously input into the multi-scale feature fusion layer F to obtain the fused conditional adjustment features. These features are then passed through the output layer D to obtain the denoised image. ; Step S4-2, mark the defect samples. With the denoised image Input to the segmentation network, the segmentation network S extracts respectively and Features were analyzed, and cosine similarity was used to calculate feature maps at different scales. The above abnormal graph: In the formula, n represents the nth feature layer of the segmentation network S, and the anomaly score (Score) for the anomaly localization input pair is: in Let N represent the upsampling factor to maintain the same dimensionality in the pixel space image, and let N represent the number of feature layers used. By determining the threshold, the segmentation result is obtained, and the segmentation loss is derived. : in The true value of the input image. For the output of the outlier segmentation module, a smoothed L1 loss is applied to reduce oversensitivity to outliers.

7. An electronic device, characterized in that, include: One or more processors; Storage device for storing one or more programs; When one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-6.

8. A computer-readable medium having a computer program stored thereon, characterized in that: When the program is executed by the processor, it implements the method as described in any one of claims 1-6.