CN116129221A - Lithium battery defect detection method, system and storage medium - Google Patents

Lithium battery defect detection method, system and storage medium Download PDF

Info

Publication number
CN116129221A
CN116129221A CN202310084363.7A CN202310084363A CN116129221A CN 116129221 A CN116129221 A CN 116129221A CN 202310084363 A CN202310084363 A CN 202310084363A CN 116129221 A CN116129221 A CN 116129221A
Authority
CN
China
Prior art keywords
defect
lithium battery
feature
pixel
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310084363.7A
Other languages
Chinese (zh)
Other versions
CN116129221B (en
Inventor
洪智勇
冯英伟
梁冠杰
肖华润
张文康
甄德鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuyi University
Original Assignee
Wuyi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuyi University filed Critical Wuyi University
Priority to CN202310084363.7A priority Critical patent/CN116129221B/en
Publication of CN116129221A publication Critical patent/CN116129221A/en
Application granted granted Critical
Publication of CN116129221B publication Critical patent/CN116129221B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/7715Feature extraction, e.g. by transforming the feature space, e.g. multi-dimensional scaling [MDS]; Mappings, e.g. subspace methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Abstract

The application discloses a lithium battery defect detection method, a system and a storage medium, and relates to the technical field of defect detection, wherein the method comprises the following steps: acquiring a lithium battery appearance defect data set; inputting the lithium battery appearance defect data set into an object feature extraction model for feature extraction to obtain a first pixel level defect semantic feature set; purifying the first pixel level defect semantic feature set to obtain a second pixel level defect semantic feature set; classifying the second defect semantic features to construct a lithium battery appearance defect semantic feature library; extracting first defect characteristics from a semantic feature library of the appearance defects of the lithium battery, and carrying out data enhancement on a data set of the appearance defects of the lithium battery through the first defect characteristics to obtain a lithium battery defect detection model; and performing defect detection on the image to be detected of the lithium battery through the lithium battery defect detection model to obtain a defect detection result. By the method, the reliability, the robustness and the detection precision of the defect detection network are improved.

Description

Lithium battery defect detection method, system and storage medium
Technical Field
The present disclosure relates to the field of defect detection technologies, and in particular, to a method and a system for detecting defects of a lithium battery, and a storage medium.
Background
At present, the production process of lithium batteries is fully automated, each process point is phased out or manual intervention is reduced, and the detection mode of appearance defects of the lithium batteries based on deep learning in the related technology can lead a defect detection network to enter good convergence due to the small occupation ratio of defect samples in the normal production process and the detection mode based on deep learning needs a large number of defect samples; meanwhile, defect samples in actual production are unevenly distributed, the number of samples of different defect types is different, and the gap is huge, so that a detection network has obvious tendency, the probability that the defect types with more samples are detected is larger than the types with less samples, and the detection mode based on deep learning has more misjudgment conditions and lower detection precision.
Disclosure of Invention
The present application aims to solve at least one of the technical problems existing in the prior art. Therefore, the application provides a lithium battery defect detection method, a system and a storage medium, which improve the reliability, robustness and detection precision of a defect detection network.
In a first aspect, an embodiment of the present application provides a method for detecting a defect of a lithium battery, where the method includes:
acquiring a lithium battery appearance defect data set and an image to be detected of the lithium battery;
inputting the lithium battery appearance defect data set into an object feature extraction model for feature extraction to obtain a first pixel level defect semantic feature set;
purifying the first pixel level defect semantic feature set to obtain a second pixel level defect semantic feature set;
classifying the second defect semantic features to construct a lithium battery appearance defect semantic feature library;
extracting first defect characteristics from the semantic feature library of the appearance defects of the lithium battery, and carrying out data enhancement on the appearance defect data set of the lithium battery through the first defect characteristics to obtain first defect sample data;
training an initial lithium battery defect detection model according to the first defect sample data and the lithium battery appearance defect data set to obtain a lithium battery defect detection model;
and performing defect detection on the image to be detected of the lithium battery through the lithium battery defect detection model to obtain a defect detection result.
According to one or more technical schemes provided by the embodiment of the application, the method has the advantages that after the appearance defect data set of the lithium battery is constructed, the appearance defect data set of the lithium battery is subjected to feature extraction through an object feature extraction model, and a first pixel-level defect semantic feature set is obtained; purifying the first pixel level defect semantic feature set to obtain a second pixel level defect semantic feature set; classifying the second defect semantic features to construct a lithium battery appearance defect semantic feature library; extracting first defect characteristics from a semantic feature library of the appearance defects of the lithium battery, and carrying out data enhancement on a data set of the appearance defects of the lithium battery through the first defect characteristics to obtain first defect sample data; training an initial lithium battery defect detection model according to the first defect sample data and the lithium battery appearance defect data set to obtain a lithium battery defect detection model; and performing defect detection on the image to be detected of the lithium battery through the lithium battery defect detection model to obtain a defect detection result. Compared with the related art, the appearance detection mode of carrying out data enhancement on the lithium battery appearance defect dataset through the pixel-level features describes the lithium battery appearance defect from the pixel-level, so that the enhanced first defect sample data can describe defects of any shape and texture, and the problems of insufficient defect samples and uneven category distribution can be effectively solved, and therefore, the reliability, the robustness and the detection precision of a defect detection network can be improved by carrying out appearance detection on the lithium battery defect detection model obtained based on the first defect sample data and the lithium battery appearance defect dataset training.
According to some embodiments of the first aspect of the present application, the acquiring the lithium battery appearance defect dataset includes:
obtaining an appearance defect image of a lithium battery;
marking the appearance defect image of the lithium battery with defect types, defect positions and defect sizes to obtain a label set;
and obtaining a lithium battery appearance defect data set according to the lithium battery appearance defect image and the label set.
According to some embodiments of the first aspect of the present application, the object feature extraction model includes a feature extraction network layer, a full connection layer, and a classification network, and the inputting the lithium battery appearance defect dataset into the object feature extraction model to perform feature extraction, to obtain a first pixel level defect semantic feature set, includes:
acquiring a shallow feature map output by the feature extraction network layer;
normalizing the parameters of the full-connection layer to obtain normalized values of the parameters of the full-connection layer;
normalizing the first feature map output by the feature extraction network layer according to the normalization values of the shallow feature map and the full-connection layer parameters to obtain a shallow feature confidence coefficient mask;
mapping the shallow feature confidence level mask to the lithium battery appearance defect image, and extracting pixels of the lithium battery appearance defect image to be combined into a first pixel-level defect semantic feature set.
According to some embodiments of the first aspect of the present application, mapping the shallow feature confidence mask to the lithium battery appearance defect image, extracting a pixel combination of the lithium battery appearance defect image into a first pixel level defect semantic feature set includes:
mapping the shallow feature confidence coefficient mask to the lithium battery appearance defect image, and obtaining attention pixels and importance degree of the network to defects;
and extracting pixel combinations of the lithium battery appearance defect images as a first pixel-level defect semantic feature set according to the attention pixels and the importance degree.
According to some embodiments of the first aspect of the present application, the calculation formula of the shallow feature confidence mask is as follows:
Figure BDA0004068521280000031
wherein ,
Figure BDA0004068521280000032
represents the shallow feature confidence mask, e represents the confidence threshold, ++>
Figure BDA0004068521280000033
Representing a first feature confidence mask, k representing a kth image, h representing a high of a first feature map, w representing a wide of the first feature map, the shallow feature confidence mask being zero below a confidence threshold;
the calculation formula of the first feature confidence mask is as follows:
Figure BDA0004068521280000034
wherein θ 'represents a normalized value of the full-connection layer parameter, n represents an nth full-connection layer parameter, v' represents the shallow feature map, k represents a kth image, h represents a height of the first feature map, and w represents a width of the first feature map.
According to some embodiments of the first aspect of the present application, the purifying the first pixel level defect semantic feature set to obtain a second pixel level defect semantic feature set includes:
diffusing the first pixels of the first pixel level defect semantic feature set to obtain diffused pixel data;
calculating edge pixels of defects in the first pixel level defect semantic feature set, and obtaining edge pixel data;
comparing the edge pixel data with the diffusion pixel data to obtain comparison data;
and recalculating the edge pixels according to the comparison data until the comparison data accords with a preset condition.
According to some embodiments of the first aspect of the present application, the data enhancement of the lithium battery appearance defect data set by the first defect feature includes:
and carrying out random angle, number and position arrangement on the first defect characteristic and the second defect sample data in the lithium battery appearance defect data set.
According to some embodiments of the first aspect of the present application, training an initial lithium battery defect detection model according to the first defect sample data and the lithium battery appearance defect data set to obtain a lithium battery defect detection model includes
And respectively combining the first defect sample data with the second defect sample data and the label set in the lithium battery appearance defect data set to train an initial lithium battery defect detection model so as to obtain a lithium battery defect detection model.
A lithium battery defect detection system according to an embodiment of the second aspect of the present application, comprising: the lithium battery defect detection method according to the first aspect is realized by a memory, a processor and a computer program stored in the memory and capable of running on the processor when the processor executes the computer program.
According to an embodiment of the third aspect of the present application, the computer-readable storage medium stores computer-executable instructions for performing the lithium battery defect detection method according to the first aspect.
Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
Drawings
The accompanying drawings are included to provide a further understanding of the technical aspects of the present application, and are incorporated in and constitute a part of this specification, illustrate the technical aspects of the present application and together with the examples of the present application, and not constitute a limitation of the technical aspects of the present application.
Fig. 1 is a schematic flow chart of a method for detecting defects of a lithium battery according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of acquiring a lithium battery appearance defect dataset according to one embodiment of the present application;
FIG. 3 is a flow chart of acquiring a first pixel level defect semantic feature set according to one embodiment of the present application;
FIG. 4 is a flowchart illustrating a specific process for obtaining a first pixel level defect semantic feature set according to one embodiment of the present application;
FIG. 5 is a schematic diagram of a process for extracting a first pixel level defect semantic feature set according to another embodiment of the present application;
FIG. 6 is a flow chart of purifying a first pixel level defect semantic feature set according to one embodiment of the present application;
FIG. 7 is a flow chart of acquiring a second pixel level defect semantic feature set according to one embodiment of the present application;
FIG. 8 is a flow chart of data enhancement provided in one embodiment of the present application;
fig. 9 is a schematic flow chart of defect detection for appearance of a lithium battery according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
It should be noted that although functional block division is performed in a device diagram and a logic sequence is shown in a flowchart, in some cases, the steps shown or described may be performed in a different order than the block division in the device, or in the flowchart. The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
At present, the production process of lithium batteries is fully automated, each process point is phased out or manual intervention is reduced, and the detection mode of appearance defects of the lithium batteries based on deep learning in the related technology can lead a defect detection network to enter good convergence due to the small occupation ratio of defect samples in the normal production process and the detection mode based on deep learning needs a large number of defect samples; meanwhile, defect samples in actual production are unevenly distributed, the number of samples of different defect types is different, and the gap is huge, so that a detection network has obvious tendency, the probability that the defect types with more samples are detected is larger than the types with less samples, and the detection mode based on deep learning has more misjudgment conditions and lower detection precision.
Based on the above situation, the embodiment of the application provides a method, a system and a storage medium for detecting defects of a lithium battery, which improve the reliability, the robustness and the detection precision of a defect detection network.
Embodiments of the present application are further described below with reference to the accompanying drawings.
An embodiment of the first aspect of the present application specifically provides a method for detecting a defect of a lithium battery, as shown in fig. 1, where the method for detecting a defect of a lithium battery includes, but is not limited to, the following steps:
step S100, obtaining a lithium battery appearance defect data set;
step S200, inputting the lithium battery appearance defect data set into an object feature extraction model for feature extraction to obtain a first pixel level defect semantic feature set;
step S300, purifying the first pixel level defect semantic feature set to obtain a second pixel level defect semantic feature set;
step S400, classifying the second defect semantic features and constructing a lithium battery appearance defect semantic feature library;
step S500, extracting first defect characteristics from a semantic feature library of the appearance defects of the lithium battery, and carrying out data enhancement on a data set of the appearance defects of the lithium battery through the first defect characteristics to obtain first defect sample data;
step S600, training an initial lithium battery defect detection model according to the first defect sample data and the lithium battery appearance defect data set to obtain a lithium battery defect detection model;
and step S700, performing defect detection on the image to be detected of the lithium battery through a lithium battery defect detection model to obtain a defect detection result.
Compared with the related art, the method has the advantages that the appearance detection mode of carrying out data enhancement on the lithium battery appearance defect data set through the pixel-level features is adopted, the lithium battery appearance defect is described from the pixel-level, so that the enhanced first defect sample data can describe defects of any shape and texture, the problems of insufficient defect samples and uneven category distribution can be effectively solved, and therefore, the reliability, the robustness and the detection precision of a defect detection network can be improved through carrying out appearance detection on the lithium battery appearance defect detection model obtained through training based on the first defect sample data and the lithium battery appearance defect data set.
Specifically, collecting a lithium battery appearance defect image containing appearance defects, and constructing a lithium battery appearance defect data set; extracting defect semantic features corresponding to the lithium battery appearance defect data set through an object feature extraction model to obtain a first pixel-level defect semantic feature set; the first pixel level defect semantic feature set is purified to obtain semantic feature description with smaller error, namely a second pixel level defect semantic feature set; the second pixel level defect semantic feature set obtained after feature purification is stored in a defect semantic feature library separately according to different defect categories, and semantic features of various defect categories are accumulated to obtain a lithium battery appearance defect semantic feature library; extracting first defect characteristics from a semantic characteristic library, and carrying out data enhancement on the first defect characteristics and second defect sample data in a lithium battery appearance defect data set to obtain first defect sample data; training an initial lithium battery defect detection model according to the first defect sample data and the lithium battery appearance defect data set to obtain a lithium battery defect detection model; and performing defect detection on the image to be detected of the lithium battery through the lithium battery defect detection model to obtain a defect detection result, and using the lithium battery defect detection model in a production environment.
Referring to fig. 2, it can be appreciated that step S100 includes, but is not limited to, the following steps:
step S110, obtaining an appearance defect image of the lithium battery;
step S120, marking the defect type, the defect position and the defect size of the appearance defect image of the lithium battery to obtain a label set;
and step S130, obtaining a lithium battery appearance defect data set according to the lithium battery appearance defect image and the label set.
Firstly, collecting images of appearance defects of the lithium battery, manually marking the positions, the sizes and the types of the defects in the images, and collecting the images and corresponding labels to construct a data set of the appearance defects of the lithium battery.
Referring to fig. 3, it can be understood that the object feature extraction model includes a feature extraction network layer, a full connection layer, and a classification network, step S200, including but not limited to the following steps:
step S210, a shallow feature map output by a feature extraction network layer is obtained;
step S220, carrying out normalization processing on parameters of the full-connection layer to obtain normalized values of the parameters of the full-connection layer;
step S230, carrying out normalization processing on a first feature map output by a feature extraction network layer according to the normalization values of the shallow feature map and the full-connection layer parameters to obtain a shallow feature confidence coefficient mask;
step S240, mapping the shallow feature confidence mask to the lithium battery appearance defect image, and extracting pixels of the lithium battery appearance defect image to be combined into a first pixel level defect semantic feature set.
It should be noted that, an object feature extraction model is constructed, the object feature extraction model is composed of a feature extraction network layer, a full connection layer and a classification network, the object feature extraction model is trained by using a lithium battery appearance defect data set, so that the network learns the difference points represented by different defect types on an image, and the attention pixels and the importance of the network to the defect are obtained through shallow features and weight of the shallow features and mapped to an original image to provide the defect semantic features. The object feature extraction model is obtained by the following steps: constructing an initial feature extraction model according to the feature extraction network layer, the full connection layer and the classification network; training the initial feature extraction model according to the lithium battery appearance defect data set to obtain an object feature extraction model.
Referring to fig. 4-5, it can be appreciated that step S240 includes, but is not limited to, the following steps:
step S241, mapping the shallow feature confidence level mask to a lithium battery appearance defect image, and acquiring attention pixels and importance degree of the network to the defect;
step S242, extracting the pixel combination of the lithium battery appearance defect image as a first pixel level defect semantic feature set according to the attention pixel and the importance degree.
It can be appreciated that the calculation formula of the shallow feature confidence mask is as follows:
Figure BDA0004068521280000081
wherein ,
Figure BDA0004068521280000082
represents a shallow feature confidence mask, e represents a confidence threshold, < ->
Figure BDA0004068521280000083
Representing a first feature confidence mask, k representing a kth image, h representing a high of the first feature map, w representing a wide of the first feature map, a shallow feature confidence mask of zero less than a confidence threshold;
the calculation formula of the first feature confidence mask is as follows:
Figure BDA0004068521280000084
wherein θ 'represents a normalized value of the full-connection layer parameter, n represents an nth full-connection layer parameter, v' represents a shallow feature map, k represents a kth image, h represents a high of the first feature map, and w represents a wide of the first feature map.
Specifically, the parameters of the fully connected layer are softmax processed such that all parameters are in the range of 0 to 1 and the sum of all parameters is equal to 1. Let the parameters of the full connection layer be theta full_connection =(θ 1 ,θ 2 ,...,θ N ) And if N is the number of parameters of the full connection layer, performing softmax processing:
Figure BDA0004068521280000085
the softmax processing represents normalization processing, θ represents parameters of the fully connected layer, N represents the total number of parameters of the fully connected layer, N represents an nth fully connected layer parameter, j represents a jth fully connected layer parameter, and θ' represents a softmax value of the fully connected layer parameter. Let the first feature map of the kth image be v k =(υ k,1 ,υ k,2 ,...,υ k,M ) And M represents the number of feature maps, and the shallow feature map of the kth image is:
Figure BDA0004068521280000091
wherein v represents a shallow feature map, k represents a kth image, M represents the number of image feature maps, M represents an mth image feature map, v 'represents a new image feature map obtained by carrying out mean value combination on all feature maps of the image, that is, v' represents a shallow feature map output by a feature extraction network layer. Assuming that the height of the new image feature map v' is H and the width is W, the feature map is softmax processed to calculate the shallow feature mask:
Figure BDA0004068521280000092
wherein θ' represents a softmax value of the full-link layer parameter, representing the importance of the image feature; n denotes the nth full link layer parameter, v' denotes the shallow feature map, k denotes the kth image, h denotes the high of the first feature map, w denotes the width of the first feature map,
Figure BDA0004068521280000093
representing a first feature confidence mask. The shallow feature map is a new image feature map, and the first feature map is subjected to softmax processing to ensure that the value of each shallow feature is in the range of [0,1 ]]The sum of the ranges is equal to 1, and the confidence threshold epsilon is set to filter noise to obtain shallow feature confidence level mask +.>
Figure BDA0004068521280000094
Figure BDA0004068521280000095
wherein ,
Figure BDA0004068521280000096
represents a shallow feature confidence mask, e represents a confidence threshold, < ->
Figure BDA0004068521280000097
The mask value of the image feature is represented,
Figure BDA0004068521280000098
representing the corrected image feature mask value, the shallow feature confidence mask value that is less than the confidence threshold is set to zero. And finally, mapping the shallow feature confidence coefficient mask to the original image, acquiring attention pixels of the defect, and extracting corresponding pixel combinations to be defect semantic features.
Referring to fig. 6 to 7, it can be understood that step S300 includes, but is not limited to, the following steps:
step S310, diffusing a first pixel of a first pixel level defect semantic feature set to obtain diffused pixel data;
step S320, calculating edge pixels of defects in the first pixel level defect semantic feature set, and obtaining edge pixel data;
step S330, comparing the edge pixel data with the diffusion pixel data to obtain comparison data;
step S340, recalculate the edge pixels according to the comparison data until the comparison data meets the preset condition.
The method includes the steps that defect feature purification is conducted on a first pixel level defect semantic feature set according to confidence coefficient and defect influence range output by an object feature extraction model, and a second pixel level defect semantic feature set is obtained.
In the related art, according to the influence range and distribution of the defects, pixels between the defects and normal pixels are more likely to appear at the edge positions of the defects, so that the distinguishing boundaries of the defects and the normal pixels are blurred, and the subsequent judging model is likely to have misjudgment. Based on the above, the object of the present application is to solve the above problem, and strengthen the pixels with high relative confidence according to the confidence outputted by the feature extraction model, otherwise, weaken the influence of the pixels with low relative confidence, so that the feature of the defect can represent the actual characterization more.
Referring to fig. 7, first, pixels are outward diffused based on a first pixel, which is a defective semantic feature pixel obtained from a first pixel-level defective semantic feature set, and the diffusion value is obtained by multiplying the average value of adjacent effective pixels by an attenuation coefficient λ; and secondly, calculating edge pixel data of the defect, namely an edge value, judging whether the diffused pixel data exceeds the edge pixel data, if the pixels exceeding the edge are removed, taking no pixel as a stop condition, and finally obtaining a second pixel-level defect semantic feature set with maximized defect features and smooth edges. The preset condition is that no pixel can diffuse to be a stop condition.
And calculating the change degree between the current diffusion point and the non-characteristic pixel point adjacent to the current diffusion point by using a Sobel operator, and marking the diffusion point as an edge point when the change degree exceeds a threshold value eta, so that the diffusion cannot be continued. The Sobel operator is a Sobel operator, and is used for detecting edges by weighting differences of gray values in the four fields of up, down, left and right of each pixel in an image and reaching extreme values at the edges. Taking the horizontal and longitudinal Sobel operators as G respectively x and Gy
Figure BDA0004068521280000101
wherein ,Gx Representing a lateral Sobel operator, G y Representing the lateral Sobel operator. And (3) taking the current diffusion point as a central point, and carrying out convolution calculation on adjacent pixel points by using a Sobel operator to obtain a variation degree estimated value of the current diffusion point:
Figure BDA0004068521280000102
wherein G represents the variation degree estimated value of the current diffusion point, and when the G value of the diffusion point is larger than or equal to the threshold value eta, the diffusion point is considered as an edge.
Referring to fig. 8, it can be understood that the data enhancement of the lithium battery appearance defect data set by the first defect feature in step S500 includes, but is not limited to, the following steps:
step S510, carrying out random angle, number and position arrangement on the first defect characteristic and the second defect sample data in the lithium battery appearance defect data set.
It should be noted that, according to the distribution situation of the defect samples in the lithium battery appearance defect data set, semantic features are extracted from the defect semantic feature library to be combined with normal samples, and the combination mode is that the positions, the angles and the numbers of the samples are randomly placed, so that the problems of insufficient number of the defect samples or unbalanced distribution of defect types are solved.
Referring to fig. 9, it can be appreciated that step S600 includes, but is not limited to, the following steps:
step S610, the first defect sample data is combined with the second defect sample data in the lithium battery appearance defect data set and the label set respectively, so as to train the initial lithium battery defect detection model, and a lithium battery defect detection model is obtained.
The lithium battery appearance defect data set includes a lithium battery appearance defect image, second defect sample data and a label set. Mixing the enhanced sample data with the original sample data, performing detection network learning and using the mixture in a production environment; combining the first defect sample data generated after data enhancement to original data, namely second defect sample data and a label set, and performing detection network learning; and the first defect sample data is used for replenishing the defect quantity to the second defect sample data and compensating the problem of uneven classification, so that the success rate of the detection network on defect detection is improved.
In addition, the second aspect of the present application provides a lithium battery defect detection system, which includes: memory, a processor, and a computer program stored on the memory and executable on the processor.
The processor and the memory may be connected by a bus or other means.
The memory, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs as well as non-transitory computer executable programs. In addition, the memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory optionally includes memory remotely located relative to the processor, the remote memory being connectable to the processor through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The non-transitory software program and instructions required to implement the lithium battery defect detection method of the above-described first aspect embodiment are stored in the memory, and when executed by the processor, the lithium battery defect detection method of the above-described embodiment is performed, for example, the method steps S100 to S700 in fig. 1, the method steps S110 to 130 in fig. 2, the method steps S210 to 240 in fig. 3, the method steps S241 to 242 in fig. 4, the method steps S310 to 340 in fig. 6, the method step S510 in fig. 8, and the method step S610 in fig. 9 described above are performed.
The above described device embodiments are only illustrative, wherein the units described as separate components may or may not be physically separate, i.e. may fall into one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
Furthermore, embodiments of the present application provide a computer-readable storage medium storing computer-executable instructions that are executed by a processor or a control module, for example, by one of the processors in the above-described device embodiments, and may cause the processor to perform the lithium battery defect detection method in the above-described first aspect embodiment, for example, perform the above-described method steps S100 to S700 in fig. 1, the method steps S110 to 130 in fig. 2, the method steps S210 to 240 in fig. 3, the method steps S241 to 242 in fig. 4, the method steps S310 to 340 in fig. 6, the method step S510 in fig. 8, and the method step S610 in fig. 9.
Those of ordinary skill in the art will appreciate that all or some of the steps, systems, and methods disclosed above may be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). The term computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data, as known to those skilled in the art. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital Versatile Disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer. Furthermore, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transport mechanism and includes any information delivery media.
While the preferred embodiments of the present application have been described in detail, the present application is not limited to the above embodiments, and various equivalent modifications and substitutions can be made by those skilled in the art without departing from the spirit of the present application, and these equivalent modifications and substitutions are intended to be included in the scope of the present application as defined in the appended claims.

Claims (10)

1. A method for detecting defects of a lithium battery, comprising:
acquiring a lithium battery appearance defect data set and an image to be detected of the lithium battery;
inputting the lithium battery appearance defect data set into an object feature extraction model for feature extraction to obtain a first pixel level defect semantic feature set;
purifying the first pixel level defect semantic feature set to obtain a second pixel level defect semantic feature set;
classifying the second defect semantic features to construct a lithium battery appearance defect semantic feature library;
extracting first defect characteristics from the semantic feature library of the appearance defects of the lithium battery, and carrying out data enhancement on the appearance defect data set of the lithium battery through the first defect characteristics to obtain first defect sample data;
training an initial lithium battery defect detection model according to the first defect sample data and the lithium battery appearance defect data set to obtain a lithium battery defect detection model;
and performing defect detection on the image to be detected of the lithium battery through the lithium battery defect detection model to obtain a defect detection result.
2. The method of claim 1, wherein the acquiring the lithium battery appearance defect dataset comprises:
obtaining an appearance defect image of a lithium battery;
marking the appearance defect image of the lithium battery with defect types, defect positions and defect sizes to obtain a label set;
and obtaining a lithium battery appearance defect data set according to the lithium battery appearance defect image and the label set.
3. The method for detecting a lithium battery defect according to claim 2, wherein the object feature extraction model includes a feature extraction network layer, a full connection layer and a classification network, the step of inputting the lithium battery appearance defect data set into the object feature extraction model to perform feature extraction, and obtaining a first pixel level defect semantic feature set includes:
acquiring a shallow feature map output by the feature extraction network layer;
normalizing the parameters of the full-connection layer to obtain normalized values of the parameters of the full-connection layer;
normalizing the first feature map output by the feature extraction network layer according to the normalization values of the shallow feature map and the full-connection layer parameters to obtain a shallow feature confidence coefficient mask;
mapping the shallow feature confidence level mask to the lithium battery appearance defect image, and extracting pixels of the lithium battery appearance defect image to be combined into a first pixel-level defect semantic feature set.
4. The method of claim 3, wherein mapping the shallow feature confidence mask to the lithium battery appearance defect image, extracting a combination of pixels of the lithium battery appearance defect image into a first pixel-level defect semantic feature set, comprises:
mapping the shallow feature confidence coefficient mask to the lithium battery appearance defect image, and obtaining attention pixels and importance degree of the network to defects;
and extracting pixel combinations of the lithium battery appearance defect images as a first pixel-level defect semantic feature set according to the attention pixels and the importance degree.
5. The method of claim 3, wherein the shallow feature confidence mask is calculated as follows:
Figure FDA0004068521260000021
wherein ,
Figure FDA0004068521260000022
represents the shallow feature confidence mask, e represents the confidence threshold, ++>
Figure FDA0004068521260000024
Representing a first feature confidence mask, k representing a kth image, h representing a high of a first feature map, w representing a wide of the first feature map, the shallow feature confidence mask being zero below a confidence threshold;
the calculation formula of the first feature confidence mask is as follows:
Figure FDA0004068521260000023
wherein θ 'represents a normalized value of the full-connection layer parameter, n represents an nth full-connection layer parameter, v' represents the shallow feature map, k represents a kth image, h represents a height of the first feature map, and w represents a width of the first feature map.
6. The method for detecting defects of a lithium battery according to claim 5, wherein the purifying the first pixel-level defect semantic feature set to obtain a second pixel-level defect semantic feature set includes:
diffusing the first pixels of the first pixel level defect semantic feature set to obtain diffused pixel data;
calculating edge pixels of defects in the first pixel level defect semantic feature set, and obtaining edge pixel data;
comparing the edge pixel data with the diffusion pixel data to obtain comparison data;
and recalculating the edge pixels according to the comparison data until the comparison data accords with a preset condition.
7. The method of claim 6, wherein the data enhancement of the lithium battery appearance defect dataset by the first defect feature comprises:
and carrying out random angle, number and position arrangement on the first defect characteristic and the second defect sample data in the lithium battery appearance defect data set.
8. The method for detecting defects of a lithium battery according to claim 2, wherein training an initial lithium battery defect detection model according to the first defect sample data and the lithium battery appearance defect data set to obtain a lithium battery defect detection model comprises:
and respectively combining the first defect sample data with the second defect sample data and the label set in the lithium battery appearance defect data set to train an initial lithium battery defect detection model so as to obtain a lithium battery defect detection model.
9. A lithium battery defect detection system, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the lithium battery defect detection method according to any one of claims 1 to 8 when the computer program is executed.
10. A computer-readable storage medium, characterized by: the computer-readable storage medium stores computer-executable instructions for performing the lithium battery defect detection method according to any one of claims 1 to 8.
CN202310084363.7A 2023-01-16 2023-01-16 Lithium battery defect detection method, system and storage medium Active CN116129221B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310084363.7A CN116129221B (en) 2023-01-16 2023-01-16 Lithium battery defect detection method, system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310084363.7A CN116129221B (en) 2023-01-16 2023-01-16 Lithium battery defect detection method, system and storage medium

Publications (2)

Publication Number Publication Date
CN116129221A true CN116129221A (en) 2023-05-16
CN116129221B CN116129221B (en) 2024-02-20

Family

ID=86297069

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310084363.7A Active CN116129221B (en) 2023-01-16 2023-01-16 Lithium battery defect detection method, system and storage medium

Country Status (1)

Country Link
CN (1) CN116129221B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116699428A (en) * 2023-08-08 2023-09-05 深圳市杰成镍钴新能源科技有限公司 Defect detection method and device for retired battery

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111862092A (en) * 2020-08-05 2020-10-30 复旦大学 Express delivery outer package defect detection method and device based on deep learning
US20210150696A1 (en) * 2019-11-18 2021-05-20 Stmicroelectronics (Rousset) Sas Neural network training device, system and method
CN112950547A (en) * 2021-02-03 2021-06-11 佛山科学技术学院 Machine vision detection method for lithium battery diaphragm defects based on deep learning
CN112991259A (en) * 2021-01-29 2021-06-18 合肥晶合集成电路股份有限公司 Method and system for detecting defects of semiconductor manufacturing process
CN113516651A (en) * 2021-07-30 2021-10-19 深圳康微视觉技术有限公司 Welding joint defect detection method and device based on residual error network
CN113643268A (en) * 2021-08-23 2021-11-12 四川大学 Industrial product defect quality inspection method and device based on deep learning and storage medium
WO2021248554A1 (en) * 2020-06-11 2021-12-16 深圳市信宇人科技股份有限公司 High-speed and high-precision burr detection method and detection system for lithium ion battery electrode sheet
CN114882002A (en) * 2022-05-31 2022-08-09 深圳市格灵精睿视觉有限公司 Target defect detection method and detection device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20210150696A1 (en) * 2019-11-18 2021-05-20 Stmicroelectronics (Rousset) Sas Neural network training device, system and method
WO2021248554A1 (en) * 2020-06-11 2021-12-16 深圳市信宇人科技股份有限公司 High-speed and high-precision burr detection method and detection system for lithium ion battery electrode sheet
CN111862092A (en) * 2020-08-05 2020-10-30 复旦大学 Express delivery outer package defect detection method and device based on deep learning
CN112991259A (en) * 2021-01-29 2021-06-18 合肥晶合集成电路股份有限公司 Method and system for detecting defects of semiconductor manufacturing process
CN112950547A (en) * 2021-02-03 2021-06-11 佛山科学技术学院 Machine vision detection method for lithium battery diaphragm defects based on deep learning
CN113516651A (en) * 2021-07-30 2021-10-19 深圳康微视觉技术有限公司 Welding joint defect detection method and device based on residual error network
CN113643268A (en) * 2021-08-23 2021-11-12 四川大学 Industrial product defect quality inspection method and device based on deep learning and storage medium
CN114882002A (en) * 2022-05-31 2022-08-09 深圳市格灵精睿视觉有限公司 Target defect detection method and detection device, computer equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHANGLU XU 等: ""Surface Defects Detection and Identification of Lithium Battery Pole PieceBased on Multi-Feature Fusion and PSO-SVM"", 《IEEE ACCESS》, pages 85232 - 85239 *
赵晓云;郑治华;韩洪伟;谢仁义;王凯;徐志强;: "锂电池极片表面缺陷特征提取方法研究", 河南科技, no. 05, pages 139 - 141 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116699428A (en) * 2023-08-08 2023-09-05 深圳市杰成镍钴新能源科技有限公司 Defect detection method and device for retired battery
CN116699428B (en) * 2023-08-08 2023-10-10 深圳市杰成镍钴新能源科技有限公司 Defect detection method and device for retired battery

Also Published As

Publication number Publication date
CN116129221B (en) 2024-02-20

Similar Documents

Publication Publication Date Title
CN116129221B (en) Lithium battery defect detection method, system and storage medium
CN110796009A (en) Method and system for detecting marine vessel based on multi-scale convolution neural network model
CN111583198A (en) Insulator picture defect detection method combining FasterR-CNN + ResNet101+ FPN
CN112132852B (en) Automatic image matting method and device based on multi-background color statistics
CN110796048A (en) Ship target real-time detection method based on deep neural network
CN111652230B (en) License plate recognition method, electronic device and storage medium
CN112132206A (en) Image recognition method, training method of related model, related device and equipment
CN112633149B (en) Domain-adaptive foggy-day image target detection method and device
CN116758437A (en) SAR image target detection method and device for cross ratio-focus loss function
CN113469158B (en) Method and system for identifying illegal hazardous chemical substance transport vehicle based on convolutional neural network
CN112733652B (en) Image target recognition method, device, computer equipment and readable storage medium
CN113705672A (en) Threshold value selection method, system and device for image target detection and storage medium
CN114581446A (en) Battery core abnormity detection method and system of laminated battery
CN113901941A (en) Cargo vehicle checking method and device, electronic device and storage medium
CN115339436A (en) Method and related device for correcting parking space angular point
CN117710756B (en) Target detection and model training method, device, equipment and medium
CN115359359A (en) Oil storage tank detection method and device based on remote sensing image
CN115330706A (en) PCB defect detection method and device based on improved YOLOv3
CN115797440A (en) Battery cell positioning method, controller and computer readable storage medium
CN115965813A (en) Printing plate defect classification model training method and printing plate defect classification method
CN117661103A (en) Visual inspection method, device, equipment and storage medium for growth of monocrystalline silicon
CN113469057A (en) Fire hole video self-adaptive detection method, device, equipment and medium
CN112419359A (en) Infrared dim target detection method and device based on convolutional neural network
CN114926787A (en) Method and equipment for detecting damage of mulching film under power transmission line
CN117333813A (en) Head direction recognition method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant