Battery pole defect detection method, computing device and storage medium
By constructing a target detection network based on a deformable downsampling convolution module, a context enhancement module, and an attention mechanism, and combining it with a linear contrast enhancement method, the problems of insufficient detection accuracy and low efficiency in lithium battery pole defect detection are solved, and high-precision and high-efficiency defect detection effects are achieved.
Patent Information
- Application Number
- CN202311035888.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-17
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2043-08-17
AI Technical Summary
Existing deep learning methods have problems such as insufficient detection accuracy, low efficiency, and lack of specificity in lithium battery electrode defect detection, especially for the detection of small targets and targets with large aspect ratios.
A target detection network based on a deformable downsampling convolution module, a context enhancement module, and an attention mechanism is used, combined with a linear contrast enhancement method, to construct a battery pole defect detection method. The detection accuracy and efficiency are improved through training and detection networks.
It improves the detection accuracy and efficiency of small targets and targets with large aspect ratios, meets the needs of industrial applications, and achieves high-precision and high-efficiency defect detection.
Smart Images

Figure CN117058105B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of target detection technology, and in particular to a battery pole piece defect detection method, computing device and storage medium. Background Art
[0002] With the rapid development of the new energy industry, more and more industries are replacing traditional fossil fuels with electricity as their energy source. As a way to store electricity, battery technology is also constantly evolving. Currently, lithium batteries have become the most widely researched and applied battery. The importance of pole pieces, as electrodes in lithium batteries, is self-evident. If the produced pole pieces have defects, on the one hand, it will reduce the battery's charging and discharging performance, and on the other hand, it will pose a major safety hazard. In serious cases, it may cause the battery separator to be punctured, short-circuiting the positive and negative electrodes, and then causing the battery to burn or even explode. Therefore, it is particularly important to ensure that the produced lithium batteries and pole pieces are of good quality and to detect defective products before leaving the factory.
[0003] Since the 20th century, people have gradually begun to conduct in-depth research on flaws and defects. In actual industrial inspection processes, the objects being inspected have varying degrees of differences in size, background, color, and texture characteristics, which poses significant challenges to defect detection. The development of surface defect detection methods can be roughly divided into three stages: manual visual inspection, optical sensor inspection, and machine vision inspection. Traditional manual inspection and optical sensor inspection methods have been gradually replaced by machine vision due to their low accuracy and efficiency. Machine vision technology, with its high precision, high efficiency, high safety, and non-destructive testing characteristics, plays a vital role in defect detection.
[0004] Machine vision technology has also been widely used in the lithium battery pole piece defect detection industry. Currently, machine vision inspection methods can be divided into two categories: traditional methods and deep learning methods. Traditional methods require complex, highly targeted algorithm design, and research in this area has gradually decreased in recent years. Deep learning methods, on the other hand, can transform data into complex abstract representations, enabling the system to learn features. This capability overcomes the complex feature requirements for specific defects and has become a hot topic in the field of lithium battery pole piece surface defect detection.
[0005] But overall, the application of deep learning methods in lithium battery defect detection is just beginning. Many solutions that use deep learning methods to detect electrode surface defects still have problems such as insufficient detection accuracy, low detection efficiency, and lack of targeted detection of electrode defect characteristics for defects with characteristics such as small targets and large aspect ratio targets. Summary of the Invention
[0006] The present application provides a battery pole piece defect detection method, computing device and storage medium, which can achieve high-precision, high-efficiency and targeted detection of defects with characteristics such as small targets and large aspect ratio targets.
[0007] To achieve the above objectives, in a first aspect, the present application provides a method for detecting defects in battery pole pieces, the method comprising:
[0008] S1. Acquire a battery pole piece surface defect dataset, wherein the battery pole piece defect dataset includes a plurality of battery pole piece surface defect images;
[0009] S2. Constructing a target detection network, which includes: a backbone network constructed based on a deformable downsampling convolution module, a feature fusion network constructed based on a context enhancement module and a downsampling convolution block, and a detection head based on an attention mechanism;
[0010] S3. Training the target detection network based on the battery electrode surface defect dataset;
[0011] S4. Detect the surface defect image of the battery electrode to be detected by the trained target detection network to obtain at least one of the position, size and category of the defect.
[0012] In one possible implementation, step S2 includes:
[0013] S21, using a deformable downsampling convolution module as a feature extractor of the backbone network of the object detection network, wherein the downsampling multiple of the backbone network is a preset multiple, and the preset multiple is used to increase the receptive field of the backbone network so that the backbone network extracts features of global information of the image, wherein the deformable downsampling convolution module includes a series module, multiple convolution modules and a deformable downsampling module;
[0014] S22, adding the context enhancement module and the downsampling convolution block to the outgoing branch of the feature fusion network in the object detection network;
[0015] S23. A decoupling head integrating an attention mechanism is added to the detection head of the target detection network. The decoupling head is used to decouple and respectively perform classification tasks and regression tasks for the surface defects of the battery electrode. The classification task is to detect the type of the defect, and the regression task is to detect the position coordinates of the defect and / or the confidence level of the defect.
[0016] In one possible implementation, step S3 includes:
[0017] S31, adaptively scaling the battery pole piece surface defect image in the battery pole piece surface defect dataset according to a preset pixel ratio;
[0018] S32, inputting the scaled battery electrode surface defect image into the target detection network for training, and generating an anchor frame of the battery electrode surface defect image using a K-means clustering method;
[0019] S33. Classify the anchor frames of the battery electrode surface defect images, and according to the confidence of the classification results, use a stochastic gradient descent optimizer to iteratively update the model parameters of the target detection network according to a preset training batch, a preset number of training iterations, a preset learning rate, a preset momentum coefficient, and a preset weight attenuation coefficient.
[0020] In one possible implementation, step S4 includes:
[0021] S41. According to a plurality of defect types, non-maximum suppression parameters corresponding to different types of defects in the trained target detection network are set, wherein the non-maximum suppression parameters determine the detection accuracy of the corresponding types of defects;
[0022] S42. Based on the trained target detection network, detect at least one of the position, size and category of the surface defects of the battery electrode.
[0023] In one possible implementation, step S1 includes:
[0024] S11. Capturing a battery electrode surface defect image that meets a target resolution using a line scan camera and / or an area scan camera;
[0025] S12, pre-processing the collected battery electrode surface defect image;
[0026] S13. Determine the battery pole piece surface defect dataset based on the preprocessed battery pole piece surface defect image.
[0027] In one possible implementation, step S12 includes:
[0028] Identifying and cropping the edge of the electrode area in the battery electrode surface defect image;
[0029] A linear contrast enhancement method is used to improve the contrast between the area where the defect is located and other areas in the pole piece area.
[0030] In one possible implementation, step S13 includes:
[0031] The positions and types of defects in the preprocessed battery pole piece surface defect image are marked to obtain a battery pole piece surface defect dataset, and the battery pole piece surface defect dataset is divided into a training set, a validation set, and a test set according to a preset ratio.
[0032] In a second aspect, a computing device is provided, which includes a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the battery electrode defect detection method provided in the first aspect.
[0033] In a third aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one program, and the at least one program is executed by a processor to implement the battery electrode defect detection method provided in the first aspect.
[0034] The technical solution provided by this application includes at least the following technical effects:
[0035] In the target detection network provided in this application, the deformable downsampling convolution module can specifically improve the detection capability of target defects with large aspect ratios, the context enhancement module and the deformable convolution module can specifically improve the detection capability of small target defects, and the attention mechanism can improve the detection accuracy. Therefore, the detection accuracy and efficiency of battery electrode surface defects are comprehensively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a schematic diagram of a process for battery pole piece defect detection based on deformable convolution provided by the present application according to an exemplary embodiment;
[0037] Figure 2 This is a schematic diagram of a process for detecting battery pole piece defects according to an exemplary embodiment of the present application;
[0038] Figure 3 is a schematic structural diagram of a target detection network provided by the present application according to an exemplary embodiment;
[0039] Figure 4 is a structural diagram of a deformable downsampling convolution module provided by the present application according to an exemplary embodiment;
[0040] Figure 5 is a schematic structural diagram of a downsampling convolution block provided by the present application according to an exemplary embodiment;
[0041] Figure 6 is a structural diagram of a context enhancement module provided by the present application according to an exemplary embodiment;
[0042] Figure 7 This is a structural diagram of a decoupling head provided by the present application according to an exemplary embodiment;
[0043] Figure 8 It is a hardware structure diagram of a computing device provided by the present application according to an exemplary embodiment. DETAILED DESCRIPTION
[0044] To further illustrate each embodiment, the present application provides drawings. These drawings are part of the disclosure of the present application, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, a person of ordinary skill in the art should be able to understand other possible implementations and the advantages of the present application. The components in the figures are not drawn to scale, and similar component symbols are generally used to represent similar components. The term "at least one" in the present application means one or more, and the term "multiple" in the present application means two or more, for example, multiple defects means two or more defects.
[0045] The present application will now be further described with reference to the accompanying drawings and specific implementation methods.
[0046] This application aims to propose a method for detecting surface defects of battery pole pieces, which can improve the detection effect of small targets and large aspect ratio target defects while ensuring detection efficiency and meeting the application requirements of actual industrial scenarios, thereby comprehensively improving the overall detection effect of battery pole piece surface defects.
[0047] The battery electrode defect detection method provided in this application can be performed by a computing device. The computing device can be a terminal device such as a desktop computer, a notebook or a handheld computer, or a server, a server cluster composed of multiple physical servers, or a distributed file system, or a cloud server cluster that provides cloud storage and cloud services, cloud databases, cloud computing, cloud functions, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), big data and artificial intelligence platforms, and other basic cloud computing services, which are not limited in this application.
[0048] The following is a detailed introduction to the battery electrode defect detection method provided in this application.
[0049] Example 1
[0050] Figure 1 A flow chart of a battery electrode defect detection method provided in an embodiment of the present application, referring to Figure 1 The method includes the following steps S1 to S4.
[0051] S1. Obtain a battery electrode surface defect dataset, where the battery electrode surface defect dataset includes multiple battery electrode surface defect images.
[0052] In one possible implementation, the battery electrode surface defect dataset can be obtained by pre-processing, labeling, and then segmenting the battery electrode surface defect images captured by the camera. In this example, step S1 specifically includes the following steps S11 to S13.
[0053] S11. Using a line scan camera and / or an area scan camera, an image of the surface defects of the battery electrode that meets the target resolution is acquired.
[0054] In the embodiment of the present application, the battery electrode refers to a lithium battery electrode.
[0055] In one possible implementation, an industrial line scan camera and / or area scan camera that meets the requirements of actual industrial scenarios is used to capture images of surface defects on battery electrodes. The target resolution can be pre-set based on the image quality requirements.
[0056] Considering that the surface conditions of lithium battery electrodes are relatively complex and prone to subtle defects that are difficult for the human eye to detect, industrial line scan cameras or area scan cameras can capture images with high quality and obtain high-resolution defect images for model training.
[0057] S12. Preprocessing the collected battery electrode surface defect images.
[0058] In the embodiment of the present application, the pretreatment includes the following steps a and b.
[0059] Step a: Identify and crop the edges of the electrode area in the battery electrode surface defect image.
[0060] In one possible implementation, by performing edge recognition and cropping on a battery pole piece surface defect image that meets the target resolution, the non-detection area outside the pole piece can be removed, so that the original image information can be retained as much as possible during the compression process before the image enters the network for processing.
[0061] Considering that in the collected lithium battery electrode surface defect images, in addition to the electrode area that needs to be inspected, there is also a non-inspection area, by identifying and cropping the edges of the electrode, the image can be compressed before entering the network, reducing the loss of pixel information, ensuring the full utilization of detection resources, and improving the efficiency of model learning.
[0062] Step b: using a linear contrast enhancement method to improve the contrast between the area where the defect is located and other areas in the electrode area.
[0063] In one possible implementation, the process of performing image enhancement using a linear contrast enhancement method in step b specifically includes:
[0064] The image is binarized with pixel θ as the threshold to divide the polar region and non-polar region. N values are uniformly selected in the vertical direction of the image, and the first non-zero pixel w is detected in the horizontal direction of n values. fi and the last non-zero pixel w li, calculate the average value by formula (1) and (2) respectively and round it (round function is used for rounding), as the two edge values W in the horizontal direction f and W l Crop the image, where n is a positive integer.
[0065]
[0066]
[0067] According to the pixel value distribution of the image after edge cropping, the contrast linear enhancement method is used to expand the pixel value to the range of [0, 255] using formula (3).
[0068]
[0069] Among them, x i is the pixel value of a point in the original image, f(x i ) is the pixel value of the point after enhancement. The original image pixel distribution range is [a, b], and the enhanced pixel value distribution range is [c, d].
[0070] S13. Determine a battery pole piece surface defect dataset based on the preprocessed battery pole piece surface defect image.
[0071] In one possible implementation, the locations and types of defects in the preprocessed battery pole piece surface defect image are first marked to obtain a battery pole piece surface defect dataset; then, the battery pole piece surface defect dataset is divided into a training set, a validation set, and a test set according to a preset ratio.
[0072] For example, you can use Labelme software to label the location and type of defects and output a JSON file. Then, use code to convert the labeling information into a txt file corresponding to the image. The dataset can be divided into training, validation, and test sets using a 6:2:2 ratio.
[0073] Through the above steps S11-S13, the process of collecting, preprocessing, labeling and dividing the data set in the embodiment of the present application is introduced. On this basis, the present application provides a flowchart of a battery electrode defect detection method according to an exemplary embodiment, with reference to Figure 2 , the method comprises the following steps A to F:
[0074] Step A: Use an industrial camera to capture images of surface defects on lithium battery electrodes;
[0075] Step B: pre-processing the collected defect images;
[0076] Step C: Preparation and division of lithium battery electrode surface defect dataset;
[0077] Step D: Construct a deformable downsampling convolution target detection network (Deformable Downsampling Convolution Network-YOLO, DDCNet-YOLO);
[0078] Step E: Train the DDCNet-YOLO model.
[0079] Step F: Detect the location, size, and corresponding category of surface defects on the lithium battery electrode using the trained model.
[0080] Among them, the Deformable Downsampling Convolution Network-YOLO (DDCNet-YOLO) is the target detection network constructed, trained and used in the technical solution of this application. It is a target detection network combined with a deformable downsampling convolution module. Its architecture will be described in detail in the subsequent content and will not be repeated here.
[0081] S2. Build a target detection network. The target detection network includes: a backbone network based on the deformable downsampling convolution module (DDCM), a feature fusion network based on the context enhancement module and the downsampling convolution block (DCB), and a detection head based on the attention mechanism.
[0082] Among them, the target detection network is a target detection network built based on the idea of deformable downsampling convolution, and the deformable downsampling convolution module DDCM used in the backbone network is built based on the downsampling convolution block DCB.
[0083] The present application embodiment provides a schematic diagram of the structure of a target detection network, such as Figure 3 As shown in the figure, it includes three parts: backbone network (Backbone), feature fusion network (Neck) and detection head (Head).
[0084] Among them, the convolution (Conv) module is a basic module, which includes three operations: convolution, normalization and activation function; Upsample is an upsampling module, the Concat structure is used to implement channel splicing, and the spatial pyramid pooling (SPPF) structure serially passes the input through three 5x5 size maximum pooling (MaxPool) layers and performs splicing and fusion. The H and W in the figure represent the pixel height and pixel width of the image respectively. Next, combine Figure 2 And steps S21-S23 introduce the process of constructing the target detection network in this application.
[0085] S21. Use the deformable downsampling convolution module as a feature extractor of the backbone network of the target detection network. The downsampling multiple of the backbone network is a preset multiple, which is used to increase the receptive field of the backbone network so that the backbone network can extract features of the global information of the image. The deformable downsampling convolution module includes a series module, multiple convolution modules and a deformable downsampling module.
[0086] In an embodiment of the present application, in the Backbone part, in order to improve the detection effect of defect targets with large aspect ratios, a deformable downsampling convolution module DDCM is designed, and a backbone network DDCNet is constructed based on this module; wherein, the preset multiple can be 64 times, and the target detection network based on 64 times downsampling can effectively increase the receptive field and improve the target detection network's learning ability for global information.
[0087] According to an exemplary embodiment, the present application provides a structural diagram of a deformable downsampling convolution module DDCM, as shown in FIG. Figure 4 As shown, the input is first downsampled through a 3x3 convolution module, reducing the feature map size to half, expanding the receptive field of the feature map and capturing a wider range of information. 1x1 convolutions are then used to increase network depth, achieving dimensionality increase and enabling information exchange between channels. This also reduces the number of parameters compared to using 3x3 convolutions alone to increase network depth. The number of channels is then adjusted using n downsampling convolution blocks (DCBs) and one 1x1 convolution module, and the same channels are concatenated between the two to double the number of channels. Finally, a 1x1 convolution is used to reduce the number of channels to the preset value.
[0088] According to an exemplary embodiment, the present application provides a structural diagram of a downsampling convolution block DCB, as shown in FIG. Figure 5 As shown in the figure, the input first passes through a 1x1 convolution and then splits into two branches. One branch passes through two 1x1 convolutions and a DCNv3 module in sequence before being added and fused with the other branch. DCB is based on the idea of deformable convolution and mainly performs feature extraction on target defects with large aspect ratios. Deformable convolution learns each sampling position and adds an offset to change the shape of the convolution kernel and expand the range of the convolution. The calculation formula of the deformable convolution module of DCNv3 is shown in (4).
[0089]
[0090] Among them, G represents the number of groups, K represents the number of sampling points, and w g The projection weight is shared within each group, m gk represents the normalized modulation factor of the kth sampling point in the gth group, p0 corresponds to the center point of the convolution kernel, and pk is each offset of p0 within the range of the conventional convolution kernel, △p gk Indicates the offset of the corresponding sampling points in each group.
[0091] S22. In the target detection network, the feature fusion network is branched out, and a context enhancement module and a downsampling convolution block are added.
[0092] Considering that there are small target defects such as dark spots, depressions, and white spots in the defect detection of the electrode, these small targets will lose certain feature information as the network deepens and the receptive field increases. In order to better preserve the original features of the small targets, this application introduces a branch after the second DDCM module in the backbone network (reference Figure 3 ), add the context enhancement module CAM which has good effect on small targets, and merge it with deep features.
[0093] Among them, the context enhancement module CAM is based on the idea of dilated convolution. Without losing information through pooling, it exponentially increases the receptive field, and then fuses convolutions with different dilation rates to enrich context information and improve the detection effect of small targets. This application provides a structural diagram of the context enhancement module CAM according to an exemplary embodiment, as shown in the figure. Figure 6 As shown in the figure, dilated convolution and fusion methods are shown. First, the input feature map is convolved with a kernel size of 3×3 and dilation rates of 1, 3, and 5. Then, fusion is performed. There are three fusion methods to choose from: weighted fusion, adaptive fusion, and concatenation fusion. The effects of the three fusion methods vary depending on the dataset.
[0094] In the embodiment of the present application, while adding the context enhancement module, the DCB module is added again to the Neck part of the feature fusion network to further enhance the detection of large aspect ratio defects and perform multi-scale fusion.
[0095] S23. Add a decoupling head (Attention Decoupled Head, AD-Head) that integrates the attention mechanism to the detection head of the target detection network. The decoupling head is used to decouple and respectively perform classification tasks and regression tasks for surface defects of battery electrodes. The classification task is to detect the type of defects, and the regression task is to detect the location coordinates of the defects and / or the confidence of the defects.
[0096] In an embodiment of the present application, a decoupling head that integrates an attention mechanism is used to improve the attention of the target detection network to key areas and feature channels.
[0097] According to an exemplary embodiment, the present application provides a structural diagram of a decoupling head AD-Head, as shown in FIG. Figure 7 As shown in the figure, the input feature map first passes through the attention mechanism module to improve the model's focus on key areas and feature channels. It is then followed by a 1x1 convolution module to adjust the number of channels. The model then enters two branches, one for classification and the other for regression. The classification task (Cls) predicts the category through a 3x3 convolution and a 1x1 convolution. The regression task is decoupled into the position coordinate regression task (Reg) and the confidence regression task (Obj) after two 3x3 convolutions. The position coordinates and confidence are then regressed through a 1x1 convolution respectively.
[0098] In computer vision, attention mechanisms can be categorized into three types: channel-domain, spatial-domain, and mixed-domain. The principle is to assign different weights to different channels or regions in space, rather than treating all locations or channels in space as having the same weight as in traditional convolution or pooling operations. The introduction of attention mechanisms allows the network to focus on extracting more important information.
[0099] Deep learning networks in related technologies perform only a single 1x1 convolution in the detection head, coupling the classification and regression tasks into a common output structure. However, these two tasks focus on different aspects: classification focuses more on the category of the extracted features, while regression focuses more on correcting the position coordinates and bounding box parameters. If these two tasks are output together, it may affect the detection effect. Therefore, by decoupling the classification and regression tasks, the network can make predictions for different types of tasks separately, which helps improve detection results.
[0100] S3. Train the target detection network based on the battery electrode surface defect dataset.
[0101] In the embodiment of the present application, the process of training the target detection network reports the following steps S31 to S33.
[0102] S31 . Adaptively scaling the battery pole piece surface defect image in the battery pole piece surface defect dataset according to a preset pixel ratio.
[0103] For example, the images in the training set are adaptively scaled to 1280 pixels * 1280 pixels * 3 dimensions (channels) to meet the input image size of the target detection network, reduce the information loss of image compression, and retain the original features of small targets as much as possible to improve the network detection accuracy.
[0104] S32, inputting the scaled battery electrode surface defect image into the target detection network for training, and using the K-means clustering method to generate an anchor frame of the battery electrode surface defect image;
[0105] Specifically, the K-Means method is used to cluster the labeled data in the dataset and generate anchor boxes.
[0106] S33. Classify the anchor frames of the battery electrode surface defect images, and according to the confidence of the classification results, use the Stochastic Gradient Descent (SGD) optimizer to iteratively update the model parameters of the target detection network according to the preset training batch, the preset number of training iterations, the preset learning rate, the preset momentum coefficient and the preset weight decay coefficient.
[0107] For example, the training batch size is set to 4, the number of training iterations is set to 500 epochs (an epoch is defined as a single training iteration of all batches in forward and backward propagation), the learning rate is 0.01, the momentum is 0.937, and the weight decay coefficient is 0.0005. After the parameters are set, training can begin.
[0108] S4. Detect the surface defect image of the battery electrode to be detected through the trained target detection network to obtain at least one of the position, size and category of the defect.
[0109] The process of using the trained target detection network to perform defect detection in this application specifically includes the following steps S41 and S42:
[0110] S41. Based on the various defect types, non-maximum suppression (NMS) parameters corresponding to different types of defects in the trained object detection network are set. The NMS parameters determine the detection accuracy of the corresponding defect type. Specifically, the NMS parameters include a confidence threshold and an overlap (IOU) threshold.
[0111] In the embodiment of the present application, non-maximum suppression parameters used for different defects in the target detection network are set according to different defect types to meet the stringent requirements for different defects.
[0112] In real-world industrial scenarios, the detection requirements for different defects generally vary. Some defects have a critical impact on product quality and require stringent detection standards. Conversely, some defects have less significant impact and can require more relaxed detection requirements. Therefore, this method can tailor the non-maximum suppression parameters used in the target detection network to meet the detection requirements, thereby fine-tuning the stringency requirements for different defects.
[0113] S42. Based on the trained target detection network, detect at least one of the position, size and category of the surface defects of the battery electrode.
[0114] In the target detection network provided by this application, the deformable downsampling convolution module can specifically improve the detection capability of large aspect ratio target defects, the context enhancement module and the deformable convolution module can specifically improve the detection capability of small target defects, and the attention mechanism can improve the detection accuracy. Therefore, the defect detection accuracy and detection efficiency are comprehensively improved.
[0115] Furthermore, by preprocessing the collected battery electrode surface defect images, it is possible to enhance the key information in the images, reduce the pixel information loss caused by image compression, ensure the full utilization of detection resources, and improve the efficiency of model learning;
[0116] Moreover, according to the detection requirements, the non-maximum suppression parameters used for different defects in the target detection network can be set to finely implement the detection stringency requirements for different defects.
[0117] The present application provides a battery pole piece defect detection method that can be executed by a computing device. Figure 8 This is a schematic diagram of the hardware structure of a computing device provided in an embodiment of the present application. Figure 8 As shown, the computing device includes a processor 801, a memory 802, a bus 803, and a computer program stored in the memory 802 and executable on the processor 801. The processor 801 includes one or more processing cores. The memory 802 is connected to the processor 801 via the bus 803. The memory 802 is used to store program instructions. When the processor executes the computer program, all or part of the steps in the above-mentioned method embodiment provided in this application are implemented.
[0118] Furthermore, as an executable solution, the computing device may be a computer unit, which may be a computing device such as a desktop computer, a laptop, a PDA, or a cloud server. The computer unit may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the above-described computer unit structure is merely an example of a computer unit and does not constitute a limitation of the computer unit. The computer unit may include more or fewer components than those described above, or a combination of certain components, or different components. For example, the computer unit may also include input and output devices, network access devices, a bus, etc., which are not limited in the present embodiment.
[0119] Furthermore, as an executable solution, the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the computer unit and connects the various parts of the entire computer unit using various interfaces and lines.
[0120] The memory can be used to store the computer programs and / or modules, and the processor implements the various functions of the computer unit by running or executing the computer programs and / or modules stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created based on the use of the mobile phone, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0121] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above method in the embodiment of the present application are implemented.
[0122] If the module / unit integrated in the computer unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory) and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0123] Although the present application has been specifically shown and described in conjunction with preferred embodiments, it should be understood by those skilled in the art that various changes in form and details may be made to the present application without departing from the spirit and scope of the present application as defined by the appended claims, and all such changes are within the scope of protection of the present application.
Claims
1. A battery electrode defect detection method, characterized in that: The method comprises: S1. Acquire a battery electrode surface defect dataset, wherein the battery electrode surface defect dataset includes a plurality of battery electrode surface defect images; S2. Constructing a target detection network, which includes: a backbone network constructed based on a deformable downsampling convolution module, a feature fusion network constructed based on a context enhancement module and a downsampling convolution block, and a detection head based on an attention mechanism; S3. Training the target detection network based on the battery electrode surface defect dataset; S4. Detecting the surface defect image of the battery electrode to be detected using the trained target detection network to obtain at least one of the position, size, and category of the defect; Wherein, the step S2 includes: S21, using a deformable downsampling convolution module as a feature extractor of the backbone network of the object detection network, wherein the downsampling multiple of the backbone network is a preset multiple, and the preset multiple is used to increase the receptive field of the backbone network so that the backbone network extracts features of global information of the image, wherein the deformable downsampling convolution module includes a series module, multiple convolution modules and a deformable downsampling module; S22, adding the context enhancement module and the downsampling convolution block to the outgoing branch of the feature fusion network in the object detection network; S23. A decoupling head integrating an attention mechanism is added to the detection head of the target detection network. The decoupling head is used to decouple and respectively perform classification tasks and regression tasks for the surface defects of the battery electrode. The classification task is to detect the type of the defect, and the regression task is to detect the position coordinates of the defect and / or the confidence level of the defect.
2. The battery electrode defect detection method according to claim 1, characterized in that: The step S3 comprises: S31, adaptively scaling the battery pole piece surface defect image in the battery pole piece surface defect dataset according to a preset pixel ratio; S32, inputting the scaled battery electrode surface defect image into the target detection network for training, and generating an anchor frame of the battery electrode surface defect image using a K-means clustering method; S33. Classify the anchor frames of the battery electrode surface defect images, and according to the confidence of the classification results, use a stochastic gradient descent optimizer to iteratively update the model parameters of the target detection network according to a preset training batch, a preset number of training iterations, a preset learning rate, a preset momentum coefficient, and a preset weight attenuation coefficient.
3. The battery electrode defect detection method according to claim 1, characterized in that: The step S4 comprises: S41. According to a plurality of defect types, non-maximum suppression parameters corresponding to different types of defects in the trained target detection network are set, wherein the non-maximum suppression parameters determine the detection accuracy of the corresponding types of defects; S42. Based on the trained target detection network, detect at least one of the position, size and category of the surface defects of the battery electrode.
4. The battery electrode defect detection method according to claim 1, wherein step S1 comprises: S11. Capturing a battery electrode surface defect image that meets a target resolution using a line scan camera and / or an area scan camera; S12, pre-processing the collected battery electrode surface defect image; S13. Determine the battery pole piece surface defect dataset based on the preprocessed battery pole piece surface defect image.
5. The battery electrode defect detection method according to claim 4, characterized in that: The step S12 includes: Identifying and cropping the edge of the electrode area in the battery electrode surface defect image; A linear contrast enhancement method is used to improve the contrast between the area where the defect is located and other areas in the pole piece area.
6. The battery electrode defect detection method according to claim 4, characterized in that: The step S13 includes: The positions and types of defects in the preprocessed battery pole piece surface defect image are marked to obtain a battery pole piece surface defect dataset, and the battery pole piece surface defect dataset is divided into a training set, a validation set, and a test set according to a preset ratio.
7. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores at least one program, and the at least one program is executed by the processor to implement the battery pole piece defect detection method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that The storage medium stores at least one program, and the at least one program is executed by a processor to implement the battery pole piece defect detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Hyperspectral image classification method based on spectral space attention fusion and deformable convolutional residual network
CN113361485A
Strip steel surface defect detection method based on improved retinanet algorithm
CN115760734A
