A method and device for detecting a micro-foreign particle in a battery and a medium
By combining deep learning image segmentation and object detection algorithms with clustering and grayscale threshold analysis, the accuracy and speed issues of detecting tiny foreign particles inside batteries are solved, achieving efficient and accurate identification of foreign objects inside batteries.
Patent Information
- Application Number
- CN202411789814.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-12-06
AI Technical Summary
Existing methods for detecting tiny foreign particles inside batteries cannot accurately detect all anomalies and are easily affected by interference from non-battery areas, impacting the accuracy and speed of the detection results.
The battery contour was extracted using deep learning image segmentation to form the region of interest. A deep learning object detection algorithm was used to identify abnormal bright spots. The detection results were determined by combining clustering algorithm and grayscale threshold analysis.
It improves the accuracy and speed of identifying tiny foreign particles inside the battery, adapts to different battery models and defect morphologies, reduces interference from non-battery areas, and enhances the robustness and accuracy of detection.
Smart Images

Figure CN119534491B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of battery testing, and in particular to a method, apparatus, and medium for detecting tiny foreign particles inside a battery. Background Technology
[0002] Mobile phone battery quality has become a key factor for an increasing number of consumers. The production of mobile phone batteries typically involves multiple complex processes, among which the manufacturing quality of the positive and negative electrodes inside the battery is crucial. The battery uses a nested stacking method for the positive and negative electrodes. This nesting and stacking process can easily cause metal particles or other electrode material particles to fall off. These particles adhere to the normal electrode areas, leading to continuous corrosion of the electrodes during subsequent use, severely reducing battery performance and lifespan. This significantly impacts the overall product quality and user experience. Therefore, accurate detection of abnormal bright spots and particles inside the battery is crucial to ensuring product quality. Because abnormal bright spots can appear anywhere inside the battery and are extremely small, deviations in battery placement and abnormal metal particles in non-battery areas during actual production can affect the CT scan results. Therefore, it is necessary to accurately locate the battery area for inspection from various cross-sectional images. Existing detection methods cannot accurately detect all abnormal points, and the results are also affected by interference from non-battery areas. This requires higher accuracy and intelligence in detecting abnormal bright spots on the positive and negative electrodes inside the battery. The method should not only accurately detect abnormal bright spots but also have faster speed and robustness, and possess precise identification capabilities for different battery models and defect morphologies. Summary of the Invention
[0003] To address the shortcomings of existing methods, this invention provides a method, apparatus, and medium for detecting minute foreign particles inside a battery.
[0004] The technical solution adopted by this invention to solve its technical problem is: a method for detecting tiny foreign particles inside a battery.
[0005] Obtain slice images of different surfaces and cross sections of the battery after CT scanning;
[0006] Deep learning image segmentation method is used to classify sliced images and obtain the battery contour in each sliced image;
[0007] Each slice image is eroded outward by several pixels based on its battery outline to form a new outline, and the region of interest is delineated using the minimum bounding rectangle of the new outline.
[0008] The detection results are obtained by using a deep learning object detection algorithm to detect the region of interest. The deep learning object detection algorithm uses a convolutional neural network to identify abnormal bright spots in the region of interest, determine their positions, and output the bounding boxes and confidence scores of the abnormal bright spots.
[0009] The detection results include qualified and abnormal. If no abnormal bright spots are detected in the region of interest, the detection result is qualified, while if abnormal bright spots are detected, it is judged as abnormal and further confirmation is required.
[0010] For the detection results of anomalies, the deep learning target detection algorithm outputs a bounding box and a corresponding confidence score for each anomalous target point, and removes target points with a confidence score less than 0.6. Target points with a confidence score less than 0.6 are judged as qualified, and target points with a confidence score greater than or equal to 0.6 are judged as anomalous. For the target points in the anomalous category that are not removed, the area overlap algorithm is used to calculate and remove the duplicate boxes between them.
[0011] The abnormal regions containing the target points that were not removed in the anomalies were divided into foreground and background by a clustering algorithm. The target points that were not removed in the anomalies were divided into unqualified and pending categories by analyzing the grayscale thresholds of the foreground and background.
[0012] The terms "unqualified" and "pending" are defined using the mean difference between the grayscale thresholds of the foreground and background as the criterion.
[0013] Preferably, the threshold for battery contour segmentation is 0.5.
[0014] Preferably, the outward erosion involves two pixels, and the area outside the region of interest is filled with pixels of value 0.
[0015] Preferably, the anomaly detection results are further processed by reverse calculation into the slice image before the clustering algorithm is performed.
[0016] Preferably, the sliced images include frontal sliced images, cross-sectional sliced images, and longitudinal sliced images.
[0017] A device for detecting minute foreign particles inside a battery includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program stored in the memory to implement the method for detecting minute foreign particles inside a battery as described in any of the preceding claims.
[0018] A computer-readable storage medium storing a computer program that, when executed by a processor, implements a method for detecting minute foreign particles inside a battery as described in any of the preceding claims.
[0019] The beneficial effects of this invention are as follows: This invention first uses a deep learning image segmentation algorithm to extract the contours of each side of the battery, fills and crops the region of interest (ROI) of the battery contour in the image, and then uses a deep learning object detection algorithm to detect abnormal bright spots in the cropped image to determine the detection result of the battery. It can adapt to the continuous changes in the shape and color of the battery contour in CT scans, avoids the interference of non-battery areas on the detection results, and greatly improves the recognition accuracy and speed. Attached Figure Description
[0020] Figure 1 This is a flowchart of the detection method according to an embodiment of the present invention;
[0021] Figure 2 This is a diagram of the undetermined detection results obtained in an embodiment of the present invention; Detailed Implementation
[0022] To more clearly illustrate the objectives, technical solutions, and advantages of the embodiments of the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. It is clear and complete that the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the protection scope of the present invention.
[0023] Examples of embodiments of the present invention Figure 1 The image shows a method for detecting tiny foreign particles inside a battery.
[0024] To obtain slice images of different surfaces and cross sections of a battery after a CT scan, the battery is first scanned using a CT scan (computed tomography), and then different end faces or cross sections along different directions are cut from the three-dimensional image obtained by the CT scan to obtain two-dimensional planar slice images.
[0025] Deep learning image segmentation is used to classify sliced images and extract battery contours from each slice. The deep learning image segmentation method classifies the sliced images according to the faces they capture, including frontal slices, cross-sectional slices, and longitudinal slices. In other words, three 2D images (frontal, cross-sectional, and longitudinal) are extracted from the 3D images obtained from a CT scan, and the battery contour is then extracted from these sliced images. The battery contour segmentation threshold is 0.5. The deep learning image segmentation method uses a convolutional neural network to extract features from the sliced images, outputting a probability score for each category (the sum of the three probability scores is 1) and a probability map of the battery contour. The category with the highest probability value is taken as the interface category, thus achieving automatic classification of cross-sections (frontal, cross-sectional, and longitudinal) and extraction of the battery contour. The contour segmentation threshold on the probability map is 0.5; if the value is greater than 0.5, the pixel value is set to 255; otherwise, it is 0.
[0026] Each slice image is eroded outward by several pixels based on its battery outline to form a new outline, and the region of interest is delineated using the smallest bounding rectangle of the new outline. The outward erosion is implemented using a traditional algorithm, which involves sliding a structuring element (i.e., a non-zero convolution with a kernel of 2) on the image. Whenever the structuring element intersects with the battery outline in the image, the center pixel value is set as the foreground value. This operation will enlarge the white areas and shrink the black areas in the image. If a pixel's neighborhood contains any white pixels, that pixel will be inflated to white. Two pixels are selected for outward erosion, and the area outside the region of interest is filled with pixels of 0 value. That is, the area outside the region of interest (non-battery area) is filled with a black background to ensure that the battery is within the detection area and there are no other interferences, thereby speeding up the detection and improving the detection accuracy.
[0027] The detection results are obtained by using a deep learning object detection algorithm to detect regions of interest. The deep learning object detection algorithm uses a convolutional neural network to identify abnormal bright spots in the region of interest, determine their location, and output the bounding box and confidence score of the abnormal bright spots. That is, it outputs the center point coordinates, length, width, confidence score and class probability matrix (dimension (1,2) and sum to 1) of each abnormal region. If no abnormal bright spots are identified in the region of interest, the detection result is qualified, while those with abnormal bright spots are judged as abnormal and further confirmation is carried out. In other words, the detection results include two types: qualified and abnormal. For abnormal detection results, the deep learning object detection algorithm outputs a bounding box and a corresponding confidence score for each abnormal target point, and removes target points with a confidence score less than 0.6. That is, targets with a confidence score (conf) less than 0.6 are judged as qualified (OK), and targets with a confidence score greater than or equal to 0.6 are judged as abnormal. At this time, the target points that are not removed from the abnormal list are calculated and removed using the area overlap algorithm, which is the overlapping part of the bounding boxes of the target points. The area overlap algorithm is implemented using existing methods, such as using OpenCV templates to calculate and remove the overlapping parts. The abnormal regions containing the target points that were not removed from the anomalies are distinguished into foreground and background using clustering algorithms, such as K-means clustering. The clustering algorithm is used to quantize the gray values of the entire abnormal bright spot region to determine the type of battery detection result. The target points that were not removed from the anomalies are divided into unqualified and undetermined based on the analysis of the gray value thresholds of the foreground and background. The difference between the mean gray value thresholds of the foreground and background is used as the classification standard. When the slice image is divided into frontal slice image, cross-sectional slice image and longitudinal slice image, the gray value threshold of unqualified (NG) in the frontal slice image is 42.77 and the gray value threshold of undetermined (Unsure) is 9.57; the gray value threshold of NG in the cross-sectional slice image is 50 and the gray value threshold of Unsure is 4; the gray value threshold of NG in the longitudinal slice image is 46.6 and the gray value threshold of Unsure is 11.8.
[0028] Meanwhile, before the clustering algorithm is used to calculate the anomaly detection results, a step of reverse calculation is performed on the sliced image to improve the accuracy of detection.
[0029] A device for detecting minute foreign particles inside a battery includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program stored in the memory to implement the method for detecting minute foreign particles inside a battery as described in any of the preceding claims.
[0030] A computer-readable storage medium storing a computer program may include any entity or device capable of carrying the computer program code, such as a USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory, random access memory, and software distribution medium. The computer program code may be any existing code form. When the computer program is executed by a processor, it implements the method for detecting minute foreign particles inside a battery as described in any of the preceding claims.
[0031] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A method for detecting minute foreign particles inside a battery, characterized in that: Obtain slice images of different surfaces and cross sections of the battery after CT scanning; Deep learning image segmentation method is used to classify sliced images and obtain the battery contour in each sliced image; Each slice image is eroded outward by several pixels based on its battery outline to form a new outline, and the region of interest is delineated using the minimum bounding rectangle of the new outline. The detection results are obtained by using a deep learning object detection algorithm to detect the region of interest. The deep learning object detection algorithm uses a convolutional neural network to identify abnormal bright spots in the region of interest, determine their positions, and output the bounding boxes and confidence scores of the abnormal bright spots. The detection results include qualified and abnormal. If no abnormal bright spots are detected in the region of interest, the detection result is qualified, while if abnormal bright spots are detected, it is judged as abnormal and further confirmation is required. For the detection results of anomalies, the deep learning target detection algorithm outputs a bounding box and a corresponding confidence score for each anomalous target point, and removes target points with a confidence score less than 0.
6. Target points with a confidence score less than 0.6 are judged as qualified, and target points with a confidence score greater than or equal to 0.6 are judged as anomalous. For the target points in the anomalous category that are not removed, the area overlap algorithm is used to calculate and remove the duplicate boxes between them. The abnormal regions containing the target points that were not removed in the anomalies were divided into foreground and background by a clustering algorithm. The target points that were not removed in the anomalies were divided into unqualified and pending categories by analyzing the grayscale thresholds of the foreground and background. The terms "unqualified" and "pending" are defined using the mean difference between the grayscale thresholds of the foreground and background as the criterion.
2. The method for detecting minute foreign particles inside a battery according to claim 1, characterized in that... The threshold for battery contour segmentation is 0.
5.
3. The method for detecting minute foreign particles inside a battery according to claim 1, characterized in that... The outward erosion involves two pixels, and the area outside the region of interest is filled with pixels of value 0.
4. The method for detecting minute foreign particles inside a battery according to claim 1, characterized in that... The anomaly detection results are further processed by reverse calculation into the slice image before the clustering algorithm is performed.
5. The method for detecting minute foreign particles inside a battery according to claim 1, characterized in that: The sliced images include frontal sliced images, cross-sectional sliced images, and longitudinal sliced images.
6. A device for detecting tiny foreign particles inside a battery, characterized in that... The device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program stored in the memory to implement the method for detecting minute foreign particles inside a battery as described in any one of claims 1-5.
7. A computer-readable storage medium, characterized in that... The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for detecting minute foreign particles inside a battery as described in any one of claims 1-5.
Citation Information
Patent Citations
Foreign object detection system, method and device based on X-ray imaging technology
CN108535287A
Defect detection method and apparatus, electronic device, and readable storage medium
WO2023179122A1