Burr detection model training method and device, equipment and storage medium

By adopting a semantic segmentation model based on STDC network in lithium battery pole glitch detection, combined with the training method of feature fusion module, ARM module and weighted loss function, the problem of low glitch detection accuracy in the prior art is solved, and higher detection accuracy and edge extraction effect are achieved.

CN119888734APending Publication Date: 2025-04-25SUZHOU MEGAROBO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411824468.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

In the prior art, the lithium battery pole burr detection based on the semantic segmentation model has a large segmentation error, resulting in low accuracy of burr segmentation and the inability to effectively extract the edges of the lithium battery pole foil.

Method used

Using a semantic segmentation model based on STDC network, the feature information output by the processing module of the encoder is processed by the first FCNHead module and output to the loss function calculation module, and the loss function calculation is intervened in advance, thereby speeding up the model parameter update and convergence. At the same time, feature fusion module and ARM module are used to enhance feature extraction, and the weighted loss function of Focal loss function and Dice loss function are trained.

Benefits of technology

The accuracy of the lithium battery pole burr detection model is improved, and the edges of the pole foil are effectively extracted, which improves the segmentation error and accuracy problems of the existing STDC model in battery pole burr detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119888734A_ABST
    Figure CN119888734A_ABST
Patent Text Reader

Abstract

The invention provides a burr detection model training method and device, equipment and a storage medium, and the method comprises the steps: collecting the image data of a battery pole piece, and building a data set; constructing semantic segmentation models of an encoder, a decoder, a loss function calculation module and at least two first FCNHead modules based on the STDC network; training the semantic segmentation model by using the data set to obtain a burr detection model; in the training process, feature information of at least two stage processing modules of the encoder is input into a corresponding first FCNHead module, and first prediction result information is output to a loss function calculation module through the first FCNHead module; the decoder outputs the output second prediction result information to a loss function calculation module; and the loss function calculation module judges whether the semantic segmentation model is trained or not based on the first prediction result information and the second prediction result information. By adopting the scheme, the accuracy of the burr detection model 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 image-based defect detection and processing, and in particular to a burr detection model training method, device, equipment and storage medium. Background Art

[0002] In recent years, fire accidents have frequently occurred in the fields of electric vehicles and energy storage, and battery companies have increasingly stringent high-quality control and safety requirements for battery production. The main culprit for lithium battery explosions and fires is the micron-level burrs between the positive and negative electrodes and the diaphragm of lithium batteries. According to the IEEE1725 battery safety performance review and testing standard, burrs are metal protrusions extending upward or downward from the foil to the outside of the electrode with the foil (uncoated area) as the baseline, or metal protrusions extending upward or downward from the coating to the outside of the electrode in the coated area. Measuring the burr size is to measure the height of the burr in the vertical direction; burrs that are too large can easily pierce the diaphragm, and then the positive and negative electrodes contact and cause a short circuit. If a short circuit occurs when the battery is fully charged, a large amount of heat will be released immediately inside to cause an explosion, seriously endangering the lives and property of consumers. Therefore, it is particularly important to detect burrs on lithium battery electrodes.

[0003] With the development of AI (Artificial Intelligence) technology, some manufacturers have adopted AI algorithms to replace the traditional manual periodic inspection method for burr detection. Taking the burr detection of lithium battery negative pole pieces as an example, due to the material characteristics, the generation form of burrs in positive and negative pole pieces is different. Negative pole burrs are usually defined as foil offset problems, that is, the relative position of the foil in the carbon layer. If the offset exceeds the specified value, it is defined as a negative pole burr problem. At present, in the detection of negative pole piece defects, a semantic segmentation model composed of an STDC (Short-Term Dense Concatenate) network is usually used to detect foil offset problems.

[0004] The semantic segmentation model currently used uses edge detail auxiliary supervision in the STDC network. This method is conducive to the network's characterization of target edge information and is suitable for complex multi-target scenes in reality. However, due to the characteristics of lithium battery pole foil being slender and single scene, edge detail auxiliary supervision is not applicable. Directly using it for lithium battery pole foil segmentation tasks will result in large segmentation errors, resulting in low burr segmentation accuracy. Summary of the invention

[0005] The present application provides a burr detection model training method, device, equipment and storage medium to solve the above-mentioned technical problems in the prior art.

[0006] According to a first aspect of the present application, a burr detection model training method is provided, the method comprising:

[0007] Collect battery pole piece image data and establish a data set;

[0008] Constructing a semantic segmentation model based on the STDC network, wherein the semantic segmentation model includes: an encoder, a decoder, a loss function calculation module and at least two first FCNHead modules;

[0009] The semantic segmentation model is trained using the data set to obtain a burr detection model; wherein, during the training process, at least two of the multiple stage processing modules of the encoder are used as target stage processing modules, and the feature information output by each target stage processing module is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module; the decoder outputs the output second prediction result information to the loss function calculation module; the loss function calculation module calculates a first loss value based on the first prediction result information input by the first FCNHead module, and calculates a second loss value based on the second prediction result information input by the decoder, and determines whether the semantic segmentation model is trained based on the first loss value and the second loss value.

[0010] In some embodiments, the feature information output by each target stage processing module is input into the corresponding first FCNHead module, including:

[0011] The feature information output by each target stage processing module is first upsampled to the original image size using an upsampling method and then input into the corresponding first FCNHead module. The original image size is equal to the image size of the battery electrode image data.

[0012] In some of the embodiments, the upsampling method includes any one of linear interpolation, bilinear interpolation, nearest neighbor interpolation and single transposed convolution.

[0013] In some embodiments, the encoder includes five stage processing modules, namely: a first stage processing module, a second stage processing module, a third stage processing module, a fourth stage processing module and a fifth stage processing module; wherein the third stage processing module, the fourth stage processing module and the fifth stage processing module are all used as the target stage processing module; the upsampling method adopts a single transposed convolution;

[0014] The feature information output by each of the target stage processing modules is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module, including:

[0015] The feature information output by the third stage processing module of the encoder is processed by 2 3 After multiple upsampling, the first prediction result information of the three stages is output to the loss function calculation module through the first FCNHead module;

[0016] The feature information output by the fourth stage processing module of the encoder is processed by 2 4 After multiple upsampling, the first prediction result information of the four stages is output to the loss function calculation module through the first FCNHead module;

[0017] The feature information output by the fifth stage processing module of the encoder is processed by 2 5 After multiple upsampling, the corresponding first FCNHead module is input, and the five-stage first prediction result information is output to the loss function calculation module through the first FCNHead module.

[0018] In some of these embodiments, the semantic segmentation model further includes a feature fusion module and at least one ARM module, and the decoder includes a second FCNHead module;

[0019] Each of the ARM modules obtains feature information of a stage processing module of the encoder, refines the feature information and outputs it to the feature fusion module;

[0020] The feature fusion module fuses the feature information output by a stage processing module of the encoder with the refined feature information, and outputs the fused feature information to the second FCNHead module.

[0021] In some embodiments, the loss function calculation module adopts any one of the Focal loss function, the BCE loss function and the Dice loss function, or

[0022] A weighted loss function is a combination of the Focal loss function and the BCE loss function with the Dice loss function.

[0023] In some embodiments, judging whether the burr detection model is trained by using the first loss value and the second loss value includes:

[0024] The sum of the first loss value and the second loss value is calculated to determine whether the semantic segmentation model is trained based on the sum and a preset convergence condition.

[0025] According to a second aspect of the present application, a burr detection model training device is provided, the device comprising:

[0026] A data set building unit, used to collect battery pole piece images and build a data set;

[0027] A model construction unit, used to construct a semantic segmentation model based on the STDC network, wherein the semantic segmentation model includes: an encoder, a decoder, a loss function calculation module and at least two first FCNHead modules;

[0028] A model training unit is used to use the data set to train the semantic segmentation model to obtain a burr detection model; wherein, during the training process, at least two of the multiple stage processing modules of the encoder are used as target stage processing modules, and the feature information output by each target stage processing module is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module; the decoder outputs the output second prediction result information to the loss function calculation module; the loss function calculation module calculates a first loss value based on the first prediction result information input by the first FCNHead module, and calculates a second loss value based on the second prediction result information input by the decoder, and determines whether the semantic segmentation model is trained based on the first loss value and the second loss value.

[0029] According to a third aspect of the present application, a computer device is provided, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the above-mentioned burr detection model training method are implemented.

[0030] According to a fourth aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the steps of the above-mentioned burr detection model training method are implemented.

[0031] In summary, the burr detection model training method, device, equipment and storage medium provided by the present application have at least the following beneficial effects:

[0032] By constructing a semantic segmentation model based on the STDC network, during the training process of the semantic segmentation model, the feature information output by at least two target stage processing modules of the encoder passes through the corresponding first FCNHead module and then outputs the first prediction result information to the loss function calculation module, so that the loss function calculation module intervenes in advance in the processing stage of the encoder, so that the model parameters are updated in advance and the convergence is accelerated; moreover, the second prediction result information output by the decoder is output to the loss function calculation module, and the loss function calculation module determines whether the semantic segmentation model is trained based on the first prediction result information and the second prediction result information; by using the first FCNHead module to process at least two target stage processing modules in the encoding stage and then outputting them to the loss function calculation module, pixel-based analysis and processing can be achieved, which is more suitable for the detection of pole pieces with slender features in the image, and can effectively extract the edges of the pole piece foil in the image, thereby improving the accuracy of the model training for pole piece burr detection, improving the problem of large segmentation error and low accuracy of the existing STDC model applied to battery pole piece burr detection, and thus improving the accuracy of battery pole piece burr detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below in conjunction with the accompanying drawings. It is obvious that the drawings described below are some implementation methods of the present application. For those skilled in the art, other drawings or solutions can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 A flowchart of a burr detection model training method in one embodiment of the present application;

[0035] Figure 2 This is the basic architecture diagram of the STDC network;

[0036] Figure 3 This is a schematic diagram of the architecture of a semantic segmentation model in one embodiment of the present application;

[0037] Figure 4 This is the basic architecture diagram of the ARM module;

[0038] Figure 5 A structural diagram of a burr detection model training device in one embodiment of the present application;

[0039] Figure 6 A structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] In order to make the above and other features and advantages of the present application more clear, the present application is further described below in conjunction with the accompanying drawings. It should be understood that the specific embodiments given herein are for the purpose of explaining to those skilled in the art and are only exemplary and not restrictive.

[0041] In the following description, many specific details are set forth to provide a thorough understanding of the present application. However, it is apparent to those skilled in the art that specific details need not be adopted to practice the present application. In other cases, well-known steps or operations are not described in detail to avoid blurring the present application.

[0042] In the existing semantic segmentation model, edge detail auxiliary supervision is used, that is, the output of the backbone network in Stage 3 is compared with the edge detail label (Detail GT) generated by the label through the Laplace convolution kernel and the ordinary convolution. This method is conducive to the characterization of the target edge information and is suitable for complex scenes with multiple targets. The existing semantic segmentation model uses edge detail auxiliary supervision to improve the segmentation efficiency, but there are also some shortcomings: in the decoding stage, the STDC network directly performs 8 times upsampling, which greatly reduces the time consumption of reasoning but is prone to lose a lot of details; in terms of loss function, the Sφrensen-Dice loss function (Dice loss) is used, which mainly measures the similarity between the model prediction and the true segmentation label, but the category information of each pixel cannot be taken into account. The study found that the lithium battery pole piece foil is slender and the scene is single. The existing semantic segmentation model based on edge detail auxiliary supervision is not suitable for segmenting the battery pole piece. Directly using it for the lithium battery pole piece foil segmentation task will result in a large segmentation error, resulting in low burr segmentation accuracy. Based on this, the present application provides a burr detection model training method, which can make the trained burr detection model suitable for the detection and segmentation of battery pole pieces.

[0043] The burr detection model training method provided in the embodiment of the present application can be executed by the burr detection model training device provided in the embodiment of the present application, and the device can be configured in a computer device.

[0044] refer to Figure 1 A burr detection model training method provided in the present application includes the following steps S110 to S150.

[0045] S110: Collect battery pole piece image data and establish a data set.

[0046] Specifically, multiple images of battery pole pieces can be collected by a camera to obtain multiple battery pole piece image data; for example, an industrial camera is used to take a picture of the cut side of the negative pole piece of a lithium battery and collect the pole piece foil image, and the image content includes a black light-shielding cloth background, a pole piece carbon layer, and a metal foil located in the middle of the carbon layer (the foil area does not necessarily exist). Furthermore, multiple battery pole piece image data are divided according to proportion to obtain a data set. Among them, the data set includes a training set and a test set, and can also include a verification set; the training set is used to train the model, the test set is used for model testing, and the verification set is used to verify the model effect.

[0047] For example, step S110 may include: using an industrial camera to take a picture of the cut side of the negative electrode of the lithium battery and collect an image of the electrode foil; using a labeling tool to label the foil area in the collected electrode foil image using a polygon or smear method (pictures where the foil area does not exist are not labeled, but retained); dividing the labeled electrode foil image into a training set, a test set, and a validation set in a ratio of 8:1:1.

[0048] S130: constructing a semantic segmentation model based on the STDC network, the semantic segmentation model including: an encoder, a decoder, a loss function calculation module and at least two first FCNHead modules.

[0049] Among them, the encoder includes multiple stage processing modules, and the number of layers of the stage processing modules can be set according to actual needs; each stage processing module downsamples the input image data in turn and processes the output feature information. The decoder decodes and outputs based on the processing of the encoder. The loss function calculation module is used to calculate the loss value during the training process of the model. Among them, the first FCNHead module is a processing block that uses FCN (Fully Convolution Networks) as an auxiliary head, which can perform classification prediction pixel by pixel.

[0050] Take the STDC network including 6 stages (stage processing modules) from Stage 1 to Stage 6 as an example. Figure 2As shown in the figure, each stage is composed of STDC modules. ConvX in the figure represents the "convolution + BN + ReLU" operation, M represents the number of input feature channels, and N represents the number of output feature channels. Specifically, in order to reduce the amount of calculation, ConX1 of Stage 1 and ConX2 of Stage 2 have only one convolution block; the convolution kernel size of the first block is 1×1, and the rest use 3×3 convolution layers with stride (step length) = 2. The first STDC module in Stage 3-Stage5 uses the first mode, that is, stride = 2 for downsampling, and the remaining STDC modules keep the resolution unchanged. Then Stage1 to Stage 5 all perform downsampling with stride = 2, then Stage 3-Stage5 generate feature maps with downsampling ratios of 1 / 8, 1 / 16, and 1 / 32 respectively, the output resolution of Stage5 = (H / 32, W / 32), and global average pooling (AVG Pool) is used to provide global context information with a large receptive field; Stage6 outputs the prediction result (Stage6 is not used in the semantic segmentation model designed in this application).

[0051] S150: Use the data set to train the semantic segmentation model to obtain a burr detection model; during the training process, at least two of the multiple stage processing modules of the encoder are used as target stage processing modules, and the feature information output by each target stage processing module is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module; the decoder outputs the output second prediction result information to the loss function calculation module; the loss function calculation module calculates the first loss value based on the first prediction result information input by the first FCNHead module, and calculates the second loss value based on the second prediction result information input by the decoder, and determines whether the semantic segmentation model is trained based on the first loss value and the second loss value.

[0052] Specifically, the semantic segmentation model is trained using the training set in the data set to obtain a trained model; the trained model is tested using the test set in the data set, and the trained model can be further verified using the validation set. In the process of training the semantic segmentation model, the first FCNHead module is used to process the feature information output by the corresponding stage processing module to output the first prediction result information to the loss function calculation module, so that the loss function calculation module is allowed to intervene in advance in the processing stage of the encoder, and because the first FCNHead module can process pixel by pixel, pixel-level supervision can be achieved. In addition, the loss calculation of the loss function calculation module combines the first prediction result information output by the first FCNHead module and the second prediction result information output by the decoder, so that the output of the decoding stage also participates in the directional propagation process of the model.

[0053] The above-mentioned burr detection model training method constructs a semantic segmentation model based on the STDC network. During the training process of the semantic segmentation model, the feature information output by at least two target stage processing modules of the encoder passes through the corresponding first FCNHead module and then outputs the first prediction result information to the loss function calculation module, so that the loss function calculation module intervenes in advance in the processing stage of the encoder, so that the model parameters are updated in advance and the convergence is accelerated; moreover, the second prediction result information output by the decoder is output to the loss function calculation module, and the loss function calculation module determines whether the semantic segmentation model is trained based on the first prediction result information and the second prediction result information; by using the first FCNHead module to process at least two target stage processing modules in the encoding stage and then outputting them to the loss function calculation module, pixel-based analysis and processing can be realized, which is more suitable for pole piece detection with slender features in the image, and can effectively extract the edge of the pole piece foil in the image, thereby improving the accuracy of the model training for pole piece burr detection, improving the problem of large segmentation error and low accuracy of the existing STDC model applied to battery pole piece burr detection, and thus improving the accuracy of battery pole piece burr detection.

[0054] The existing semantic segmentation model adopts detail supervision to improve efficiency, but loses details and reduces accuracy. In contrast, the burr detection model trained by the burr detection model training method of the present application is used for burr detection of small foils in lithium battery pole pieces, which can further improve the accuracy of lithium battery pole piece quality inspection and achieve a balance between the accuracy and speed of foil semantic segmentation.

[0055] In one embodiment, after step S110 establishes the data set and before step S150, the method further includes: performing data enhancement on the battery electrode image data in the data set to obtain a data enhanced data set. Correspondingly, step S150 uses the data enhanced data set to train the semantic segmentation model.

[0056] For example, mosaic, horizontal flip, upside down flip, random cropping, random splicing, fading and other methods can be used to enhance the data of battery pole image data in the training set, test set and validation set to increase the diversity of data and the generalization ability of the model. Specifically, at the end of the data enhancement process, the battery pole image data is converted into the input size of the semantic segmentation model by geometric scaling + center filling to improve the accuracy of pole foil segmentation.

[0057] In one embodiment, in step S150, the feature information output by each target stage processing module is input into the corresponding first FCNHead module, including: the feature information output by each target stage processing module is first upsampled to the original image size using an upsampling method and then input into the corresponding first FCNHead module, the original image size is equal to the image size of the battery pole piece image data input into the semantic segmentation model, that is, equal to the input size of the semantic segmentation model.

[0058] Among them, the number of target stage processing modules is at least 2, and one target stage processing module corresponds to one first FCNHead module. Since each stage processing module has down-sampling processing on the input image data, the feature information output by the target stage processing module is first up-sampled to restore the feature information to the original image size, and then processed by the corresponding first FCNHead module to output the first prediction result information to the loss function calculation module, so that the loss function calculation module can compare the first prediction result information with the label. Specifically, the first FCNHead module uses FCNHead to predict and process the output result information, and no up-sampling operation is required.

[0059] Specifically, the upsampling multiple is related to the downsampling multiple of the target stage processing module and the level of the target stage processing module in the STDC network. The upsampling multiple can be, for example, a n , where a is the number of downsampling steps and n is the level of the target stage processing module. For example, the target stage processing module is the third stage processing module, that is, n = 3, and the downsampling multiple of each stage processing module is 2, that is, a = 2, then the feature information output by the third stage processing module is 2 3 After upsampling, the data is input to the corresponding first FCNHead module.

[0060] In some embodiments, the upsampling method includes any one of linear interpolation, bilinear interpolation, nearest neighbor interpolation and single transposed convolution. It is understood that in other embodiments, other upsampling methods may also be used, and this application does not limit this.

[0061] In some of these embodiments, reference Figure 3 , the encoder includes at least five stage processing modules, namely: the first stage processing module (Stage 1), the second stage processing module (Stage 2), the third stage processing module (Stage 3), the fourth stage processing module (Stage 4) and the fifth stage processing module (Stage 5). Among them, the third stage processing module, the fourth stage processing module and the fifth stage processing module are all used as target stage processing modules; the upsampling method adopts a single transposed convolution, and the step length of downsampling of each stage processing module is 2.

[0062] Specifically, during the training process, the feature information output by each target stage processing module is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module, including the following processing steps (a1) to (a3).

[0063] Step (a1): The feature information output by the third stage processing module of the encoder is processed by 2 3 After multiple upsampling, the corresponding first FCNHead module is input, and the three-stage first prediction result information is output to the loss function calculation module through the first FCNHead module.

[0064] Step (a2): The feature information output by the fourth stage processing module of the encoder is processed by 2 4 After multiple upsampling, the corresponding first FCNHead module is input, and the first prediction result information of the four stages is output to the loss function calculation module through the first FCNHead module.

[0065] Step (a3): The feature information output by the fifth stage processing module of the encoder is processed by 2 5 After multiple upsampling, the corresponding first FCNHead module is input, and the five-stage first prediction result information is output to the loss function calculation module through the first FCNHead module.

[0066] Among them, the first FCNHead module uses FCNHead for processing. The first prediction result information of the third stage is the first prediction result information corresponding to the third stage processing module, the first prediction result information of the fourth stage is the first prediction result information corresponding to the fourth stage processing module, and the first prediction result information of the fifth stage is the first prediction result information corresponding to the fifth stage processing module.

[0067] The existing model uses edge detail auxiliary supervision, and compares the output of the backbone network at Stage3 through the Detail Head with the edge detail label generated by the label through the Laplace convolution kernel and the ordinary convolution. This method is conducive to the characterization of the target edge information, but it is not suitable for the segmentation of lithium battery pole foils with slender and single scene characteristics. Based on the output of Stage3-Stage5 in the encoding stage, this application performs 8x upsampling (8x Upsample), 16x upsampling (16x Upsample) and 32x upsampling (32x Upsample) respectively and sends them to the corresponding first FCNHead module respectively, and finally outputs the features with the same input size as the semantic segmentation model as the three inputs of the loss function calculation module, which are used to compare with the label (Seg GT) respectively. In this way, the loss function is intervened in advance at different stages of encoder downsampling, which plays a better role in extracting the edges of lithium battery pole foils and improves the overall accuracy of the model.

[0068] In some of these embodiments, the semantic segmentation model also includes a feature fusion module (FFM) and at least one ARM module (attention refinement module), and the decoder includes a second FCNHead module.

[0069] Each ARM module obtains feature information of a stage processing module of the encoder, refines the feature information and outputs it to the feature fusion module; the feature fusion module fuses the feature information output by a stage processing module of the encoder with the refined feature information output by the ARM module, and outputs the fused feature information to the second FCNHead module.

[0070] Specifically, the feature information refined by the ARM module is used as one input of the feature fusion module to provide context information for the feature fusion module, and the feature information output by a stage processing module of the encoder is used as another input of the feature fusion module to provide spatial information. Figure 4 As shown, the ARM module includes global pool, Conv1x1, BN (batch norm) and sigmoid activation function operations based on the residual structure to effectively extract semantic information in the feature map. In view of the characteristics of the foil on the pole piece, such as slender targets and unclear edge segmentation, this application adds an ARM module to the backbone network to obtain more semantic information, which can improve segmentation accuracy.

[0071] In the feature fusion stage, the present application uses the ARM module to encode the deep context information in the context path, and then feeds it into the FFM together with the shallow spatial information that retains rich detail information in the spatial path. Specifically, FFM can use bilinear interpolation to upsample the features corresponding to the context information to the same feature size as the spatial information, and then fuse these features. FFM concentrates the connected features into a feature vector and calculates a weight vector, which is used to re-weight the features to output features that combine spatial information and context information.

[0072] For example, two ARM modules may be included, such as Figure 3 As shown in the figure, one ARM module refines the feature information of Stage 4, and another ARM module refines the feature information of Stage 5. The feature information of Stage 4 and Stage 5 are respectively output after passing through the ARM modules and used as an input of the FFM (Feature Fusion Module) to provide global context information (Context info) for FFM. The feature information output by the encoder Stage 3 is used as another input of FFM to provide spatial information (Spatial info) for FFM. FFM fuses the 1 / 8 downsampled spatial information output by Stage 3 and the acquired global context information.

[0073] The second FCNHead module uses FCNHead processing to output result information. Specifically, the second FCNHead module predicts and outputs second prediction result information based on the fused feature information. During the training process, the second prediction result information output by the second FCNHead module is used by the loss function calculation module to participate in loss calculation.

[0074] The existing semantic segmentation model directly upsamples the STDC model in the decoding stage, which reduces the inference cost but is prone to losing a lot of details. This application uses FCNHead in the decoding part, through repeated deconvolution pooling operations and self-attention mechanism modules, to strengthen the connection between contexts and restore detailed information, enhance the correlation between different targets and the representation ability of the model, and finally output the segmentation results of the pole foil, and restore the semantics and edge information extracted by the backbone as much as possible into the segmentation results, so as to improve the processing accuracy, thereby improving the accuracy of model segmentation.

[0075] In some embodiments, the loss function calculation module uses any one of the Focal loss function, the BCE loss function and the Dice loss function. In other embodiments, the loss function calculation module uses a weighted loss function that is a combination of any one of the Focal loss function and the BCE loss function and the Dice loss function.

[0076] Specifically, a weighted loss function that is a combination of the Focal loss function and the Dice loss function can be used. The loss function used in the training process of the existing semantic segmentation model is the Dice loss function, which can characterize the predicted segmentation results and labels, but cannot judge whether the category information of the pixels is correct. The present application uses a weighted loss function that is a combination of the Focal loss function and the Dice loss function, which can perform classification predictions based on pixel points, taking into account the description of the structure and details of the lithium battery electrode foil, so that the model can better adapt to the refined battery electrode foil segmentation.

[0077] Furthermore, in some of the embodiments, the loss calculation of the weighted loss function of the combination of the Focal loss function and the Dice loss function is as shown in the following formula:

[0078]

[0079] Loss Focal =-Y(1-X) r log(X)-(1-Y)X r log(1-X)

[0080] Loss = 0.5 * Loss Dice +Loss Focal

[0081] Where X is the predicted segmentation result, such as the first predicted result information or the second predicted result information; Y is the label value, r is a constant; Loss Dice is the result calculated by the Dice loss function, Loss Focal is the result calculated by the Focal loss function, and Loss is the loss value obtained by the weighted loss function of the combination of the Focal loss function and the Dice loss function.

[0082] In some of the embodiments, whether the glitch detection model is trained is determined by using a first loss value and a second loss value, including: calculating the sum of the first loss value and the second loss value, to determine whether the semantic segmentation model is trained based on the sum and a preset convergence condition, where the preset convergence condition may be, for example, that the sum is less than a preset threshold.

[0083] Furthermore, when there are multiple first FCNHead modules, there are multiple first prediction result information. The loss function calculation module performs loss calculation on each first prediction result information to obtain the corresponding first loss value, performs loss calculation on the second prediction result information to obtain the second loss value, and calculates the sum of the second loss value and each first loss value. By combining the output results of the first FCNHead module and the second FCNHead module to perform loss calculation for convergence analysis, model training is more accurate.

[0084] For example Figure 3 In the example, the three first FCNHead modules correspond to the three first prediction result information. Based on the first prediction result information, the weighted loss function of the combination of the Focal loss function and the Dice loss function is used to calculate the loss values ​​Loss1, Loss2, and Loss3. Based on the second prediction result information output by the second FCNHead module, the weighted loss function of the combination of the Focal loss function and the Dice loss function is used to calculate the loss value Loss4. Then the sum value

[0085]

[0086] Furthermore, after the model is trained, the IoU segmentation accuracy index can be used to evaluate the image segmentation performance of the trained semantic segmentation model. Specifically, the calculation formula of the IoU segmentation accuracy index is as follows:

[0087]

[0088] Among them, TP is the sample area of ​​the pole foil pixel class that is correctly classified, FP is the sample area of ​​the background pixel class that is misclassified as the pole foil pixel class, and FN is the sample area of ​​the pole foil pixel class that is misclassified as the background pixel class.

[0089] The present application provides a burr detection model training device, such as Figure 5 As shown, the burr detection model training device includes: a data set establishing unit 610, a model building unit 630 and a model training unit 650.

[0090] The data set establishing unit 610 is used to collect battery pole piece images and establish a data set.

[0091] The model construction unit 630 is used to construct a semantic segmentation model based on the STDC network. The semantic segmentation model includes: an encoder, a decoder, a loss function calculation module and at least two first FCNHead modules.

[0092] The model training unit 650 is used to use a data set to train the semantic segmentation model to obtain a burr detection model; wherein, during the training process, at least two of the multiple stage processing modules of the encoder are used as target stage processing modules, and the feature information output by each target stage processing module is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module; the decoder outputs the output second prediction result information to the loss function calculation module; the loss function calculation module calculates the first loss value based on the first prediction result information input by the first FCNHead module, and calculates the second loss value based on the second prediction result information input by the decoder, and determines whether the semantic segmentation model is trained based on the first loss value and the second loss value.

[0093] In one embodiment, the burr detection model training device further includes a preprocessing module for performing data enhancement on the battery pole piece image data in the data set to obtain a data enhanced data set. Correspondingly, the model training unit 650 uses the data enhanced data set to train the semantic segmentation model.

[0094] In one embodiment, the model training unit 650 is further used to: first upsample the feature information output by each target stage processing module to the original image size using an upsampling method and then input it into the corresponding first FCNHead module. The original image size is equal to the image size of the battery pole image data input into the semantic segmentation model, that is, equal to the input size of the semantic segmentation model.

[0095] In one embodiment, the encoder includes at least five stage processing modules, namely: a first stage processing module (Stage 1), a second stage processing module (Stage 2), a third stage processing module (Stage 3), a fourth stage processing module (Stage 4) and a fifth stage processing module (Stage 5). The third stage processing module, the fourth stage processing module and the fifth stage processing module are all used as target stage processing modules; the upsampling method adopts a single transposed convolution, and the step length of downsampling of each stage processing module is 2.

[0096] The model training unit 650 is further used to process the feature information output by the third stage processing module of the encoder through 2 3 After multiple upsampling, the first FCNHead module is input to the corresponding first prediction result information of the three stages, and the first FCNHead module outputs the first prediction result information of the three stages to the loss function calculation module; the feature information output by the fourth stage processing module of the encoder is processed by 2 4After multiple upsampling, the first FCNHead module is input to the corresponding first prediction result information of the four stages to the loss function calculation module through the first FCNHead module; the feature information output by the fifth stage processing module of the encoder is processed by 2 5 After multiple upsampling, the corresponding first FCNHead module is input, and the five-stage first prediction result information is output to the loss function calculation module through the first FCNHead module.

[0097] In some embodiments, the loss function calculation module adopts any one of the Focal loss function, the BCE loss function and the Dice loss function. In other embodiments, the loss function calculation module adopts a weighted loss function that is a combination of any one of the Focal loss function and the BCE loss function and the Dice loss function.

[0098] In some of the embodiments, the model training unit 650 is further used to calculate the sum of the first loss value and the second loss value to determine whether the semantic segmentation model is trained based on the sum and a preset convergence condition. The preset convergence condition may, for example, be that the sum is less than a preset threshold.

[0099] It should be understood that the specific features, operations and details described hereinabove with respect to the method of the present application may also be similarly applied to the device and system of the present application, or vice versa. In addition, each step of the method of the present application described above may be performed by a corresponding component or unit of the device or system of the present application.

[0100] It should be understood that each module / unit of the device of the present application can be implemented in whole or in part by software, hardware, firmware or a combination thereof. Each module / unit can be embedded in the processor of the computer device in the form of hardware or firmware or independent of the processor, or can be stored in the memory of the computer device in the form of software for the processor to call to perform the operation of each module / unit. Each module / unit can be implemented as an independent component or module, or two or more modules / units can be implemented as a single component or module.

[0101] like Figure 6 As shown, the present application provides a computer device 700, which includes a processor 701 and a memory 702 storing computer program instructions. When the processor 701 executes the computer program instructions, each step of the above-mentioned burr detection model training method is implemented. The computer device 700 can be generally a server, a terminal, or any other computer device with necessary computing and / or processing capabilities.

[0102] In one embodiment, the computer device 700 may include a processor, a memory, a network interface, a communication interface, etc. connected through a system bus. The processor of the computer device 700 may be used to provide necessary computing, processing and / or control capabilities. The memory of the computer device 700 may include a non-volatile storage medium and an internal memory. The non-volatile storage medium may store an operating system, a computer program, etc. The internal memory may provide an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface and the communication interface of the computer device 700 may be used to connect and communicate with external devices through a network. When the computer program is executed by the processor, the steps of the method of the present application are executed.

[0103] In addition, the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the above-mentioned burr detection model training method are implemented.

[0104] Those skilled in the art will appreciate that the method steps of the present application can be completed by instructing related hardware such as computer device 700 or processor through a computer program, and the computer program can be stored in a non-temporary computer-readable storage medium, and the computer program causes the steps of the present application to be executed when it is executed. Depending on the circumstances, any reference to memory, storage or other media herein may include non-volatile or volatile memory. Examples of non-volatile memory include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk, etc. Examples of volatile memory include random access memory (RAM), external cache memory, etc.

[0105] The various technical features described above can be combined arbitrarily. Although all possible combinations of these technical features are not described, any combination of these technical features should be considered to be covered by this specification as long as there is no contradiction in such combination.

[0106] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A burr detection model training method, characterized in that: The method comprises: Collect battery pole piece image data and establish a data set; Constructing a semantic segmentation model based on the STDC network, wherein the semantic segmentation model includes: an encoder, a decoder, a loss function calculation module and at least two first FCNHead modules; The semantic segmentation model is trained using the data set to obtain a burr detection model; wherein, during the training process, at least two of the multiple stage processing modules of the encoder are used as target stage processing modules, and the feature information output by each target stage processing module is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module; the decoder outputs the output second prediction result information to the loss function calculation module; the loss function calculation module calculates a first loss value based on the first prediction result information input by the first FCNHead module, and calculates a second loss value based on the second prediction result information input by the decoder, and determines whether the semantic segmentation model is trained based on the first loss value and the second loss value.

2. The method according to claim 1, characterized in that The feature information output by each target stage processing module is input into the corresponding first FCNHead module, including: The feature information output by each target stage processing module is first upsampled to the original image size using an upsampling method and then input into the corresponding first FCNHead module. The original image size is equal to the image size of the battery electrode image data input into the semantic segmentation model.

3. The method according to claim 2, characterized in that The up-sampling method includes any one of linear interpolation, bilinear interpolation, nearest neighbor interpolation and single transposed convolution.

4. The method according to claim 3, characterized in that The encoder includes five stage processing modules, namely: a first stage processing module, a second stage processing module, a third stage processing module, a fourth stage processing module and a fifth stage processing module; wherein the third stage processing module, the fourth stage processing module and the fifth stage processing module are all used as the target stage processing modules; the upsampling method adopts a single transposed convolution; The feature information output by each of the target stage processing modules is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module, including: The feature information output by the third stage processing module of the encoder is processed by 2 3 After multiple upsampling, the first prediction result information of the three stages is output to the loss function calculation module through the first FCNHead module; The feature information output by the fourth stage processing module of the encoder is processed by 2 4 After multiple upsampling, the first prediction result information of the four stages is output to the loss function calculation module through the first FCNHead module; The feature information output by the fifth stage processing module of the encoder is processed by 2 5 After multiple upsampling, the corresponding first FCNHead module is input, and the five-stage first prediction result information is output to the loss function calculation module through the first FCNHead module.

5. The method according to claim 1, characterized in that The semantic segmentation model also includes a feature fusion module and at least one ARM module, and the decoder includes a second FCNHead module; Each of the ARM modules obtains feature information of a stage processing module of the encoder, refines the feature information and outputs it to the feature fusion module; The feature fusion module fuses the feature information output by a stage processing module of the encoder with the refined feature information, and outputs the fused feature information to the second FCNHead module.

6. The method according to any one of claims 1 to 5, characterized in that: The loss function calculation module adopts any one of the Focal loss function, the BCE loss function and the Dice loss function, or A weighted loss function is a combination of the Focal loss function and the BCE loss function with the Dice loss function.

7. The method according to claim 1, characterized in that The determining whether the burr detection model is trained by using the first loss value and the second loss value includes: The sum of the first loss value and the second loss value is calculated to determine whether the semantic segmentation model is trained based on the sum and a preset convergence condition.

8. A burr detection model training device, characterized in that: The device comprises: A data set building unit, used to collect battery pole piece images and build a data set; A model construction unit, used to construct a semantic segmentation model based on the STDC network, wherein the semantic segmentation model includes: an encoder, a decoder, a loss function calculation module and at least two first FCNHead modules; A model training unit is used to use the data set to train the semantic segmentation model to obtain a burr detection model; wherein, during the training process, at least two of the multiple stage processing modules of the encoder are used as target stage processing modules, and the feature information output by each target stage processing module is input into the corresponding first FCNHead module, and the first prediction result information is output to the loss function calculation module through the first FCNHead module; the decoder outputs the output second prediction result information to the loss function calculation module; the loss function calculation module calculates a first loss value based on the first prediction result information input by the first FCNHead module, and calculates a second loss value based on the second prediction result information input by the decoder, and determines whether the semantic segmentation model is trained based on the first loss value and the second loss value.

9. A computer device, characterized in that: include: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, which implement the steps of the method according to any one of claims 1 to 7 when executed by a processor.