An abnormality detection method, system, device and medium for battery cell production
Patent Information
- Application Number
- CN202611085011.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-21
- Publication Date
- 2026-10-27
AI Technical Summary
传统的基于固定阈值或简单几何规则的算法无法覆盖所有异常模式,适应性差
1、本发明基于高程图扫描采集、预处理、模型分割、参数计算及等级判定,摒弃传统规则算法仅抽取高程图平均高度、极值的单一信息提取方式,完整利用电芯包胶区域高程图的像素信息,能够保留电芯蓝膜表面局部形态、边缘梯度及空间分布等关键特征,避免大量有效信息被舍弃的问题,解决了传统检测算法信息利用维度单一、有效信息浪费的技术问题;
Smart Images

Figure CN122989582A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of battery quality testing technology, and specifically relates to an anomaly detection method, system, equipment and medium for battery cell production. Background Technology
[0002] In the manufacturing process of lithium battery cells, the quality of the blue film coating during the encapsulation process is a key indicator determining the safety and reliability of the cell. Defects such as wrinkles, scratches, bubbles, and lack of gaskets in the encapsulation process can easily lead to short circuits, structural failures, or difficulties in module assembly during subsequent use, and in severe cases, even cause safety risks such as thermal runaway.
[0003] Through in-depth analysis of current mainstream overcoating testing technologies, the inventors have discovered the following insurmountable technical bottlenecks: 1. Existing rule-based algorithms typically only utilize the average height or extreme values in the 2D elevation map output by the profilometer, ignoring the local morphology, edge gradient, and spatial distribution characteristics of the blue film battery cell surface, resulting in a significant waste of valuable information.
[0004] 2. Overmolding anomalies manifest in various forms, ranging from obvious abrupt changes (such as wrinkles) to gradual indentations or tiny air bubbles. Traditional algorithms based on fixed thresholds or simple geometric rules cannot cover all anomaly patterns and have poor adaptability.
[0005] 3. Elevation maps acquired by profilometers in industrial settings are often accompanied by random noise, stripe interference, or local distortion. Directly inputting the original elevation map into the model can lead to unstable detection results, while traditional denoising methods often blur minor abnormal features while removing noise.
[0006] 4. Industrial production lines typically require inspection systems to complete judgments within milliseconds. However, high-precision 3D contour data (TIF format) is massive in volume, and if complex deep learning models are used to process it directly, the inference speed often cannot keep up with the production line cycle time.
[0007] 5. Many existing inspection solutions only provide a binary judgment of "OK" or "NG", lacking quantitative analysis of the anomaly type, severity and specific size, and cannot provide process engineers with a basis for reverse optimization. Summary of the Invention
[0008] To address the problems in the background art, this invention proposes an anomaly detection method, system, equipment, and medium for battery cell production.
[0009] To achieve the above objectives, the present invention adopts the following technical solution: An anomaly detection method for battery cell production includes the following steps: Scan the area where the battery cell is coated with rubber to obtain an elevation map; Preprocessing the elevation map yields a pseudo-color image; The pseudo-color image is input into the segmentation model to obtain a binary mask of the abnormal coating area and the target detection box; Based on the pixel coordinates of the binary mask, target detection box, and elevation map, calculate the abnormal parameters of the coating abnormal area; The abnormal parameters are compared with the process range, the abnormality level is classified based on the comparison results, and data containing the coordinates, type and size of the abnormal area of the overmolding is generated.
[0010] Further, the area covered by the battery cell is scanned to obtain an elevation map, including the following steps: A laser profilometer is used to scan the battery cell coating area to obtain a 2D elevation map in 32-bit floating-point format. Each pixel value in the 2D elevation map represents the actual height of the corresponding spatial location.
[0011] Further, the elevation map is preprocessed to obtain a pseudo-color image, including the following steps: Perform a Laplace-Gaussian operation on the elevation map to obtain an enhanced elevation map; The enhanced elevation map is subjected to contrast-limited adaptive histogram equalization. The elevation map after histogram equalization is mapped to a three-channel pseudo-color image.
[0012] Furthermore, the pseudo-color image is input into the segmentation model to obtain a binary mask of the abnormal coating region and the target detection box, including the following steps: The pseudo-color image is normalized and then input into the YOLOv11-Seg segmentation model; Based on the YOLOv11-Seg segmentation model, feature extraction and fusion are performed on the normalized pseudo-color image to obtain a fused feature map. The fused feature map is input into the detection head of the YOLOv11-Seg segmentation model, and the bounding box coordinates, classification probability, and mask coefficients are output. Non-maximum suppression is applied to the bounding box coordinates, classification probabilities, and mask coefficients to obtain the optimal bounding box coordinates, classification probabilities, and mask coefficients. The original segmentation mask is obtained by using the optimal mask coefficients. The original segmentation mask is then cropped with the optimal bounding box range and scaled to the size of the elevation map to generate a binary mask of the overmolding anomaly region that is aligned with the pixels of the elevation map. The anomaly category label and corresponding confidence score are output based on the optimal classification probability. While obtaining the binary mask, the YOLOv11-Seg segmentation model outputs the target detection box surrounding the abnormal coating region.
[0013] Further, the abnormal parameters of the encapsulation abnormal region are calculated based on the pixel coordinates of the binary mask, the target detection frame and the elevation map, comprising the following steps: Align the pixel coordinates of the binary mask and the elevation map, extract the height values corresponding to all pixel coordinates in the encapsulation abnormal region, and calculate the height difference between the maximum height and the minimum height among the height values; Perform connected domain analysis based on the binary mask, and count the number of connected regions; Count the total number of pixels in the binary mask, and convert it in combination with the actual physical area of a single pixel to obtain the actual physical area of the encapsulation abnormal region; Convert the dimensions of the target detection rectangular frame by scaling to obtain the actual physical length and width of the encapsulation abnormal region; the height difference, the number of connected regions, the actual physical area and the actual physical length are all abnormal parameters of the encapsulation abnormal region.
[0014] Further, the abnormal parameters are compared with the process range, and the abnormal level is divided based on the comparison result, comprising the following steps: Setting the upper limit of the process range as a rejection threshold, and the lower limit as a warning threshold; If any abnormal parameter is greater than the rejection threshold, it is determined as a severe abnormal level; If any abnormal parameter is located between the rejection threshold and the warning threshold and all abnormal parameters are less than or equal to the rejection threshold, it is determined as a moderate abnormal level; If all abnormal parameters are less than the warning threshold, it is determined to be qualified.
[0015] An abnormality detection system for cell production, comprising: A scanning unit, configured to scan the cell encapsulation region to obtain an elevation map; A preprocessing unit, configured to preprocess the elevation map to obtain a pseudo-color image; An analysis unit, configured to input the pseudo-color image into a segmentation model to obtain a binary mask of the encapsulation abnormal region and a target detection frame; A calculation unit, configured to calculate the abnormal parameters of the encapsulation abnormal region based on the pixel coordinates of the binary mask, the target detection frame and the elevation map; An output unit, configured to compare the abnormal parameters with the process range, perform abnormal level division based on the comparison result, and generate data including the coordinates, type and size of the encapsulation abnormal region.
[0016] Further, the preprocessing unit comprises: A LOG module, which performs Laplacian of Gaussian operation on the elevation map to obtain an enhanced elevation map; An equalization module, configured to perform contrast-limited adaptive histogram equalization processing on the enhanced elevation map; The mapping module is used to map the histogram-equalized elevation map into a three-channel pseudo-color image.
[0017] An apparatus comprising: Memory, used to store computer programs; When a processor executes a computer program stored in memory, it implements the above-mentioned method for anomaly detection in battery cell production.
[0018] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method for anomaly detection in battery cell production.
[0019] The beneficial effects of this invention are: 1. This invention is based on elevation map scanning and acquisition, preprocessing, model segmentation, parameter calculation and grade determination. It abandons the traditional rule algorithm that only extracts the average height and extreme values of the elevation map. It makes full use of the pixel information of the elevation map of the battery cell coating area. It can retain key features such as the local morphology, edge gradient and spatial distribution of the blue film surface of the battery cell, avoids the problem of a large amount of effective information being discarded, and solves the technical problem of the traditional detection algorithm having a single dimension of information utilization and wasting effective information. 2. This invention intelligently identifies abnormal areas in the coating process through a segmentation model, and can simultaneously adapt to highly abrupt defects (wrinkles, bubbles, etc.), covering various defect types in the cell coating process. It breaks through the bottleneck of traditional algorithms having a narrow abnormal coverage range and being unable to adapt to diverse abnormal scenarios, and significantly improves the versatility and adaptability of the detection algorithm in complex industrial production scenarios. 3. This invention avoids the drawback of traditional denoising algorithms that cause the loss of minute defect features due to excessive smoothing by using elevation maps as a preprocessing step, thus ensuring the image quality of the input detection model and improving the stability and accuracy of the detection results of coating anomalies under complex industrial interference environments.
[0020] 4. This invention uses the YOLOv11-Seg segmentation model to complete anomaly detection. Its data is a 2D elevation map, which avoids the problems of large data volume of high-precision 3D contour data and slow inference speed of complex deep learning models. It realizes fast inference response of the detection process, matches the millisecond-level real-time detection requirements of industrial production lines, and solves the engineering problem that traditional high-precision detection solutions cannot adapt to the pace of mass production.
[0021] 5. This invention abandons the traditional detection method that only outputs a binary result of pass / fail. By calculating multi-dimensional parameters such as abnormal height difference, defect area, size, and number of connected components, and combining them with process thresholds, it completes a fine classification of abnormality levels, and can accurately output structured data such as the coordinates, type, size, and severity level of abnormal areas.
[0022] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description and the drawings. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A schematic diagram of an anomaly detection method for battery cell production according to the present invention is shown. Figure 2 A system framework diagram of an anomaly detection method for battery cell production according to the present invention is shown. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] like Figure 1 As shown, this invention proposes an anomaly detection method for battery cell production, comprising the following steps: S1: Scan the area of the battery cell coating to obtain an elevation map.
[0027] S2: Preprocess the elevation map to obtain a pseudo-color image.
[0028] S3: Input the pseudo-color image into the segmentation model to obtain the binary mask of the abnormal coating area and the target detection box.
[0029] S4: Calculate the abnormal parameters of the coating abnormal area based on the pixel coordinates of the binary mask, target detection box and elevation map.
[0030] S5: Compare the abnormal parameters with the process range, classify the abnormality level based on the comparison results, and generate data containing the coordinates, type and size of the abnormal area of the overmolding.
[0031] It should be noted that the above solution uses elevation maps to compensate for the lack of depth information in ordinary 2D visible light images. It can identify morphological defects such as bulges, warping, and uneven adhesive thickness that are difficult to distinguish using only planar images. It eliminates the pain points of manual inspection, such as strong subjectivity, low efficiency, and high false negative rate. It can realize defect location, quantitative assessment and automatic classification, which can quickly screen defective cells online, stabilize the quality of cell production, reduce material scrap and loss, and promote the automation of cell coating quality inspection.
[0032] Furthermore, S1 specifically includes the following steps: A laser profilometer is used to scan the battery cell coating area to obtain a 2D elevation map in 32-bit floating-point format. In this process, each pixel value in the 2D elevation map represents the actual height of its corresponding spatial location, ensuring data accuracy. The image size and scanning precision are set according to the production line configuration to adapt to the needs of different production scenarios.
[0033] Furthermore, S2 includes the following steps: S201: Perform a Laplacian of Gaussian (LoG) operation on the elevation map. Through the Laplacian of Gaussian algorithm, highlight the edges of the blue film, regions of abrupt height changes, and local depressions or accumulation patterns to obtain an enhanced elevation map. This enhanced elevation map can enhance the high-frequency features of anomalies and make small height changes more significant.
[0034] Optionally, the calculation process for processing a two-dimensional elevation map using the Laplace operator of Gauss is as follows: 1) Definition of Gaussian function Let the height of any point on the 2D elevation map be H(x,y), where x and y represent the horizontal and vertical coordinates in pixel space.
[0035] The two-dimensional Gaussian function is defined as: ; in, The standard deviation is Gaussian, used to control the smoothing scale. Its value is set according to the typical spatial dimensions of anomalies in the overmolding process. This represents a two-dimensional Gaussian function.
[0036] 2) Definition of the Laplace operator Two-dimensional Laplace operator ² is defined as: ; In the formula, This represents the second-order partial derivative of the elevation data in the x-direction (lateral direction); The second partial derivative of elevation data in the y-direction (vertical direction) is represented; the first derivative reflects the "slope" of the elevation, while the second derivative reflects the "rate of change" (curvature) of the slope. Therefore, the Laplacian operator is very sensitive to edges, abrupt changes, and extreme points (such as bumps or depressions on a rubber-coated surface) in an image, and is often used to extract high-frequency details.
[0037] The Laplacian operator can reflect second-order spatial transformations of an image and is highly sensitive to edges, abrupt changes, and local morphological changes.
[0038] 3) Laplace of Gauss (LoG) operator The Laplace operator for Gauss is defined as the second derivative of a Gaussian function: ; In the formula, The Gaussian Laplacian operator is a composite operator that combines Gaussian smoothing and Laplacian edge detection.
[0039] Applying it to the elevation map H(x,y) yields the enhanced high-frequency characteristic response map: ; in" " indicates a two-dimensional convolution operation; This represents the high-frequency characteristic response map output after processing by the LoG operator. In this map, areas with larger values typically correspond to anomalous abrupt changes on the overmolded surface.
[0040] 4) In engineering implementation, to improve computational efficiency, an equivalent discrete implementation method is adopted: a. Apply Gaussian filtering to the original elevation map: ;in, This is the elevation map after Gaussian smoothing.
[0041] b. Apply the discrete Laplace operator to the smoothed elevation map: ; The above processing flow can be implemented using C++ low-level operators of industrial vision libraries such as OpenCV, which has the advantages of high computational efficiency and strong stability, and is suitable for industrial online real-time detection scenarios.
[0042] S202: Perform Contrast-Limited Adaptive Histogram Equalization (CLAHE) on the enhanced elevation map. This operation not only enhances local contrast but also effectively suppresses global height shifts caused by device drift, thereby improving the visibility of small anomaly areas and further enhancing detection accuracy.
[0043] S203: Map the histogram-equalized elevation map to a three-channel pseudo-color image. Specifically, map the feature-enhanced single-channel elevation feature map to a three-channel pseudo-color image (RGB). Based on the standard height range of the overmolding process, different height intervals are set, and different height intervals are mapped to different color gradients. For example, the standard height can be mapped to green, excessively high heights to red, and excessively low heights to blue. This process preserves spatial continuity and morphological structure, generating a pseudo-color image that contains true height information and meets the input requirements of a deep learning model.
[0044] It should be noted that preprocessing can significantly enhance the detection of various defects in the 2D elevation map, preventing the loss of minute defect features. Furthermore, the contrast-limited adaptive histogram equalization process first divides the enhanced LoG elevation map into multiple non-overlapping local tile blocks, separately calculating the grayscale histogram of elevation pixels within each block. A contrast threshold is set to crop the number of pixels exceeding the limit in the histogram to avoid excessive amplification of noise and global device height shift. Then, based on the cropped histogram, a cumulative distribution function is calculated to perform local grayscale stretching of a single block, amplifying the local contrast of minor unevenness defects on the overlay surface. Finally, bilinear interpolation is used to smooth the boundaries of each block, eliminating segmentation faults. The final output is an enhanced elevation map with a natural overall transition, clearly highlighting minor anomalies, and unaffected by overall device height drift, effectively improving the accuracy of subsequent defect detection.
[0045] Furthermore, S3 is the segmentation and inference stage for abnormal targets in the overmolding process. It employs a lightweight semantic segmentation network model, such as the lightweight UNet or YOLO series, and converts the model to ONNX format to support cross-platform inference. The pseudo-color image is input into the segmentation model for pixel-level classification and inference. The final output is a binary mask of the abnormal overmolding region, which marks the location of anomalies such as missing glue, bubbles, and wrinkles.
[0046] Taking YOLOv11-Seg as an example, it replaces traditional semantic segmentation networks. Its advantages are that it can not only segment abnormal regions at the pixel level, but also predict the category of abnormality (such as "wrinkles", "bubbles", "missing glue") and bounding box at the same time, covering various defect types in the cell encapsulation process. It is applicable to various scenarios, facilitates subsequent quantitative calculation and process localization, and the YOLOv11-Seg segmentation model has a fast response and high detection accuracy.
[0047] The inference framework of YOLOv11-Seg is as follows: A [Pseudocolor image input] --> B [Preprocessing normalization / scaling]; B-->C [Backbone Network: Feature Extraction]; C-->D [Neck network: Multi-scale feature fusion]; D-->E [Detection Head: Predicted Bounding Box / Class / Prototype]; E-->F[Mask Header: Generates instance masks based on prototypes]; F-->G [Post-processing: NMS / scaling restoration]; G-->H [Output: Anomaly Mask / Category / Location]; The entire inference process of S3 based on YOLOv11-Seg includes the following steps: S301: Normalize the pseudo-color image and input it into the YOLOv11-Seg segmentation model. Specifically, YOLOv11n-Seg (nano version) is selected as the baseline model because it has a small number of parameters, fast inference speed, and meets the real-time requirements of industry. Input the pseudo-color RGB image generated in the previous steps (original image size is 3120x1960), first normalize it (pixel value / 255.0) and resize it (1280x1280) to match the model input layer.
[0048] S302: Based on the YOLOv11-Seg segmentation model, feature extraction and fusion are performed on the normalized pseudo-color image to obtain a fused feature map. Specifically, the normalized pseudo-color image is fed into the backbone network (ModifiedCSPDarknet) to extract multi-level feature maps. The neck network fuses these feature maps to construct rich semantic information, enabling the model to simultaneously focus on large-scale background and subtle local anomalies.
[0049] S303: The fused feature map is input into the detection head of the YOLOv11-Seg segmentation model. Each detection head outputs bounding box coordinates, classification probabilities, and mask coefficients. (x, y, w, h) is used to coarsely locate anomalous regions, where x represents the ratio of the bounding box center point's horizontal coordinate to the image width; y represents the ratio of the bounding box center point's vertical coordinate to the image height; w represents the ratio of the bounding box's width to the overall image width; and h represents the ratio of the bounding box's height to the overall image height. The classification probability is used to predict the probability that the region belongs to each anomalous category (e.g., P(wrinkle), P(bubble)). The mask coefficients are a set of coefficients used to linearly combine with shared prototypes (MaskPrototypes) learned from the mask prototype to generate a custom mask for that instance. This is key to YOLOv11-Seg's efficient instance segmentation.
[0050] S304: Non-Maximum Suppression (NMS) is performed on the bounding box coordinates, classification probabilities, and mask coefficients to obtain the optimal bounding box coordinates, classification probabilities, and mask coefficients. Then, the original segmentation mask is obtained using the optimal mask coefficients. The original segmentation mask is cropped to the optimal bounding box range and scaled to the elevation map size to generate a binary mask of the coating anomaly region aligned with the elevation map pixels. Anomaly category labels and corresponding confidence scores are output based on the optimal classification probabilities. Simultaneously with obtaining the binary mask, the YOLOv11-Seg segmentation model outputs target detection boxes surrounding the coating anomaly region.
[0051] It should be noted that when the model detects targets, the same abnormal defect in the coating will generate multiple overlapping bounding boxes. Each box has its own coordinates, classification confidence, and mask coefficient. Non-maximum suppression is a set of filtering algorithms: this algorithm only retains the best box with the highest confidence and deletes redundant boxes that overlap on the same defect. In the end, each abnormal defect outputs only a unique set of bounding boxes, classification probabilities, and mask coefficients.
[0052] Furthermore, S4 includes the following steps: S401: Align the pixel coordinates of the binary mask with the elevation map, extract the height values corresponding to all pixel coordinates in the abnormal area of the adhesive coating, and calculate the height difference between the maximum and minimum height values.
[0053] S402: Perform connected component analysis based on binary masks and count the number of connected regions (sorting out independent outlier blocks).
[0054] S403: Count the total number of pixels within the binary mask, and calculate the actual physical area of the abnormal area of the adhesive coating by combining the actual physical area of a single pixel.
[0055] S404: The actual physical length and width of the abnormal coating region are obtained by scaling the size of the target detection rectangle; the height difference, the number of connected regions, the actual physical area and the actual physical length are all abnormal parameters of the abnormal coating region.
[0056] It should be noted that in S404, the scaling ratio between the image pixel size and the actual object size is calculated using the pre-set physical resolution of the profilometer. By counting the total number of pixels contained in the segmentation mask and multiplying it by the actual physical area corresponding to a single pixel (i.e., the square of the scaling ratio), the actual physical area of the abnormal region can be calculated. Furthermore, since the YOLOv11n-seg model outputs both the pixel-level segmentation mask and the bounding box (rectangular box) surrounding the abnormal region, the pixel length and width of this bounding box in the image can be directly obtained. Combined with the aforementioned scaling ratio, the length and width of the abnormal region in actual physical space can be calculated. These quantified parameters, which integrate the true height and actual size, provide accurate data support for subsequent process optimization.
[0057] Furthermore, S5 includes the following steps: S501: Set the upper limit of the process range as the rejection threshold and the lower limit as the warning threshold; S502: If any abnormal parameter exceeds the rejection threshold, it is judged as a severe abnormality; if any abnormal parameter is between the rejection threshold and the warning threshold and all abnormal parameters are less than or equal to the rejection threshold, it is judged as a moderate abnormality; if all abnormal parameters are less than the warning threshold, it is judged as acceptable. For example, when key parameters such as maximum height difference or abnormal area exceed the rejection threshold, it is judged as a serious abnormality; when parameters exceed the warning threshold but do not reach the rejection threshold, or when multiple non-critical parameters are simultaneously in the warning range, it is judged as a moderate abnormality; when all parameters are below the warning threshold, it is judged as acceptable. Through this graded judgment mechanism based on the degree of exceeding the standard, the system can quickly identify defects that pose a serious threat to the safety of the battery cell and immediately trigger countermeasures such as rejection or line stop alarm; while for mild and moderate abnormalities, they are recorded and warned, thereby effectively controlling quality risks while avoiding excessive scrapping, and providing process engineers with quantitative indicators of defect deterioration trends to assist them in closed-loop optimization of process parameters.
[0058] It should be noted that the structured data generated by S5, including defect location, type, and size, is used for subsequent process feedback and SPC (Statistical Process Control) analysis. Through this closed-loop process, production processes can be continuously optimized and product quality improved.
[0059] like Figure 2The diagram shows an anomaly detection system for battery cell production, comprising a scanning unit, a preprocessing unit, an analysis unit, a calculation unit, and an output unit. The scanning unit scans the battery cell's coating area to obtain an elevation map; the preprocessing unit preprocesses the elevation map to obtain a pseudo-color image; the analysis unit inputs the pseudo-color image into a segmentation model to obtain a binary mask and target detection boxes for the coating anomaly area; the calculation unit calculates the anomaly parameters of the coating anomaly area based on the pixel coordinates of the binary mask, target detection boxes, and the elevation map; and the output unit compares the anomaly parameters with the process range, classifies the anomaly level based on the comparison results, and generates data containing the coordinates, type, and size of the coating anomaly area.
[0060] Furthermore, the preprocessing unit includes a LOG module, an equalization module, and a mapping module. The LOG module performs a Laplacian Gaussian operation on the elevation map to obtain an enhanced elevation map; the equalization module performs contrast-limited adaptive histogram equalization on the enhanced elevation map; and the mapping module maps the histogram-equalized elevation map into a three-channel pseudo-color image.
[0061] It should be noted that, regarding system acceleration and industrial deployment, the image preprocessing stage utilizes OpenCVC++ library functions to accelerate underlying operators, fully leveraging the high performance of the C++ language. The inference stage loads the model based on the ONNXRuntime engine, utilizing the multi-core parallel computing capabilities of the CPU to further improve inference speed. Simultaneously, a multi-threaded pipeline architecture is adopted, distributing image acquisition, preprocessing, inference, and result output across different threads to achieve parallel processing, ensuring that the overall system latency is lower than the production line cycle time and meeting industrial real-time requirements. It should be further noted that, for the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to in the description of the method embodiment. The various units and modules of an anomaly detection system for battery cell production are divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each unit are only for easy distinction and are not used to limit the scope of protection of the present invention.
[0062] This invention discloses a device comprising: Memory, used to store computer programs; When a processor executes a computer program stored in memory, it implements the above-mentioned method for anomaly detection in battery cell production.
[0063] It should be noted that the memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device.
[0064] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0065] The present invention also discloses a computer-readable storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the above-described method for anomaly detection in battery cell production.
[0066] It should be noted that the computer-readable storage medium may be included in the device / apparatus described in the above embodiments; or it may exist independently and not assembled into the device / apparatus. The computer-readable storage medium carries one or more programs, which, when executed, implement an anomaly detection method for battery cell production according to an embodiment of the present invention.
[0067] According to embodiments of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as: a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0068] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An anomaly detection method for battery cell production, characterized in that, Includes the following steps: Scan the area where the battery cell is coated with rubber to obtain an elevation map; Preprocessing the elevation map yields a pseudo-color image; The pseudo-color image is input into the segmentation model to obtain a binary mask of the abnormal coating area and the target detection box; Based on the pixel coordinates of the binary mask, target detection box, and elevation map, calculate the abnormal parameters of the coating abnormal area; The abnormal parameters are compared with the process range, the abnormality level is classified based on the comparison results, and data containing the coordinates, type and size of the abnormal area of the overmolding is generated.
2. The anomaly detection method for battery cell production according to claim 1, characterized in that, Scanning the battery cell's coating area to obtain an elevation map includes the following steps: A laser profilometer is used to scan the battery cell coating area to obtain a 2D elevation map in 32-bit floating-point format. Each pixel value of the 2D elevation map represents the actual height of the corresponding spatial location.
3. The anomaly detection method for battery cell production according to claim 2, characterized in that, Preprocessing the elevation map to obtain a pseudo-color image includes the following steps: Perform a Laplace-Gaussian operation on the elevation map to obtain an enhanced elevation map; The enhanced elevation map is subjected to contrast-limited adaptive histogram equalization. The elevation map after histogram equalization is mapped to a three-channel pseudo-color image.
4. The anomaly detection method for battery cell production according to claim 1, characterized in that, The pseudo-color image is input into the segmentation model to obtain a binary mask of the abnormal coating region and the target detection box, including the following steps: The pseudo-color image is normalized and then input into the YOLOv11-Seg segmentation model; Based on the YOLOv11-Seg segmentation model, feature extraction and fusion are performed on the normalized pseudo-color image to obtain a fused feature map. The fused feature map is input into the detection head of the YOLOv11-Seg segmentation model, and the bounding box coordinates, classification probability, and mask coefficients are output. Non-maximum suppression is applied to the bounding box coordinates, classification probabilities, and mask coefficients to obtain the optimal bounding box coordinates, classification probabilities, and mask coefficients. The original segmentation mask is obtained by using the optimal mask coefficients. The original segmentation mask is then cropped with the optimal bounding box range and scaled to the size of the elevation map to generate a binary mask of the overmolding anomaly region that is aligned with the pixels of the elevation map. The anomaly category label and corresponding confidence score are output based on the optimal classification probability. While obtaining the binary mask, the YOLOv11-Seg segmentation model outputs the target detection box surrounding the abnormal coating region.
5. The anomaly detection method for battery cell production according to claim 1, characterized in that, Based on the pixel coordinates of the binary mask, target detection box, and elevation map, the abnormal parameters of the overmolding abnormal region are calculated, including the following steps: Align the binary mask with the pixel coordinates of the elevation map, extract the height values corresponding to all pixel coordinates in the abnormal area of the rubber coating, and calculate the height difference between the maximum and minimum height values. Connectivity analysis is performed based on binary masks to count the number of connected regions. The total number of pixels within the binary mask is counted, and the actual physical area of the abnormal area of the adhesive coating is calculated by combining the actual physical area of a single pixel. The actual physical length and width of the abnormal coating region are obtained by scaling the size of the target detection rectangle; the height difference, the number of connected regions, the actual physical area and the actual physical length are all abnormal parameters of the abnormal coating region.
6. The anomaly detection method for battery cell production according to claim 1, characterized in that, The abnormal parameters are compared with the process range, and the abnormality level is classified based on the comparison results, including the following steps: setting the upper limit of the process range as a rejection threshold and the lower limit as a warning threshold; if any abnormal parameter is greater than the rejection threshold, it is determined as a severe abnormality level; if any abnormal parameter is between the rejection threshold and the warning threshold and all abnormal parameters are less than or equal to the rejection threshold, it is determined as a moderate abnormality level; if all abnormal parameters are less than the warning threshold, it is determined to be qualified.
7. An anomaly detection system for battery cell production, characterized in that, comprising: a scanning unit, configured to scan the glue-wrapping area of the cell to obtain a elevation map; a preprocessing unit, configured to preprocess the elevation map to obtain a pseudo-color image; an analysis unit, configured to input the pseudo-color image into a segmentation model to obtain a binary mask of the glue-wrapping abnormal area and a target detection frame; a calculation unit, configured to calculate the abnormal parameter of the glue-wrapping abnormal area based on the pixel coordinates of the binary mask, the target detection frame and the elevation map; an output unit, configured to compare the abnormal parameter with the process range, perform abnormality level classification based on the comparison result, and generate data including the coordinates, type and size of the glue-wrapping abnormal area.
8. The anomaly detection system for battery cell production according to claim 7, characterized in that, The preprocessing unit comprises: a LOG module, configured to perform Laplacian of Gaussian operation on the elevation map to obtain an enhanced elevation map; an equalization module, configured to perform contrast limited adaptive histogram equalization processing on the enhanced elevation map; a mapping module, configured to map the elevation map after the histogram equalization processing into a three-channel pseudo-color image.
9. A device, characterized in that, comprising: a memory, configured to store a computer program; a processor, configured to, when executing the computer program stored in the memory, implement the abnormality detection method for cell production according to any one of claims 1 to 6.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by a processor, implements the abnormality detection method for cell production according to any one of claims 1 to 6.
