Battery pole piece defect feature recognition method, model training method thereof and electronic device
By preprocessing battery electrode images and optimizing the convolutional neural network model using edge detection algorithms, the problem of the convolutional neural network model's dependence on labeled data is solved, improving the accuracy and reliability of battery electrode defect feature identification and reducing training costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN DESAY BATTERY CO LTD
- Filing Date
- 2026-06-04
- Publication Date
- 2026-07-07
AI Technical Summary
In existing technologies, convolutional neural network models require a large amount of accurate defect feature labeling data for identifying battery electrode defects. Manually identifying and labeling defect features is time-consuming and prone to errors, leading to a decrease in identification accuracy.
By acquiring battery electrode images, preprocessing them to crop out the background, constructing a convolutional neural network model, and optimizing the model by combining it with an edge detection algorithm, the recognition results of the edge detection algorithm are compared with the recognition results of the convolutional neural network model to optimize the model and reduce its dependence on labeled data.
This reduces the risk of errors in manually labeling defect features, improves the accuracy and reliability of battery electrode defect feature identification, and reduces training costs and resource consumption.
Smart Images

Figure CN122347722A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery production testing technology, and in particular to a method for identifying defect features of battery electrodes, a model training method thereon, and electronic equipment. Background Technology
[0002] Battery electrode defects (such as cracks and bubbles) can severely impact battery performance and safety, leading to internal short circuits, performance degradation, and even potential fires or explosions, making them crucial for battery production quality control. Given the significant impact of battery electrode defects on battery performance and safety, battery electrode defect feature identification technology plays a vital role in battery production. However, current technologies for identifying defects such as electrode cracks and bubbles still face several challenges and problems.
[0003] Existing technologies employ convolutional neural network (CNN) models to identify defect features in battery electrodes. However, training a CNN model requires a large amount of accurate defect feature labeling data. When identifying and labeling defect features in battery electrode images, manual identification and labeling of defect features is often time-consuming and error-prone, leading to a decrease in the accuracy of the CNN model's defect feature identification and reducing the reliability of defect feature identification in real images of battery electrodes. Summary of the Invention
[0004] To address the aforementioned issues, this application proposes a method for identifying battery electrode defect features, a model training method, and an electronic device, which can reduce the training cost of the battery electrode defect feature identification model and improve the accuracy and reliability of battery electrode defect feature identification.
[0005] In a first aspect, this application provides a method for training a battery electrode defect feature recognition model, the training method comprising: Multiple battery electrode images are acquired, wherein a portion of the battery electrode images contains true defect features and another portion of the battery electrode images contains false defect features. The battery electrode image is preprocessed to obtain a preprocessed training image that retains only the electrode portion; Convolutional neural network model is constructed, and a portion of the training images are used as the training set and test set respectively for training the convolutional neural network model; By combining edge detection algorithms to optimize the trained convolutional neural network model, a battery electrode defect feature recognition model is obtained.
[0006] In one embodiment, optimizing the trained convolutional neural network model using the edge detection algorithm includes: Another portion of the training images is used as a prediction set and for optimizing the convolutional neural network model; The convolutional neural network model is used to identify defect features in the training images in the prediction set, and the first identification result is output. The training images in the prediction set are used to identify defect features using an edge detection algorithm, and a second identification result is output. The trained convolutional neural network model is optimized based on the overlap rate between the first and second recognition results.
[0007] In one embodiment, optimizing the trained convolutional neural network model based on the overlap rate between the first recognition result and the second recognition result includes: Determine whether the overlap rate between the first identification result and the second identification result is less than a preset value; If so, the training images in the prediction set with inconsistent recognition results are obtained and used as the training images in the replacement set. Replace the training images in the replacement set with the training images in the training set to obtain the fine-tuned training set; The convolutional neural network model is optimized based on the fine-tuned training set until the overlap rate between the first recognition result and the second recognition result is greater than or equal to a preset value.
[0008] In one embodiment, optimizing the convolutional neural network model based on the fine-tuned training set includes: Load the convolutional neural network model and freeze all layers of the convolutional neural network model, except for the last fully connected layer; Based on the fine-tuned training set and the test set, the convolutional neural network model is trained with a preset fine-tuned learning rate; The fine-tuned learning rate is less than the initial learning rate of the convolutional neural network model.
[0009] In one embodiment, preprocessing the battery electrode image includes cropping the battery electrode image, and cropping the battery electrode image includes: Processing is performed along the column direction of the battery electrode image to obtain the difference value and position value corresponding to each pixel value in each row; The larger difference values among the difference values in each row are determined as target difference values. The two position values with the largest difference among the position values corresponding to the target difference values are respectively used as the first target position value and the second target position value. The average value of the first target position in each row is used as the first boundary between the electrode area and the background area, and the average value of the second target position in each row is used as the second boundary between the electrode area and the background area. The battery electrode image is cropped based on the first boundary and the second boundary.
[0010] In one embodiment, the preprocessing of the battery electrode image further includes: Before cropping the battery electrode image, the battery electrode image is adjusted from its initial resolution to a preset first resolution; After cropping the battery electrode image, the battery electrode image is adjusted to a preset second resolution to obtain a training image; Wherein, the first resolution is smaller than the initial resolution, and the second resolution is smaller than the first resolution.
[0011] Secondly, this application also provides a method for identifying defect features of battery electrode sheets, including: Acquire images of the battery electrodes to be identified; The battery electrode image to be identified is preprocessed to obtain a preprocessed image that retains only the electrode portion; The defect features of the image to be identified are identified using a battery electrode defect feature recognition model. The results obtained from the defect feature identification are output; The battery electrode defect feature recognition model is obtained by training the battery electrode defect feature recognition model using any of the training methods described above.
[0012] In one embodiment, the preprocessing of the battery electrode image to be identified includes cropping the battery electrode image to be identified, and the cropping of the battery electrode image to be identified includes: Process along the column direction of the battery electrode image to be identified to obtain the difference value and position value corresponding to each pixel value in each row; The larger difference values among the difference values in each row are determined as target difference values. The two position values with the largest difference among the position values corresponding to the target difference values are respectively used as the first target position value and the second target position value. The average value of the first target position in each row is used as the first boundary between the electrode area and the background area, and the average value of the second target position in each row is used as the second boundary between the electrode area and the background area. The battery electrode image to be identified is cropped based on the first boundary and the second boundary.
[0013] In one embodiment, the preprocessing of the battery electrode image to be identified further includes: Before cropping the battery electrode image to be identified, the battery electrode image to be identified is adjusted from the initial resolution to a preset first resolution; After cropping the battery electrode image to be identified, the battery electrode image to be identified is adjusted to a preset second resolution to obtain the image to be identified; Wherein, the first resolution is smaller than the initial resolution, and the second resolution is smaller than the first resolution.
[0014] Thirdly, this application also provides an electronic device, including a processor and a memory, wherein the processor and the memory are electrically connected; The memory is used to store executable instructions, which are used to instruct the processor to execute the battery electrode defect feature recognition model training method as described above, or the battery electrode defect feature recognition method as described above.
[0015] In summary, the battery electrode defect feature recognition method, its model training method, and electronic device in this application preprocess battery electrode images, using them as training images to train a convolutional neural network model. Furthermore, an edge detection algorithm is used to optimize the trained convolutional neural network model, resulting in a battery electrode defect feature recognition model. By incorporating edge detection as feedback for defect feature recognition results to optimize the convolutional neural network model, the need for a large amount of accurate defect feature labeling data during convolutional neural network model training is reduced. This not only reduces the risk of errors in manual defect feature identification and labeling, improving the accuracy and reliability of battery electrode defect feature recognition, but also reduces the human resources and time consumed in manual defect feature identification and labeling, thus lowering the training cost of the battery electrode defect feature recognition model. Attached image description: Figure 1 This is a flowchart illustrating the implementation of the battery electrode defect feature recognition model training method provided in this application embodiment.
[0016] Figure 2 This is a schematic diagram of a battery electrode image including an electrode portion and a background portion, and a training image retaining only the electrode portion, provided for embodiments of this application.
[0017] Figure 3 This is a schematic diagram illustrating an application scenario for obtaining the boundary between the electrode portion and the background portion, as provided in an embodiment of this application.
[0018] Figure 4 This is a schematic diagram of a real defect image and a fake defect image provided in an embodiment of this application.
[0019] Figure 5 This is a flowchart illustrating the implementation of the battery electrode defect feature identification method provided in this application embodiment.
[0020] Figure 6This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed implementation method: It should be noted that, unless otherwise specified, the embodiments and technical features in the embodiments of this application can be combined with each other, and the detailed descriptions in the specific embodiments should be understood as explanations of the purpose of this application and should not be regarded as undue limitations on this application.
[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the specific technical solutions of this application will be further described in detail below with reference to the accompanying drawings of the embodiments of this application. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application.
[0022] Please see Figure 1 and Figure 2 , Figure 1 The implementation flow of the battery electrode defect feature recognition model training method provided in the embodiments of this application is shown. Figure 2 The image shows a battery electrode image including the electrode portion and the background portion, as well as a training image retaining only the electrode portion, provided by an embodiment of this application.
[0023] like Figure 1 As shown, the training method for the battery electrode defect feature recognition model includes the following steps.
[0024] 101. Obtain multiple battery electrode images. Some battery electrode images contain true defect features in their electrode portions, while others contain false defect features in their electrode portions.
[0025] The battery electrode images can be acquired using conventional image sensors. For example, CCD or CMOS image sensors can be used to acquire images of the battery electrodes, thus obtaining images that include both the electrode portion and the background. Some battery electrode images contain true defect features in the electrode portion, while others contain false defect features that are similar to true defect features. This allows for the subsequent training of a convolutional neural network model for defect feature recognition.
[0026] like Figure 2 As shown, Figure 2a on the left is a battery electrode image that includes the electrode portion and the background portion. It can be seen that the battery electrode image acquired by the image sensor includes the electrode portion (gray portion in Figure 2a) and the background portion such as the tab (white portion in Figure 2a) and the device (black portion in Figure 2a).
[0027] In one embodiment, in order to improve the quality of the battery electrode image and reduce the impact of the environment, a high-definition electrode image with a resolution of 8192*8000 can be dynamically captured by a linear CCD as the initial resolution battery electrode image, so that the battery electrode image can retain the small defect features on the electrode as much as possible.
[0028] 102. Preprocess the battery electrode images to obtain preprocessed training images that retain only the electrode portion.
[0029] First, the battery electrode image can be adjusted from its initial resolution to a preset first resolution, which is smaller than the initial resolution. This reduces the resolution of the battery electrode image, thereby reducing the computational resources consumed in subsequent processing and improving the efficiency of preprocessing.
[0030] For example, a battery electrode image with an initial resolution of 8192*8000 can be reduced to 801*800 using bilinear interpolation, meaning the first resolution is preset to 801*800. Bilinear interpolation maintains high image quality while reducing the resolution of the battery electrode image. Of course, there are no limitations on the specific resolution reduction algorithm; other existing image processing algorithms can be used to reduce the resolution of the battery electrode image.
[0031] Subsequently, noise reduction processing can be performed on the battery electrode images, such as using median filtering algorithms, to improve the recognizability of various defect features in the battery electrode images, which to some extent helps improve the training effect of the convolutional neural network model.
[0032] Then, since the battery electrode image captured by the image sensor includes both the electrode portion and the background portion, the focus of electrode defect feature recognition is only on the electrode portion. The background portion may interfere with the defect feature extraction of the convolutional neural network model. Therefore, it is necessary to crop the battery electrode image to remove the background portion, thereby obtaining a battery electrode image that retains only the electrode portion.
[0033] like Figure 2 As shown, an algorithm can be used to identify the boundary between the electrode portion and the background portion in Figure 2a, that is, the boundary between the gray portion and the black or white portion in Figure 2a. Then, the background portion is removed to obtain the battery electrode image in Figure 2b on the right, which retains only the electrode portion.
[0034] In one embodiment, cropping the battery electrode image includes the following steps.
[0035] Process along the column direction of the battery electrode image to obtain the difference value and position value corresponding to each pixel value in each row.
[0036] In this context, the column direction of the battery electrode image can be understood as the left-right direction of the battery electrode image.
[0037] Each pixel in each row of the battery electrode image can be numbered sequentially along the column direction of the battery electrode image to obtain the position value corresponding to each pixel in each row.
[0038] The pixel values corresponding to each pixel in each row can be listed sequentially along the column direction of the battery electrode image, and each pixel can be matched with its position value.
[0039] The difference between discrete points can be calculated along the column direction of the battery electrode image using a difference formula, obtaining the difference value corresponding to each pixel value in each row, thus determining the magnitude of the difference between each pixel value and its adjacent pixel values. The difference formula for discrete points can employ either a forward difference formula or a backward difference formula.
[0040] The target difference values are determined by identifying the larger difference values among the difference values in each row. The two position values with the largest difference among the position values corresponding to the target difference values are respectively used as the first target position value and the second target position value.
[0041] Since the electrode portion and the background portion typically have two boundaries along the column direction of the battery electrode image, and the adjacent pixel values at the boundary between the electrode portion and the background portion usually have the greatest difference, i.e., the largest difference value, we can first obtain at least two larger difference values from the current row as target difference values to obtain the position values corresponding to the pixels at the boundary between the electrode portion and the background portion.
[0042] Then, by comparing the differences between the position values corresponding to each target difference value, the two position values with the largest difference are taken as the first target position value and the second target position value, respectively. In this way, the two boundaries between the electrode portion and the background portion of the battery electrode image can be determined by the first target position value and the second target position value, and the electrode portion of the battery electrode image can be kept between the two boundaries as much as possible.
[0043] In one embodiment, the five largest difference values in the current row can be obtained as target difference values. That is, the top five difference values in the current row are determined as target difference values. By comparing the differences between the position values corresponding to these five difference values, the two position values with the largest difference are respectively used as the first target position value and the second target position value.
[0044] The average value of the first target position in each row is used as the first boundary between the electrode portion and the background portion, and the average value of the second target position in each row is used as the second boundary between the electrode portion and the background portion.
[0045] In one embodiment, to improve the accuracy of determining the boundary between the electrode portion and the background portion of the battery electrode image, the first target position values in each row can be averaged to serve as the first boundary between the electrode portion and the background portion; the second target position values in each row can be averaged to serve as the second boundary between the electrode portion and the background portion. Specifically, the first target position values in each row are all in adjacent columns, and the second target position values in each row are all in adjacent columns.
[0046] Suppose that a battery electrode image has three rows. The first target position value in the first row is in the 3rd column, the first target position value in the second row is in the 4th column, and the first target position value in the third row is in the 5th column. The 3rd, 4th and 5th columns are close columns, and the average value is taken as the 4th column (12 / 3=4). That is, the pixel with the position value of the 4th column in each row is taken as the first boundary.
[0047] Furthermore, suppose that the image of another battery electrode has a total of four rows. The first target position value in the first row is the 3rd column, the first target position value in the second row is the 4th column, the first target position value in the third row is the 5th column, and the first target position value in the fourth row is the 5th column. The 3rd, 4th and 5th columns are close columns, and the average value is the 4th column (17 / 4=4.25). That is, the pixel with the position value of the 4th column in each row is taken as the first boundary.
[0048] The battery electrode image is cropped based on the first and second boundaries.
[0049] Please refer to Figure 3 The figure shows an application scenario for obtaining the boundary between the electrode portion and the background portion provided by an embodiment of this application.
[0050] In one embodiment, such as Figure 3 As shown, this application scenario includes a CCD image (i.e., a portion of the battery electrode image adjusted to the first resolution), pixel values, diff values (i.e., difference values), and column positions (i.e., position values). The black portion of the CCD image represents the background, and the gray portion represents the electrode portion. The changes in pixel values, diff values, and column positions along the column direction of the image correspond to the changes in the CCD image along the column direction of the image.
[0051] Suppose that a portion of the battery electrode image has two rows. Each pixel in each row of the battery electrode image can be numbered sequentially along the column direction of the battery electrode image (e.g., 1, 2, ..., 819) to obtain the position value of each pixel in each row.
[0052] The pixel values corresponding to each pixel in each row can be listed sequentially along the column direction of the battery electrode image, and each pixel can be matched with its position value.
[0053] The difference can be calculated along the column direction of the battery electrode image using the difference formula for discrete points, to obtain the difference value corresponding to each pixel value in each row, and thus obtain the difference between each pixel value in each row and its adjacent pixel values.
[0054] For the first column from the left and the columns to its right, the forward difference formula can be used, that is, the pixel value of the right column minus the pixel value of the current column, and the absolute value is taken to obtain the difference value corresponding to the pixel value of the current column (for example, in the first row, the pixel value of the third column from the left is 23, the pixel value of the fourth column from the left is 61, |61-23|=38, that is, the difference value corresponding to the pixel value of the third column from the left is 38).
[0055] For the first column from the right and the columns to its left, the backward difference formula can be used, that is, the pixel value of the current column is subtracted from the pixel value of the column to its left, and the absolute value is taken to obtain the difference value corresponding to the pixel value of the current column (for example, in the first row, the pixel value of the third column from the right is 23, the pixel value of the fourth column from the right is 60, |23-60|=37, that is, the difference value corresponding to the pixel value of the third column from the right is 37).
[0056] exist Figure 3 As can be seen in the first and second rows, the two pixels in the third column from the left and the third column from the right are the set of pixels with the largest diff values and the furthest column positions in that row (located in the two columns marked by red lines). The column positions of these pixels are used as the first and second target position values for that row, respectively. Simultaneously, the average of the first target position values from these two rows yields the first boundary on the left, which is the third column from the left; the average of the second target position values from these two rows yields the second boundary on the right, which is the third column from the right. These two columns can then be used as the boundaries between the electrode portion and the background portion to crop the battery electrode image, thus obtaining a battery electrode image that fully retains the electrode portion.
[0057] Of course, the above application scenarios are only examples. The specific pixel values, diff values, and column positions can be determined according to the actual image information. Furthermore, other boundary determination algorithms commonly used in this field can be used to determine the specific boundary between the polar part and the background part.
[0058] Finally, after cropping the battery electrode image, it is adjusted to a preset second resolution to obtain the training image. The second resolution is lower than the first resolution, and also lower than the resolution of the cropped battery electrode image. This second-resolution training image provides battery electrode images with uniform resolution for training the convolutional neural network model, ensuring consistent resolution across all cropped battery electrode images and thus improving the training performance of the convolutional neural network model. For example, the preset second resolution is 590*800.
[0059] It should be noted that although reducing the resolution of the battery electrode image before cropping and unifying the resolution of the cropped battery electrode image will cause slight distortion of the battery electrode image, it will not affect the extraction of electrode defect features in the battery electrode image and the subsequent training of the convolutional neural network model.
[0060] As shown above, reducing the resolution of the battery electrode image, cropping the background outside the electrode area, and denoising the image can ensure a certain level of image quality. This effectively reduces the computational resources and time consumed during the subsequent training of the convolutional neural network model, while also guaranteeing the training effect of the model. Understandably, the specific preprocessing method can be determined based on the actual situation.
[0061] 103. Construct a convolutional neural network model, and use a portion of the training images as the training set and test set respectively for training the convolutional neural network model.
[0062] In this process, the preprocessed training images are manually identified and labeled with defect features, dividing them into two categories: true defect images containing genuine defect features and false defect images containing false defect features. A portion of these training images is selected as the training set, and the remaining portion is used as the test set. Both the training and test sets are then used to train the convolutional neural network model.
[0063] Combination Figure 4 In Figure 4a, the left side of the electrode portion has vertical crack defect features, so the training image is a true defect image containing true crack defect features. In Figure 4b, the electrode portion does not have crack defect features (only stripes with slight differences in adjacent pixel values exist), so the training image is a false defect image containing false crack defect features. All of the above training images can be classified by manually identifying and labeling defect features, and used as training images for the training set and test set.
[0064] In one embodiment, in order to reduce the pressure of manually identifying and labeling defect features in the training set and increase the amount of data in the training set, data augmentation can be performed on the two types of data in the training set (including real defect features and fake defect features) in advance. This includes at least one or more data augmentation operations such as rotation, translation, shearing and scaling. Data augmentation can increase the amount of data in the training set and improve the training effect of the convolutional neural network model with limited resources.
[0065] Data augmentation is not required for the test set. The augmented training and test set data are normalized to maintain a consistent scale between the training and test sets before being used to train the convolutional neural network model. Normalization can employ common techniques in this field, such as mean or standard deviation normalization, which will not be elaborated upon in this application.
[0066] The convolutional neural network model is designed, mainly consisting of multiple convolutional layers, pooling layers, and fully connected layers. The convolutional layers and fully connected layers are connected by a global average pooling layer, and the fully connected layers are followed by a sigmoid activation function. The remaining adjacent layers are connected by a ReLU activation function.
[0067] In one embodiment, the convolutional neural network model may include an input layer, three convolutional layers, two pooling layers, one global average pooling layer, two dropout layers, and two fully connected layers. The first convolutional layer may have 32 3×3 convolutional kernels, the second convolutional layer may have 32 3×3 convolutional kernels, and the third convolutional layer may have 64 3×3 convolutional kernels. The function of the convolutional layers is to extract defect features from the training images. The pooling layers are connected through the ReLU activation function, and the pooling window size can be (2, 2). The function of the pooling layers is to reduce the spatial dimension of the feature maps and reduce the amount of computation. The global average pooling layer is to reduce the multidimensional input of the image features extracted by the convolutional layers to one dimension (128*1) to prepare for the fully connected layers. The dropout layers are used to prevent the convolutional neural network model from overfitting and to enhance the generalization ability of the convolutional neural network model. The first fully connected layer may contain 128 input nodes and is connected to the second dropout layer through the ReLU activation function. The second fully connected layer may contain one output node and uses the Sigmoid activation function. Understandably, the specific parameters can be selected according to actual needs, and the above parameters are only used as examples.
[0068] After designing the convolutional neural network model, the training images from the training and test sets are imported into the convolutional neural network model. The convolutional neural network model is trained with an initial learning rate. The accuracy and loss value of the convolutional neural network model are calculated during the training process. The parameters of the convolutional neural network model are updated, and the convolutional neural network model after the initial training is completed is saved.
[0069] 104. The convolutional neural network model obtained by training is optimized by combining edge detection algorithm to obtain a battery electrode defect feature recognition model.
[0070] Among these methods, the defect feature recognition results output by the edge detection algorithm can be compared with the defect feature recognition results output by the convolutional neural network model to assist in the optimization of the convolutional neural network model.
[0071] By combining edge detection algorithms as feedback for defect feature recognition results, the convolutional neural network model is optimized, thereby reducing the need for a large amount of accurate defect feature labeling data for training the convolutional neural network model. This can reduce the number of training iterations while ensuring the accuracy and reliability of the convolutional neural network model in identifying battery electrode defects. It avoids the problem of increased time and computing resources caused by repeated training to improve the accuracy of the convolutional neural network model, thus reducing the training cost of the convolutional neural network model.
[0072] In one embodiment, optimizing the trained convolutional neural network model by combining an edge detection algorithm may include the following steps.
[0073] Another portion of the training images is used as the prediction set and for optimizing the convolutional neural network model.
[0074] In this process, multiple training images other than the training and test sets can be selected as the prediction set, which also includes both real defect images and fake defect images.
[0075] A convolutional neural network model is used to identify defect features in the training images in the prediction set, and the first identification result is output.
[0076] First, load the convolutional neural network model that has been preliminarily trained. This preliminarily trained convolutional neural network model is the convolutional neural network model that has been preliminarily trained using the training set and the test set, that is, the convolutional neural network model obtained after the preliminary training in step 103.
[0077] Then, the training images in the prediction set are imported for defect feature recognition, and the first recognition result is output. In one embodiment, the recognition result corresponding to the image identified as a true defect by the convolutional neural network model can be set to 1, and the recognition result corresponding to the image identified as a false defect by the convolutional neural network model can be set to 0.
[0078] The edge detection algorithm is used to identify defect features in the training images in the prediction set, and a second identification result is output.
[0079] The edge detection algorithm can be a common edge detection algorithm in this field, such as using the Canny edge detection algorithm to detect the edge of electrode defect features. The logic of the edge detection algorithm for electrode crack defect features can be based on the fact that the electrode crack defect feature is a continuous curve consisting of two relatively adjacent positions with continuously varying pixel values. For specific implementation methods, please refer to existing technologies.
[0080] A pre-stored edge detection algorithm is loaded, and training images from the prediction set are imported to perform defect feature recognition, thereby obtaining a second recognition result. In one embodiment, the prediction set is consistent with the prediction set imported by the convolutional neural network model. The recognition result corresponding to the image identified as a true defect by the edge detection algorithm is set to 1, and the recognition result corresponding to the image identified as a false defect by the edge detection algorithm is set to 0.
[0081] The trained convolutional neural network model is optimized based on the overlap rate between the first and second recognition results.
[0082] If the first identification result and the second identification result are consistent, it is recorded as the first identification result and the second identification result being identical; if the first identification result and the second identification result are inconsistent, it is recorded as the first identification result and the second identification result not being identical. The overlap rate between the first identification result and the second identification result is calculated using the formula: (Number of identical first identification results and second identification results / (Number of identical first identification results and second identification results + Number of non-identical first identification results and second identification results)).
[0083] In one embodiment, optimizing the trained convolutional neural network model based on the overlap rate between the first recognition result and the second recognition result may include the following steps.
[0084] Determine whether the overlap rate between the first recognition result and the second recognition result is less than a preset value.
[0085] Among them, a preset value related to the overlap rate can be preset, and the overlap rate between the first recognition result and the second recognition result obtained by performing defect feature recognition on the training images in the prediction set can be calculated, and it can be determined whether the overlap rate between the first recognition result and the second recognition result is less than the preset value.
[0086] If so, the training images in the prediction set with inconsistent recognition results are obtained and used as the training images in the replacement set.
[0087] If the overlap rate between the first recognition result and the second recognition result is less than the preset value, it indicates that the difference between the first recognition result and the second recognition result is large, which means that the accuracy of defect feature recognition of the convolutional neural network model may be low. Training images in the prediction set whose recognition results of the convolutional neural network model are inconsistent with the recognition results of the edge detection algorithm can be saved and used as a replacement set.
[0088] Replace the training images in the replacement set with the training images in the training set to obtain the fine-tuned training set.
[0089] Specifically, when the overlap rate between the first recognition result and the second recognition result is less than a preset value, training images from the replacement set can replace a portion of the training images in the training set, and these replacement images, along with the remaining training images in the training set, form a fine-tuned training set. In other words, a portion of the training images in the training set is directly replaced with training images from the replacement set. The fine-tuned training set may include a portion of the original training images as well as training images from the replacement set that are subsequently added to the training set.
[0090] The convolutional neural network model is optimized based on the fine-tuned training set until the overlap rate between the first recognition result and the second recognition result is greater than or equal to a preset value.
[0091] Among them, the convolutional neural network model can be further trained and optimized using the fine-tuned training set until the overlap rate between the first recognition result and the second recognition result is greater than or equal to the preset value, so as to ensure that the defect feature recognition accuracy of the battery electrode defect feature recognition model reaches a better effect.
[0092] In one embodiment, the preset value can be set to 99%. If the overlap rate between the first recognition result and the second recognition result is less than 99%, then the training image in the prediction set where the recognition results are inconsistent is retrieved, and the training image is used to replace the training image in the training set for further training of the convolutional neural network model until the overlap rate between the first recognition result and the second recognition result is greater than or equal to 99%. Understandably, this preset value can be determined according to actual needs.
[0093] As shown above, by forming a prediction set from training images outside the training and test sets, and then importing these training images into both the convolutional neural network (CNN) model and the edge detection algorithm for defect feature recognition, the training effectiveness of the CNN model can be judged based on the overlap rate between the recognition results. If the overlap rate is poor, the CNN model can be retrained and optimized using training images with different recognition results. This not only reduces the training time required for the CNN model but also allows for better training and optimization with fewer resources, resulting in a more accurate CNN model with fewer training iterations.
[0094] Furthermore, optimizing the convolutional neural network model based on the fine-tuned training set may include the following steps.
[0095] Data augmentation is performed on the fine-tuned training set.
[0096] In one embodiment, the fine-tuned training set can still be augmented using operations such as rotation, translation, shearing, and scaling to increase the amount of data in the fine-tuned training set. After data augmentation of the fine-tuned training set, the data in the training set can be normalized.
[0097] Load the convolutional neural network model and freeze all layers of the model, except for the last fully connected layer.
[0098] Based on the fine-tuned training and test sets, the convolutional neural network model is trained with a preset fine-tuning learning rate; wherein the fine-tuning learning rate is less than the initial learning rate of the convolutional neural network model.
[0099] Freezing all layers of the convolutional neural network model and only unfreezing the last fully connected layer can preserve most of the training results. Training optimization is performed only on the fully connected layer, and the fine-tuning learning rate is reduced. This allows the convolutional neural network model to learn to replace the training images in the set, thereby improving the accuracy of defect feature recognition of the convolutional neural network model.
[0100] Furthermore, after this optimization, a new prediction set can be prepared, and the above steps of using the prediction set and combining it with the edge detection algorithm to optimize the convolutional neural network model can be repeated until the overlap rate between the recognition results of the convolutional neural network model and the edge detection algorithm is greater than or equal to the preset value.
[0101] It can be seen that by using a new prediction set and combining it with an edge detection algorithm to further train and optimize the convolutional neural network model, a convolutional neural network model with higher accuracy in defect feature recognition can be obtained with fewer training iterations.
[0102] Please see Figure 5 The figure illustrates the implementation flow of the battery electrode defect feature identification method provided in the embodiments of this application.
[0103] like Figure 5 As shown, the method for identifying defect features of battery electrodes includes the following steps.
[0104] 201. Obtain the image of the battery electrode to be identified.
[0105] The battery electrode image to be identified can be, for example, Figure 2 The battery electrode image shown in Figure 2a includes the electrode portion and the background portion. This image can be a high-resolution battery electrode image with a resolution of 8192*8000, captured dynamically by a linear CCD scan, as the initial resolution.
[0106] 202. Preprocess the battery electrode image to be identified to obtain a preprocessed image that retains only the electrode portion.
[0107] First, the battery electrode image to be identified can be adjusted from the initial resolution to a preset first resolution. The first resolution is smaller than the initial resolution, that is, the resolution of the battery electrode image to be identified is reduced to reduce the computing resources consumed in subsequent processing and improve the efficiency of preprocessing.
[0108] Then, since the focus of electrode defect feature recognition is only on the electrode part, the background part may interfere with the defect feature extraction of the battery electrode defect feature recognition model. Therefore, it is necessary to remove the background part, crop the battery electrode image to be recognized, remove the background part, and thus obtain a battery electrode image that retains only the electrode part.
[0109] Specifically, cropping the battery electrode image to be identified includes: processing along the column direction of the battery electrode image to be identified to obtain the difference value and position value corresponding to each pixel value in each row. Determining the largest difference values among the difference values in each row as target difference values, and using the two position values with the largest difference among the position values corresponding to the target difference values as the first target position value and the second target position value, respectively. The average of the first target position values in each row is used as the first boundary between the electrode portion and the background portion, and the average of the second target position values in each row is used as the second boundary between the electrode portion and the background portion. The battery electrode image to be identified is then cropped based on the first and second boundaries.
[0110] Finally, the image of the battery electrode to be identified is adjusted to a preset second resolution to obtain the image to be identified. The second resolution is smaller than the first resolution.
[0111] By preprocessing the battery electrode images to be identified, such as reducing resolution, cropping, and unifying resolution, the computational resources and time consumed by the battery electrode defect feature recognition model can be reduced, and the accuracy of defect feature recognition can be improved. To avoid redundancy, this preprocessing action can refer to the implementation of resolution reduction, cropping, and unifying resolution in any of the above embodiments.
[0112] 203. Use the battery electrode defect feature recognition model to identify defect features in the image to be identified.
[0113] The battery electrode defect feature recognition model is trained using the battery electrode defect feature recognition model training method described in any of the above embodiments. The defect features may include cracks, bubbles, or other defect features, which are not limited in this application.
[0114] 204. Output the results obtained from defect feature identification.
[0115] The battery electrode defect feature recognition model can output the result of defect feature recognition after performing defect feature recognition on the image to be recognized. The result can be used to determine whether there are true defect features in the electrode part of the image to be recognized.
[0116] It can be seen that by training the battery electrode defect feature recognition model as described above, a battery electrode defect feature recognition model that can be applied to different types of electrode defect features and has a high accuracy in defect feature recognition can be obtained. Using this battery electrode defect feature recognition model to identify the defect features of the battery electrode image to be identified, compared with the defect feature recognition method using the traditional edge detection algorithm, the accuracy and reliability of electrode defect feature recognition in the battery production process are improved. At the same time, the acquisition cost of the battery electrode defect feature recognition model is lower than that of the traditional convolutional neural network model.
[0117] Please see Figure 6 The figure shows a schematic diagram of the structure of the electronic device provided in an embodiment of this application.
[0118] like Figure 6 As shown, the electronic device 10 includes a processor 11 and a memory 12, and the processor 11 and the memory 12 are electrically connected. The memory 12 is used to store executable instructions, which are used to instruct the processor 11 to execute the battery electrode defect feature recognition model training method as described in any of the above embodiments, or the battery electrode defect feature recognition method as described in any of the above embodiments.
[0119] The processor 11 may be a central processing unit (CPU), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The electronic device 10 may include one or more processors 11. When there are multiple processors 11, the processors 11 may be of the same type or different types of processors.
[0120] When the electronic device 10 is used to perform the battery electrode defect feature identification method, it may also include an image acquisition device such as an image sensor, and use the image acquired by the image acquisition device as a battery electrode image.
[0121] Memory 12 is used to store executable instructions. Memory 12 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0122] Specifically, the executable instructions can be called by the processor 11 to cause the electronic device 10 to execute the battery electrode defect feature recognition model training method or the battery electrode defect feature recognition method described in any of the above embodiments.
[0123] In the embodiments of this application, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0124] Furthermore, in the embodiments of this application, directional terms such as "upper," "lower," "left," and "right" are defined relative to the positions in which the components are schematically placed in the accompanying drawings. It should be understood that these directional terms are relative concepts, used for relative description and clarification, and can change accordingly depending on the position of the components in the accompanying drawings.
[0125] In the embodiments of this application, unless otherwise explicitly specified and limited, the term "connection" should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral part; it can be a direct connection or an indirect connection through an intermediate medium.
[0126] In the embodiments of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0127] In the embodiments of this application, the words "exemplary" or "for example" are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant information in a specific manner.
[0128] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this application may be practiced without these specific details. Similarly, for the purpose of streamlining this application and aiding in the understanding of one or more aspects of the invention, in the above description of exemplary embodiments of this application, various features of the embodiments of this application are sometimes grouped together in a single embodiment, figure, or description thereof.
[0129] The embodiment numbers in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments. The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent device or process transformations made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for training a battery electrode defect feature recognition model, characterized in that, The training method includes: Multiple battery electrode images are acquired, wherein a portion of the battery electrode images contains true defect features and another portion of the battery electrode images contains false defect features. The battery electrode image is preprocessed to obtain a preprocessed training image that retains only the electrode portion; Convolutional neural network model is constructed, and a portion of the training images are used as the training set and test set respectively for training the convolutional neural network model; By combining edge detection algorithms to optimize the trained convolutional neural network model, a battery electrode defect feature recognition model is obtained.
2. The battery electrode defect feature recognition model training method as described in claim 1, characterized in that, The optimization of the trained convolutional neural network model using the edge detection algorithm includes: Another portion of the training images is used as a prediction set and for optimizing the convolutional neural network model; The convolutional neural network model is used to identify defect features in the training images in the prediction set, and the first identification result is output. The training images in the prediction set are used to identify defect features using an edge detection algorithm, and a second identification result is output. The trained convolutional neural network model is optimized based on the overlap rate between the first and second recognition results.
3. The battery electrode defect feature recognition model training method as described in claim 2, characterized in that, The optimization of the trained convolutional neural network model based on the overlap rate between the first and second recognition results includes: Determine whether the overlap rate between the first identification result and the second identification result is less than a preset value; If so, the training images in the prediction set with inconsistent recognition results are obtained and used as the training images in the replacement set. Replace the training images in the replacement set with the training images in the training set to obtain the fine-tuned training set; The convolutional neural network model is optimized based on the fine-tuned training set until the overlap rate between the first recognition result and the second recognition result is greater than or equal to a preset value.
4. The battery electrode defect feature recognition model training method as described in claim 3, characterized in that, The optimization of the convolutional neural network model based on the fine-tuned training set includes: Load the convolutional neural network model and freeze all layers of the convolutional neural network model, except for the last fully connected layer; Based on the fine-tuned training set and the test set, the convolutional neural network model is trained with a preset fine-tuned learning rate; The fine-tuned learning rate is less than the initial learning rate of the convolutional neural network model.
5. The battery electrode defect feature recognition model training method as described in claim 1, characterized in that, The preprocessing of the battery electrode image includes cropping the battery electrode image, and the cropping of the battery electrode image includes: Processing is performed along the column direction of the battery electrode image to obtain the difference value and position value corresponding to each pixel value in each row; The larger difference values among the difference values in each row are determined as target difference values. The two position values with the largest difference among the position values corresponding to the target difference values are respectively used as the first target position value and the second target position value. The average value of the first target position in each row is used as the first boundary between the electrode area and the background area, and the average value of the second target position in each row is used as the second boundary between the electrode area and the background area. The battery electrode image is cropped based on the first boundary and the second boundary.
6. The battery electrode defect feature recognition model training method as described in claim 5, characterized in that, The preprocessing of the battery electrode image further includes: Before cropping the battery electrode image, the battery electrode image is adjusted from its initial resolution to a preset first resolution; After cropping the battery electrode image, the battery electrode image is adjusted to a preset second resolution to obtain a training image; Wherein, the first resolution is smaller than the initial resolution, and the second resolution is smaller than the first resolution.
7. A method for identifying defect features of battery electrode sheets, characterized in that, include: Acquire images of the battery electrodes to be identified; The battery electrode image to be identified is preprocessed to obtain a preprocessed image that retains only the electrode portion; The defect features of the image to be identified are identified using a battery electrode defect feature recognition model. The results obtained from the defect feature identification are output; The battery electrode defect feature recognition model is obtained by training the battery electrode defect feature recognition model as described in any one of claims 1-6.
8. The battery electrode defect feature identification method as described in claim 7, characterized in that, The preprocessing of the battery electrode image to be identified includes cropping the battery electrode image to be identified, which includes: Process along the column direction of the battery electrode image to be identified to obtain the difference value and position value corresponding to each pixel value in each row; The larger difference values among the difference values in each row are determined as target difference values. The two position values with the largest difference among the position values corresponding to the target difference values are respectively used as the first target position value and the second target position value. The average value of the first target position in each row is used as the first boundary between the electrode area and the background area, and the average value of the second target position in each row is used as the second boundary between the electrode area and the background area. The battery electrode image to be identified is cropped based on the first boundary and the second boundary.
9. The battery electrode defect feature identification method as described in claim 8, characterized in that, The preprocessing of the battery electrode image to be identified further includes: Before cropping the battery electrode image to be identified, the battery electrode image to be identified is adjusted from the initial resolution to a preset first resolution; After cropping the battery electrode image to be identified, the battery electrode image to be identified is adjusted to a preset second resolution to obtain the image to be identified; Wherein, the first resolution is smaller than the initial resolution, and the second resolution is smaller than the first resolution.
10. An electronic device, characterized in that, It includes a processor and a memory, wherein the processor and the memory are electrically connected; The memory is used to store executable instructions, which are used to instruct the processor to execute the battery electrode defect feature recognition model training method as described in any one of claims 1-6, or the battery electrode defect feature recognition method as described in any one of claims 7-9.