Lithium battery appearance defect automatic detection method based on machine vision
By using an improved liquid neural network to model lithium battery appearance defects from multiple angles and fine-tune parameters online, the problem of insufficient adaptability of existing detection methods under complex lighting and multiple angles is solved, and efficient and reliable lithium battery appearance detection is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-03-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing lithium battery appearance inspection methods rely on manual visual inspection or traditional image processing, which are inefficient and the inspection results depend on human experience, making it difficult to meet the needs of large-scale high-speed production. Furthermore, existing deep learning methods are not adaptable to complex lighting conditions and multiple angles, resulting in serious missed detections and false detections.
An improved liquid neural network is used to construct a spatiotemporal feature sequence from multi-angle images for dynamic modeling. Combined with the results of manual sampling inspection, online parameter fine-tuning is performed to achieve accurate capture of defects that change with angle and illumination, reduce false detections, and adapt to changes in process conditions of different batches.
It significantly improves the automation level and reliability of lithium battery appearance inspection, effectively identifies low-contrast and small-size defects, meets the real-time requirements of high-speed production lines, reduces the false negative rate, and maintains the stability of inspection results.
Smart Images

Figure CN121724964A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of machine vision and intelligent detection, and particularly relates to a lithium battery appearance defect automatic detection method based on machine vision. BACKGROUND
[0002] With the wide application of lithium batteries in new energy vehicles, energy storage power stations and consumer electronics, etc., the quality control in the production process is particularly important. Lithium batteries are prone to produce appearance defects such as scratches, stains, bulges, indentations and tab edge lifting during the manufacturing process. If not detected and removed in time, it will directly affect the consistency and safety of the battery. At present, the appearance detection on the production line mainly relies on manual inspection or traditional image processing methods, which has the problems of low efficiency, detection results depending on manual experience and insufficient consistency, and is difficult to meet the needs of large-scale high-speed production.
[0003] In recent years, deep learning methods have been gradually applied to battery appearance defect detection, but existing methods generally rely on static image recognition models such as convolutional neural networks, which have insufficient adaptability to complex lighting conditions, weak contrast defects and dynamic changes under multiple angles, resulting in serious missed detection and false detection. At the same time, such models lack self-adaptive ability when facing different batch process conditions, and the stability of the detection results is poor.
[0004] Therefore, how to provide a lithium battery appearance defect automatic detection method based on machine vision is a problem that those skilled in the art need to solve. SUMMARY
[0005] One object of the present application is to provide a lithium battery appearance defect automatic detection method based on machine vision. The present application introduces an improved liquid neural network to dynamically model the spatio-temporal feature sequence constructed by multi-angle images, which can accurately depict the evolution law of defects with angle and illumination changes, effectively identify low-contrast and small-size defects and reduce false detection caused by illumination reflection or local occlusion. At the same time, the network is fine-tuned online by combining with artificial sampling results, so that the model has self-adaptive optimization ability, which not only guarantees the detection accuracy and robustness, but also meets the real-time demand of high-speed production line, thereby significantly improving the automation level and reliability of lithium battery appearance detection.
[0006] According to the lithium battery appearance defect automatic detection method based on machine vision of the present application, the following steps are included: acquiring multi-angle images of the surface of the lithium battery by an industrial camera arranged on a lithium battery production line; performing preprocessing operations including normalization, denoising and contrast enhancement on the multi-angle images of the surface; The pre-processed image is divided into multiple local area blocks, and a spatio-temporal feature sequence representing the evolution of defects with changes in angle and light is generated according to the pixel difference and texture change between multi-angle images; The spatio-temporal feature sequence is input into an improved liquid neural network, which introduces a defect spatio-temporal evolution modeling mechanism, and outputs the defect category and defect probability of each local area; Based on the defect category and defect probability, a detection result containing defect position, category and confidence is generated; The detection result is output, and the liquid neural network is fine-tuned based on the artificial sampling result.
[0007] Further, the industrial camera includes a top-view camera located directly above the lithium battery, side-view cameras located on both sides of the battery, and oblique-view cameras arranged at an inclined angle, which respectively capture images of the front, side and edge regions of the battery surface.
[0008] Further, the pre-processing operation includes: A normalization method based on illumination intensity histogram matching is used to perform brightness equalization on images under different shooting angles; A non-local mean filtering based denoising algorithm is used to eliminate surface reflection and sensor noise interference; An adaptive histogram equalization based local contrast enhancement method is used to highlight small scratches or indentations in low contrast areas.
[0009] Further, the construction of the spatio-temporal feature sequence includes: The pre-processed image is divided into local area blocks of fixed size; Based on the pixel difference between multi-angle images, local mean and variance changes are calculated to form difference features representing brightness changes; Based on the texture change between multi-angle images, local direction gradient histogram and gray level co-occurrence matrix features are calculated; The difference features and texture features are combined in time sequence to generate a spatio-temporal feature sequence representing the evolution of defects with changes in angle and light.
[0010] Further, after receiving the spatio-temporal feature sequence, the improved liquid neural network performs the following steps in sequence: The pre-processed spatio-temporal feature sequence is input into the improved liquid neural network, and each unit of the network performs dynamic update on the input features based on the state equation to form a hidden state representation carrying multi-angle evolution information; On the basis of the hidden state, a classification subunit is arranged, the classification subunit is a combination of a full connection layer and a Softmax classifier, the hidden state is projected to a predefined defect category set, the defect category includes scratches, stains, bulges, indentations and tab edge lifting, and a defect category label corresponding to each local region is obtained at an output end.
[0011] On the basis of the output of the classification subunit, confidence of each category is further calculated through a probability estimation subunit, the probability estimation subunit corrects the classification result based on Bayesian posterior inference; A defect spatiotemporal evolution modeling mechanism is introduced into the state equation, and a spatiotemporal consistency constraint term is added between adjacent angular image features.
[0012] Further, the defect spatiotemporal evolution modeling mechanism includes: A spatiotemporal consistency constraint term is introduced between time sequence features corresponding to continuous angular images; A state variable is updated based on a dynamic difference evolution parameter between adjacent features, so as to simulate a dynamic trajectory of a defect with changes in illumination and viewing angle; Evolution curves of the same regional block under multiple angles are fitted, and the fitting result is fed back to the state equation as auxiliary features, and a defect category and a defect probability of each local region are output.
[0013] Further, the improved liquid neural network includes: A hierarchical structure: A bottom unit: small scratch, indentation high-frequency evolution features are quickly modeled; A middle unit: surface stains are dynamically tracked; A high unit: bulges and tab edge lifting low-frequency slow evolution defects are globally modeled.
[0014] Further, the generation of the detection result includes: The defect probability is mapped back to the original image coordinate system, and when the defect probability exceeds a set threshold, the region is marked as a candidate defect region in each local region block; Edge detection and region growing operations are performed on the candidate defect region to determine the accurate boundary of the defect: For small scratch defects, a direction gradient operator is used to extract a linear boundary; For bulge and tab edge lifting defects, a region connectivity analysis is used to extract a planar boundary; On the basis of the boundary extraction result, in combination with the defect category label output by the classification subunit, the specific category of each candidate defect is determined, including scratches, stains, bulges, indentations and tab edge lifting; The confidence is obtained by fusing two parts of information: The first part is a defect probability output by the liquid neural network; The second part is a consistency index of the defect boundary and the original feature; The two parts are fused by weighting to obtain a final defect confidence value; The final detection result includes the position coordinates of the defect, the category label and the corresponding confidence value.
[0015] Further, the parameter fine-tuning comprises: The detection result includes the defect position, the defect category and the confidence, which are written into the production management system database through the quality inspection interface module and displayed in a visual form on the monitoring terminal; In the production link, the quality inspection personnel perform artificial sampling inspection on part of the battery samples to form a data set with real defect labels; The artificial sampling inspection result is compared with the detection result output by the liquid neural network: If the detection result is consistent with the artificial labeling, the high-confidence sample is added to the confirmation set; If the detection result is inconsistent with the artificial labeling, the error sample is added to the correction set; The error sample and the confirmation sample are jointly input into the online learning module of the liquid neural network, and the incremental training method is adopted to fine-tune the classification subunit, the probability estimation subunit and the dynamic correction parameter.
[0016] The beneficial effects of the present application are: The present application realizes the accurate capture of the evolution law of the defect with the change of the angle and the light by introducing the improved liquid neural network to dynamically model the space-time feature sequence constructed from the multi-angle image of the surface of the lithium battery. Compared with the traditional convolutional neural network detection method, the present application can effectively identify the difficult-to-find defects such as low-contrast, small-size scratches, indentations and slight bulges, and significantly reduce the missed detection rate. At the same time, the state updating method based on the space-time consistency constraint can reduce the false detection caused by light reflection or local occlusion, so that the detection result remains stable under complex working conditions.
[0017] The present application utilizes the detection result and the artificial sampling inspection result to construct a feedback closed loop to fine-tune the parameters of the liquid neural network online, thereby having the self-adaptive optimization capability and being able to adapt to the changes of different batches of batteries and production line conditions. The method has low computational overhead while ensuring the detection accuracy, meets the real-time demand of high-speed detection of the production line, and overall improves the automation level and reliability of the appearance detection of the lithium battery, thereby providing a strong guarantee for the large-scale manufacturing and quality control of the battery industry. BRIEF DESCRIPTION OF DRAWINGS
[0018] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0019] Fig. 1 This is a flowchart of an automatic detection method for appearance defects of lithium batteries based on machine vision proposed in this invention. Fig. 2 This is a schematic diagram of an improved liquid neural network for an automatic detection method of lithium battery appearance defects based on machine vision proposed in this invention. Detailed Implementation
[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0021] refer to Figs. 1-2 An automatic detection method for appearance defects in lithium batteries based on machine vision includes the following steps: Multiple industrial cameras are deployed on the lithium battery production line, including a top-view camera positioned directly above the battery, side-view cameras located on both sides of the battery, and a slanted camera positioned at a 45° angle, to acquire images of the front, sidewall, and edge of the battery surface, respectively. To reduce surface reflection interference, a combination of ring linear light source and polarized light source is used for illumination. The acquired images are normalized, denoised, and contrast enhanced. Normalization uses a brightness equalization method based on histogram matching to eliminate brightness differences between different cameras. Denoising uses a nonlocal mean filtering algorithm to suppress sensor noise and reflection artifacts. Contrast enhancement uses adaptive histogram equalization to highlight small scratches or indentations in low-contrast areas. The preprocessed image is divided into several fixed-size local regions. Brightness difference features are extracted based on the differences in pixel mean and variance between images from multiple angles. Simultaneously, texture evolution features are extracted based on the histogram of oriented gradients and the gray-level co-occurrence matrix. These features are combined in angular order to generate a spatiotemporal feature sequence representing the evolution of defects with changes in angle and illumination.
[0022] The spatiotemporal feature sequence is input into an improved liquid neural network. A defect spatiotemporal evolution modeling mechanism is introduced into the state equation of the network units. Specifically, this includes: adding a spatiotemporal consistency constraint term between adjacent angular features to maintain the coherence of defect representation; introducing a dynamic difference correction parameter to adjust the state update rate according to the feature differences between angles to simulate the evolution trajectory of the defect; and adding a regularization factor during the state update process to avoid overfitting and maintain model stability. After network processing, a hidden state representation containing evolutionary information is obtained. Based on the defect category and defect probability, a detection result containing defect location, category, and confidence level is generated. The detection result is output, and the parameters of the liquid neural network are fine-tuned in conjunction with manual sampling results.
[0023] Based on the hidden states, a classification subunit and a probability estimation subunit are set up. The classification subunit maps the hidden states to a predefined set of defect categories, including scratches, stains, bulges, indentations, and electrode warping. The probability estimation subunit corrects the classification results based on Bayesian inference and outputs the defect probability, reflecting the confidence level of the defect's existence.
[0024] The defect category and defect probability are combined and mapped back to the original image coordinate system, outputting detection results that include defect location, category, and confidence level. For candidate regions, defect boundaries are further extracted using edge detection and region growing methods to generate accurate defect masks.
[0025] The detection results are written into the production quality inspection system via an interface module and visualized on the monitoring terminal. The system simultaneously collects manual sampling results and compares them with the automatic detection results to form confirmation and correction samples. The improved liquid neural network uses these samples to perform incremental training, fine-tuning the classification weights, probability estimation parameters, and evolutionary modeling correlation coefficients to achieve continuous optimization of the detection model.
[0026] In this embodiment, the industrial camera includes: Top-down camera: Located directly above the center of the lithium battery, used to capture a full frontal image of the battery surface; Side-view cameras: Located on both sides of the battery and arranged perpendicularly to the battery surface, used to acquire images of the battery's side wall areas; Slanted camera: positioned at an angle (preferably within the range of 30°–60°, specifically 45°) above the battery to capture images of the battery's edge and areas that are not easily observed from above or to the side.
[0027] The images acquired by the aforementioned multi-angle cameras cover the front, sides, and edges of the battery, ensuring that defects in different areas, such as minor scratches, electrode warping, and bulges, can be captured. To reduce surface reflection interference, a combination of ring-shaped linear light source and polarized light source illumination is preferably configured around the camera.
[0028] In this embodiment, the preprocessing operation includes: A normalization method based on illumination intensity histogram matching is adopted. Specifically, the brightness histogram of the target image is matched with the brightness histogram of the reference image. By calculating the cumulative distribution function (CDF) and constructing a lookup table, the pixel gray levels of the target image are mapped to the corresponding gray levels of the reference histogram, thereby achieving brightness balance of images from different angles.
[0029] A denoising algorithm based on nonlocal mean filtering is adopted. Specifically, for the target pixel ppp, multiple similar block regions are searched in the image, the Euclidean distance between these regions and the reference block containing ppp is calculated, and the pixel values of the similar blocks are weighted by a Gaussian weighting function to replace the original value of the pixel ppp, thereby effectively removing random noise and specular reflection noise;
[0030] A local contrast enhancement method based on adaptive histogram equalization (CLAHE) is adopted. Specifically, the input image is divided into several small blocks, and histogram equalization is performed on each block separately. A limit threshold is set on the amplitude of the histogram to avoid noise amplification caused by over-enhancement. Finally, the local enhancement results are stitched together into a complete image through bilinear interpolation, thereby highlighting fine scratches or indentations in low-contrast areas.
[0031] In this embodiment, the construction of the spatiotemporal feature sequence includes: The preprocessed image is divided into multiple local region blocks of a fixed size (preferably 32×32 pixels). Each region block serves as an independent analysis unit for subsequent feature calculation. For images of the same local area taken from different shooting angles, calculate the mean and variance of pixel gray levels, and take the difference between adjacent angles as the difference feature: The difference in grayscale mean is used to characterize the change in overall brightness with angle; Gray-level variance difference is used to characterize changes in local texture intensity; When the difference value exceeds the preset threshold, it indicates that there is a possible reflection anomaly or defect in the area.
[0032] Based on the texture changes of the same local region across multiple image angles, calculate: Histogram of Oriented Gradients (HOG): A histogram that statistically analyzes the distribution of pixel gradient directions and magnitudes within a region to characterize the directional features of linear scratches. Gray-level co-occurrence matrix (GLCM): Statistically calculates the co-occurrence frequency of gray values under specified pixel spacing and orientation, and extracts statistical quantities such as energy, contrast and homogeneity to characterize surface texture features such as stains and indentations.
[0033] The differential features and texture features are combined sequentially according to angle to form a multidimensional vector sequence. This sequence not only contains the static attributes of each local region, but also describes the dynamic evolution trajectory of the defect as the angle and illumination change. Finally, it serves as the input to the improved liquid neural network.
[0034] In this embodiment, after receiving the spatiotemporal feature sequence, the improved liquid neural network performs the following steps in sequence: The region feature vector at each time step Input network unit; Network elements are updated based on improved state equations: ; in, In hidden state, It is the hyperbolic tangent function. These are evolutionary difference correction parameters used to enhance the differences between adjacent angles. This is the regularization coefficient, used to prevent overfitting and drift.
[0035] Updated hidden status It carries multi-dimensional evolutionary information for subsequent classification.
[0036] At the output of the hidden state, a classification subunit consisting of two fully connected layers is set up. The first layer uses the ReLU activation function, and the second layer outputs the probability distribution through the Softmax classifier. The predefined defect category set is {scratches, stains, bulges, indentations, electrode warping}, and the Softmax output dimension is fixed at 5, corresponding to the five types of defects.
[0037] After obtaining the Softmax output, Bayesian posterior inference is further introduced for correction: ; in, For category The corrected probability, Feature likelihood derived from network prediction For class prior probabilities; The defect probability obtained in this way is more stable, avoiding the confidence bias problem of a single Softmax in weak defect scenarios.
[0038] Hidden state at adjacent angles Introduce a spatiotemporal consistency constraint term between them: ; This constraint term, as part of the loss function, ensures that the representation of the same defect remains continuous and stable under adjacent viewpoints, thereby improving the robustness of detection under changes in illumination and reflection.
[0039] In this embodiment, the defect spatiotemporal evolution modeling mechanism includes: For the differential feature sequences of the same region block under multiple angles, multinomial regression or spline curves are used to fit its evolution curves, and the fitting parameters (such as curve slope and curvature) are extracted as auxiliary features. The auxiliary features are fed back to the input of the state equation, and together with the original features, they participate in the state update, thereby enhancing the network's ability to model the evolution of defects with angle.
[0040] In this embodiment, the improved liquid neural network includes: Hierarchical structure: Bottom unit: The bottom-level units primarily target high-frequency evolution features such as fine scratches and indentations. Their input consists of gradient variation features of local region blocks and high-frequency texture components, employing small-scale state update units for rapid modeling. By capturing rapid brightness difference changes in defects at adjacent angles within a short time window, the bottom-level units achieve sensitive detection of minute linear defects.
[0041] Middle layer unit: The mid-level unit primarily targets mesoscale defects such as surface stains and coating unevenness. Its input consists of medium-resolution texture features and brightness mean difference features, dynamically tracked using a conventional time-span state update mechanism. Through mid-term evolution analysis, the mid-level unit can identify the morphologically stable features of stains and other defects from multiple angles, reducing misjudgments caused by localized lighting variations.
[0042] High-rise unit: High-level elements are primarily used for low-frequency, slowly evolving defects such as bulges and electrode warping. Their input consists of low-frequency features and morphological distribution characteristics of a global region block, employing a long-term state update mechanism for global modeling. High-level elements can integrate global morphological information from multiple angles, modeling the continuity and large-scale bending evolution of defect edge contours, thereby improving the detection rate of macroscopic defects.
[0043] Interlayer fusion: The hidden output states of the bottom, middle, and high-level units are weighted and combined in the feature fusion module. The fusion result contains both detailed high-frequency change information and macroscopic global evolutionary patterns. Finally, the fused features are used as inputs to the classification sub-unit and the probability estimation sub-unit to generate defect categories and defect probabilities.
[0044] In this embodiment, the generation of the detection result includes: The defect probability output by the liquid neural network is mapped back to the original image coordinate system. Within each local region block, when the defect probability exceeds a set threshold, the region is marked as a candidate defect region. Preferably, the threshold is set to 0.5 to 0.7 to reduce the false detection rate while ensuring detection sensitivity.
[0045] Edge detection and region growing operations are performed on the candidate defect regions to determine the precise boundaries of the defects: For minor scratch-like defects, the Canny operator is used to extract linear boundaries to ensure that the directional features of the scratches can be fully captured. For defects such as bulges and electrode warping, a region connectivity analysis method is used to determine the outer contour of the defect based on the topological structure of the pixel connected regions, thereby realizing the boundary extraction of surface defects.
[0046] Based on the boundary extraction, and combined with the defect category labels output by the classification subunit, the specific category of each candidate defect is determined. The defect category set includes: scratches, stains, bulges, indentations, and electrode edge warping.
[0047] The defect confidence score is obtained by fusing two pieces of information: The liquid neural network outputs the probability distribution of candidate regions belonging to different defect categories, and takes the probability value of the corresponding category as the first part of the confidence score.
[0048] After boundary extraction of the candidate regions, structural similarity (SSIM) is used to measure the consistency between the defect boundary region and the corresponding region in the original image. Specifically, the neighborhood of the defect boundary is divided into several small blocks, and the differences in brightness, contrast, and texture structure are calculated in each small block. These differences are then weighted and averaged to obtain an overall consistency score. The higher the score, the better the extracted defect boundary matches the actual texture of the original image.
[0049] The defect probability output by the liquid neural network is weighted and fused with the consistency score according to a preset ratio to obtain the final confidence value. The ratio is determined by cross-validation on the existing training set, and is preferably set to 7:3, so that the defect probability dominates the overall judgment, while the consistency score is used to enhance the reliability of the boundary results.
[0050] The final output of the detection results includes the coordinates of the defect, the category label, and the weighted confidence value, and is transmitted to the production quality inspection system for display and archiving.
[0051] In this embodiment, the parameter fine-tuning includes: The detection results output by the liquid neural network include defect location, defect type, and confidence level. These results are written into the production management system database in real time through the quality inspection interface module and displayed visually on the monitoring terminal using image overlay annotation, making it easy for quality inspectors to intuitively view the defect location and judgment results.
[0052] During the production process, quality inspectors conduct manual inspections on a portion of battery samples according to a pre-set sampling ratio, and mark the type, location, and severity of defects based on actual observations, thereby forming a sample dataset with real defect markings.
[0053] The results of manual sampling are compared one by one with the detection results output by the liquid neural network: When the test results are consistent with the manual annotations, the sample is considered a high-confidence sample and added to the confirmation set. When the detection results are inconsistent with the manual annotations, the sample is treated as an error sample and added to the correction set.
[0054] The confirmation set and the correction set are input together into the online learning module of the liquid neural network, and the model is fine-tuned using incremental training. Specifically:
[0055] In the classification sub-unit, weights are updated using mini-batch stochastic gradient descent to correct misclassifications; In the probability estimation subunit, the parameter distribution of the output layer is adjusted to make the confidence prediction more consistent with human annotation; In the dynamic correction parameters related to the state equation, a sliding learning rate update strategy is introduced to make lightweight adjustments only to the parameters related to the evolution difference, so as to ensure the overall stability of the network.
[0056] Example 1: To verify the feasibility of this invention in practice, it was applied to the appearance quality inspection station of a square aluminum-cased lithium battery assembly line (daily production ≥ 120,000 units). The production line conveyor speed was 0.8 m / s, and the single-unit inspection cycle was ≤ 250 ms / unit. The on-site deployment was as follows: 4 industrial cameras (1 top-view, 2 side-view, 1 45° oblique-view), 5-megapixel, 25mm fixed-focus lens, ring linear light source + polarizer; encoder-triggered image capture; edge computing industrial control computer (Intel i7 + NVIDIA RTX A2000 6GB, Ubuntu 22.04).
[0057] A total of 12,000 batteries were collected as samples. Data was manually verified to establish a gold standard, with the following feature distribution: scratches 1,850, stains 1,400, bulges 780, indentations 1,020, electrode edge warping 620, and the rest being normal. Data partitioning: training / validation / test = 70% / 15% / 15%. Preprocessing methods included: histogram matching (using a top-down view as a reference), non-local mean denoising (search window 21×21, block 7×7), and CLAHE (cliplimit=2.0, tile 8×8). Images were divided into 32×32 patches; the pixel difference threshold was empirically set to 0.12 (normalized grayscale); HOG (cell 8×8, block 2×2, 9 bins); GLCM (distance 1, angle 0° / 45° / 90° / 135, extracting contrast, energy, and homogeneity). The improved liquid neural network adopts a three-layer hierarchical structure (bottom / middle / high layer hidden widths: 64 / 128 / 256), with time steps corresponding to multi-angle sequences; the offline training optimizer Adam (lr=1e-3) is used, and online incremental fine-tuning after deployment uses mini-batchSGD (batch=32, lr=1e-4). The candidate region threshold is 0.6; the confidence fusion ratio "defect probability: SSIM consistency" = 7:3; boundary extraction: scratches are extracted using Canny, and bulges / warped edges are extracted using connected component growth.
[0058] Table 1 Test Results
[0059] As shown in Table 1, the end-to-end average latency is 125ms / piece (85ms for the model + 40ms for pre / post-processing); the stable cycle time is ≥240 pieces / minute; the manual review sampling rate is 2% in the first week, and after two rounds of online incremental fine-tuning, the overall false alarm rate has decreased to 0.75% compared to the initial launch (0.95%), and the miss rate for scratches has decreased from 3.7% to 2.6%.
[0060] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. An automatic detection method for appearance defects in lithium batteries based on machine vision, characterized in that, Includes the following steps: Multi-angle images of the surface of lithium batteries are obtained by using industrial cameras deployed on the lithium battery production line. Preprocessing operations, including normalization, noise reduction, and contrast enhancement, are performed on multi-angle images of the surface. The preprocessed image is divided into multiple local region blocks, and a spatiotemporal feature sequence representing the evolution of defects with changes in angle and illumination is generated based on the pixel differences and texture changes between multi-angle images. The spatiotemporal feature sequence is input into an improved liquid neural network, which introduces a defect spatiotemporal evolution modeling mechanism and outputs the defect category and defect probability of each local region. Based on the defect category and defect probability, a detection result including defect location, category, and confidence level is generated; The detection results are output, and the parameters of the liquid neural network are fine-tuned by combining them with the results of manual sampling.
2. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, The industrial camera includes a top-view camera located directly above the lithium battery, side-view cameras located on both sides of the battery, and a slanted-view camera arranged at an angle, which respectively capture images of the front, side, and edge areas of the battery surface.
3. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, The preprocessing operations include: A normalization method based on illumination intensity histogram matching is used to perform brightness equalization on images from different shooting angles; A denoising algorithm based on nonlocal mean filtering is used to eliminate surface reflection and sensor noise interference. A local contrast enhancement method based on adaptive histogram equalization is adopted to highlight small scratches or indentations in low-contrast areas.
4. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, The construction of the spatiotemporal feature sequence includes: The preprocessed image is divided into local regions of fixed size; The local mean and variance changes are calculated based on the pixel differences between multi-angle images to form differential features characterizing brightness changes; Calculate the local directional gradient histogram and gray-level co-occurrence matrix features based on texture changes between multi-angle images; The differential features and texture features are combined in chronological order to generate a spatiotemporal feature sequence that represents the evolution of defects as angle and illumination change.
5. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, After receiving the spatiotemporal feature sequence, the improved liquid neural network performs the following steps in sequence: The preprocessed spatiotemporal feature sequence is input into the improved liquid neural network. Each unit of the network dynamically updates the input features based on the state equation, forming a hidden state representation carrying multi-angle evolutionary information. Based on the hidden state, a classification sub-unit is set up. The classification sub-unit is a combination of a fully connected layer and a Softmax classifier. The hidden state is projected onto a predefined set of defect categories, which include: scratches, stains, bulges, indentations and electrode warping. The defect category label corresponding to each local area is obtained at the output. Based on the output of the classification subunit, the confidence level of each category is further calculated by the probability estimation subunit, which corrects the classification result based on Bayesian posterior inference. A defect spatiotemporal evolution modeling mechanism is introduced into the state equation, and a spatiotemporal consistency constraint term is added between image features from adjacent angles.
6. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, The defect spatiotemporal evolution modeling mechanism includes: A spatiotemporal consistency constraint term is introduced between the temporal features corresponding to continuous angle images; The state variables are updated based on the dynamic differential evolution parameters between adjacent features to simulate the dynamic trajectory of defects as illumination and viewing angle change. The evolution curves of the same region block under multiple angles are fitted, and the fitting results are fed back into the state equation as auxiliary features to output the defect category and defect probability of each local region.
7. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, The improved liquid neural network includes: Hierarchical structure: Bottom unit: Rapidly models the high-frequency evolution characteristics of fine scratches and indentations; Mid-layer unit: Dynamically tracks medium-scale defects in surface contaminants; High-level unit: Global modeling of defects such as bulges and electrode warping at low frequencies with slow evolution.
8. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, The generation of the detection results includes: The defect probability is mapped back to the original image coordinate system. Within each local region block, when the defect probability exceeds a set threshold, the region is marked as a candidate defect region. Edge detection and region growing operations are performed on the candidate defect regions to determine the precise boundaries of the defects: For minor scratch-like defects, the directional gradient operator is used to extract linear boundaries; For defects such as bulges and warped edges, regional connectivity analysis is used to extract planar boundaries; Based on the boundary extraction results, and combined with the defect category labels output by the classification subunit, the specific category of each candidate defect is determined, including scratches, stains, bulges, indentations, and electrode edge warping. The confidence level is obtained by fusing two pieces of information: The first part is the defect probability output by the liquid neural network; The second part is the consistency index between the defect boundary and the original features; The two parts are weighted and fused to obtain the final defect confidence value; The final detection results include the location coordinates of the defect, the category label, and the corresponding confidence value.
9. The automatic detection method for appearance defects of lithium batteries based on machine vision according to claim 1, characterized in that, The parameter fine-tuning includes: The detection results include defect location, defect type, and confidence level. They are written into the production management system database through the quality inspection interface module and displayed in a visual form on the monitoring terminal. During the production process, quality inspectors conduct manual sampling inspections on some battery samples to create a dataset with real defect annotations. Compare the results of manual sampling with the detection results output by the liquid neural network: If the test results are consistent with the manual annotations, they are added to the confirmation set as high-confidence samples; If the detection results are inconsistent with the manual annotations, they are added to the correction set as error samples. Error samples and confirmed samples are input into the online learning module of the liquid neural network, and incremental training is used to fine-tune the classification sub-unit, probability estimation sub-unit, and dynamic correction parameters.
Citation Information
Cited By
Battery pole piece defect feature recognition method, model training method thereof and electronic device
CN122347722A