New energy lithium battery surface defect visual detection method based on YOLOv8 model

By building a multimodal optical imaging system and improving the YOLOv8 network, the problems of low efficiency and insufficient accuracy in traditional detection technology are solved, efficient and accurate identification of surface defects of lithium batteries are achieved, and monitoring capabilities and product quality of the production process are improved.

CN120235848APending Publication Date: 2025-07-01ANHUI UNIV

Patent Information

Application Number
CN202510383050.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

In traditional lithium battery manufacturing, manual visual inspection and semi-automated inspection have low efficiency and insufficient accuracy, difficult to identify micron-level defects, and lack of systematic defect feature data sets, resulting in poor detection consistency and high error detection rate.

Method used

A multimodal optical imaging system is built to optimize optical parameters, a high-resolution industrial camera and a controllable ring light source is used to build an improved YOLOv8 network based on the CSPDarknet53 structure and Anchor-free detection head. Through Mosaic data augmentation and CIoU Loss optimization models, a standardized data set is established for training.

Benefits of technology

It realizes accurate identification of micron-level defects, improves detection accuracy and robustness, reduces false detection rates, ensures real-time monitoring of the production process and product consistency, and optimizes production efficiency and cost-effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120235848A_ABST
    Figure CN120235848A_ABST
Patent Text Reader

Abstract

The invention discloses a new energy lithium battery surface defect visual detection method based on a YOLOv8 model, and belongs to the field of new energy lithium battery manufacturing and detection.The new energy lithium battery surface defect visual detection method comprises the steps that S1, a stable data acquisition platform is built; s2, optimizing optical parameters; s3, surface defect images of a plurality of lithium ion batteries are collected for data preprocessing, and a standardized data set is constructed; s4, adopting an improved network architecture deep learning detection engine based on YOLOv8; and S5, inputting the manufactured data set into an improved YOLOv8 model for model training. According to the intelligent detection system based on machine vision and the YOLOv8 model provided by the invention, the precision and robustness of defect identification are remarkably improved while efficient detection is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of new energy lithium battery manufacturing and detection, and particularly relates to a visual detection method for surface defects of new energy lithium batteries based on the YOLOv8 model. Background Technique

[0002] Under the background of accelerating the transformation of the global energy structure, lithium-ion batteries, as the core power carriers of the new energy industry, their manufacturing process level directly affects the industrialization process of new energy vehicles and energy storage systems. During large-scale production, the control of the surface integrity of electrode sheets faces severe challenges. Apparent anomalies that frequently occur include, but are not limited to: exposure of aluminum foil current collectors, mechanical stress indentations, interface scratches, stamping pits, and micron-level pinhole defects, etc. According to the differences in their geometric morphology characteristics and distribution density, these surface defects will have a gradient impact on battery performance - apparent defects only affect the appearance quality of the product, while deep structural damage will directly lead to interface failure problems such as the peeling of the active material layer and uneven electrolyte infiltration, and further cause safety hazards such as abnormal increase in the internal resistance of the battery cell and accelerated attenuation of the cycle life. Traditional visual inspection or two-dimensional imaging technology is limited by insufficient resolution and the lack of three-dimensional feature extraction ability, and it is difficult to meet the dual requirements of modern intelligent manufacturing for defect detection accuracy and efficiency. Therefore, it is urgent to construct an intelligent surface defect detection system based on multi-dimensional information fusion to achieve precise identification of micron-level defects.

[0003] The current quality control scheme commonly adopted in the field of lithium battery manufacturing is a combination of manual visual inspection and semi-automated detection, which has significant technical limitations: Firstly, there is the problem of detection efficiency. The speed of manual detection is limited and seriously mismatched with the running speed of modern production lines ≥30m / min. Secondly, there will be subjective judgment deviations in manual visual inspection: due to differences in the experience of detection personnel and individual visual fatigue, the consistency coefficient of defect recognition is lower than 0.65, and the false detection rate is as high as 15%-20%. In addition, due to the lack of a systematic defect feature data set, it is difficult to conduct correlation analysis between process parameters and quality defects. Summary of the Invention

[0004] To solve the above technical problems, the present invention provides a visual detection method for surface defects of new energy lithium batteries based on the YOLOv8 model, including:

[0005] Construct an image acquisition system for multi-modal optical imaging and optimize the optical parameters of the image acquisition system;

[0006] Collect pictures of surface defects of lithium-ion batteries based on the optimized image acquisition system, and construct a standardized data set based on the pictures of surface defects of lithium-ion batteries;

[0007] An improved YOLOv8 network is constructed based on the CSPDarknet53 structure and the Anchor-free detection head, and the improved YOLOv8 network is trained based on the normalized dataset to obtain a deep learning detection engine;

[0008] The surface defects of new energy lithium batteries are detected based on the deep learning detection engine.

[0009] Preferably, the image acquisition system of the multimodal optical imaging is composed of a high-resolution industrial camera, a controllable ring light source and a small synchronous feeding system.

[0010] Preferably, the optical parameters of the image acquisition system are: using a black velvet light-absorbing cloth background and equipped with a zoom lens.

[0011] Preferably, the process of constructing the normalized dataset based on the pictures of the surface defects of the lithium-ion battery includes:

[0012] Collect pictures of the surface defects of the lithium-ion battery based on the optimized image acquisition system;

[0013] Label the pictures of the surface defects of the lithium-ion battery to generate an XML tag file containing the surface defects of the lithium battery, and organize the labeled images and tag files into a VOC format dataset;

[0014] The VOC format dataset is processed using the Mosaic data augmentation technique to obtain the normalized dataset.

[0015] Preferably, the process of processing the VOC format dataset using the Mosaic data augmentation technique includes:

[0016] Create a mosaic canvas, randomly generate a point, randomly select the coordinates of the picture splicing reference point, and randomly select four pictures. After the four pictures are respectively adjusted in size and scaled in proportion according to the reference point, they are placed in the upper left, upper right, lower left, and lower right positions of the large picture with the specified size. Update the bbox coordinates, and according to the size transformation method of each picture, map the mapping relationship to the picture label, and splice the large picture according to the specified horizontal and vertical coordinates, and process the detection box coordinates exceeding the boundary.

[0017] Preferably, the process of constructing the improved YOLOv8 network based on the CSPDarknet53 structure and the Anchor-free detection head includes:

[0018] The Backbone adopts the CSPDarknet53 structure to enhance the feature extraction ability through the cross-stage local connection mechanism;

[0019] An Anchor-free detection head is introduced to directly predict the center point of the target and the dimensions of the bounding box;

[0020] The learning rate is dynamically adjusted according to the change of the loss function;

[0021] CIoU Loss is used as the bounding box regression loss function to complete the construction of the improved YOLOv8 network.

[0022] Preferably, the Backbone adopts the CSPDarknet53 structure, enhances the feature extraction ability through the cross-stage local connection mechanism, adopts the partial channel fusion strategy to reduce the redundant calculation amount, and embeds the channel attention module.

[0023] Preferably, the process of training the improved YOLOv8 network based on the normalized dataset further includes: evaluating the performance of the model by calculating evaluation metrics such as intersection over union, precision, recall, and mean average precision, and further optimizing the model according to the visualization evaluation results.

[0024] On the other hand, the present invention also provides an electronic device, including a memory, a processor, and a computing program stored in the memory and executable on the processor. When the processor executes the computing program, the method is implemented.

[0025] On the other hand, the present invention also provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the method is implemented.

[0026] Compared with the prior art, the present invention has the following advantages and technical effects:

[0027] Through the triple collaborative innovation of optics, algorithms, and data, the present invention breaks through the limitations of traditional detection technologies, constructs a micron-level imaging system with a theoretical resolution of 10μm; improves the YOLOv8 network; and establishes an industrial-level defect feature library covering 7 types of defects.

[0028] While ensuring efficient detection, the present invention significantly improves the accuracy and robustness of defect recognition, realizes real-time monitoring of the production process, timely discovers and corrects quality problems, ensures product consistency and reliability, improves production efficiency, optimizes cost-effectiveness, and solves the limitations of the method combining manual visual inspection and semi-automated detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The drawings constituting a part of this application are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation to this application. In the drawings:

[0030] Figure 1It is a flowchart of the surface defect detection method for the new energy lithium battery according to the embodiment of the present invention;

[0031] Figure 2 It is a structure diagram of the data acquisition platform according to the embodiment of the present invention;

[0032] Figure 3 It is a schematic diagram related to labels according to the embodiment of the present invention;

[0033] Figure 4 It is a schematic diagram of the relationship between the horizontal and vertical coordinates of the center point and the height and width of the frame according to the embodiment of the present invention;

[0034] Figure 5 It is a schematic diagram of the normalized confusion matrix according to the embodiment of the present invention;

[0035] Figure 6 It is a schematic diagram of the precision-confidence curve according to the embodiment of the present invention;

[0036] Figure 7 It is a schematic diagram of the recall-confidence curve according to the embodiment of the present invention;

[0037] Figure 8 It is a schematic diagram of the precision-recall curve according to the embodiment of the present invention;

[0038] Figure 9 It is a schematic diagram of the F1-confidence curve according to the embodiment of the present invention;

[0039] Figure 10 It is a curve graph of the change of the training and verification indexes of the defect detection model according to the embodiment of the present invention. Detailed implementation manners

[0040] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0041] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from that here.

[0042] Embodiment 1

[0043] As Figure 1 shown, in this embodiment, a visual defect detection method for the surface of a new energy lithium battery based on the YOLOv8 model is provided, including:

[0044] Construct an image acquisition system for multi-modal optical imaging and optimize the optical parameters of the image acquisition system;

[0045] Collect pictures of the surface defects of lithium-ion batteries based on the optimized image acquisition system, and construct a standardized data set based on the pictures of the surface defects of the lithium-ion batteries;

[0046] Construct an improved YOLOv8 network based on the CSPDarknet53 structure and the Anchor-free detection head, and train the improved YOLOv8 network based on the standardized data set to obtain a deep learning detection engine;

[0047] Detect the surface defects of new energy lithium batteries based on the deep learning detection engine.

[0048] Step S101: Build a stable data acquisition platform;

[0049] Specifically, build an image acquisition system for multimodal optical imaging, such as Figure 2 shown, use a high-resolution industrial camera (MV-SUA2000M-T, resolution 20 million pixels) for shooting to ensure clear imaging of micron-level defects. Equip with a controllable ring light source, adopt the direct illumination mode, set the color temperature to 6500K±5%, and optimize the image contrast. Design a small synchronous belt feeding system to simulate the production workshop environment of lithium-ion batteries and ensure the stability of sample transmission (positioning accuracy ±0.1mm).

[0050] Step S102: Optimize the optical parameters, use a black velvet light-absorbing cloth background (reflectivity <5%) to reduce ambient light interference. Equip with a zoom lens (MV-LD-25-20M-B, magnification adjustable from 0.5X to 20X) to meet the detection requirements of different-sized batteries.

[0051] Step S103: Collect surface defect images of several lithium-ion batteries for data preprocessing, and construct a standardized data set. The specific steps are as follows:

[0052] Step 1: Obtain a large number of pictures of the surface defects of lithium-ion batteries through the data acquisition platform, standardize the size information of the pictures of the surface defects of the several lithium-ion batteries containing defects, and obtain several preprocessed pictures of the surface defects of the batteries and output them as the data set. The present invention covers 7 typical defects: dirt, leakage, two-dimensional code defect, depression, explosion-proof valve depression, extrusion, and blue film defect.

[0053] Step 2: Create a VOC format dataset. Use the Labelimg software to annotate defect samples with clear features, generating XML label files containing surface defects of lithium batteries (such as dirt, leakage, QR code defects, depressions, etc.), with the annotation accuracy reaching the pixel level (error < 2px). Organize the annotated images and label files into a VOC format dataset, including three subfolders: Images, Labels, and JPEGImages, which are used to store annotation files, training data labels, and original images respectively.

[0054] Step 3: Adopt the Mosaic data augmentation technique. Create a new mosaic canvas and randomly generate a point. Randomly select the coordinates (x c , y c ) of the image stitching reference point, and randomly select another four images. After resizing and scaling the four images according to the reference point, place them in the upper left, upper right, lower left, and lower right positions of the large image with the specified size. Update the bbox coordinates, and according to the size transformation method of each image, map the mapping relationship to the image label. Stitch the large image according to the specified horizontal and vertical coordinates. Process the detection box coordinates that exceed the boundary. Expand the dataset by randomly stitching four images to improve the model's detection ability for small-sample defects.

[0055] Step S104 Deep learning detection engine

[0056] Adopt an improved network architecture based on YOLOv8. The specific steps are as follows:

[0057] Step 1: Feature extraction optimization: The Backbone adopts the CSPDarknet53 structure. Enhance the feature extraction ability through the cross-stage partial connection (CSP) mechanism, significantly improving the recognition accuracy for tiny defects.

[0058] The CSP mechanism splits the feature map into a main branch and a residual branch, realizing cross-stage gradient shunting in the backbone network to alleviate the problem of gradient disappearance in deep networks. Experiments show that compared with the original Darknet53, the gradient backpropagation efficiency of CSPDarknet53 on the defect dataset is increased by 21%, and the recall rate of tiny defects (such as depressions < 5px) is increased by 11.3%. Adopt a partial channel fusion strategy to reduce 30% of the redundant calculation amount. When maintaining the input resolution of 640×640, the inference speed reaches 83FPS (NVIDIA V100), meeting the real-time detection requirements. At the same time, the embedding of the channel attention module (SE Block) enables the network to focus on the defect area in complex backgrounds, reducing the false detection rate by 9.8%.

[0059] Step 2: Detection head design: Introduce anchor-free detection head, abandon the traditional anchor mechanism, and directly predict the target center point and bounding box size.

[0060] Since lithium battery defects are difficult to be covered by the aspect ratio preset by traditional anchors, such as the diffuse edge of leakage and the irregular contour of extrusion deformation, Anchor-free dynamically fits the target geometry by directly regressing the center point offset (Δx, Δy) and size (w, h). Experiments show that the IoU of the bounding box of the leakage defect is increased from 0.62 to 0.81; the center point positioning error of the explosion-proof valve depression is ≤0.05mm, compared with ±0.12mm of the traditional anchor method, achieving accurate positioning of irregular defects.

[0061] The traditional Anchor mechanism is prone to missed detection due to the mismatch between the preset frame and the size of small targets (such as blue film damage <20px). However, Anchor-free combines multi-scale prediction of feature pyramid (FPN) to improve AP50 of small targets by 19%, enhancing sensitivity to small defects.

[0062] The performance curve cluster verifies the precision-recall balance of the model at different confidence thresholds (the best threshold is 0.6).

[0063] Step 3: Dynamic learning rate adjustment: The training batch diagram of the embodiment of the present invention is as follows Figure 4 As shown in the figure, the batch-size hyperparameter is set to 16, so 16 images are read at a time. The validation labels are used to quantify the model performance, and the prediction label map is used to diagnose specific problems. The validation batch labels and prediction labels of batch0 and batch1 are shown in Figure 5 , Figure 6 As shown in the figure, the spatial overlap between the predicted box and the true label is compared, and the model's missed detection problem in edge area targets is identified. IoU < 0.4 accounts for 11%. CutMix data enhancement is introduced to improve the AP50 of edge targets by 7.3%. At the same time, the feature distribution visualization (t-SNE) of the validation set is used to optimize the category imbalance problem. During the training process, the learning rate is dynamically adjusted according to the change of the loss function. According to the experiment, the adjusted loss function converges to 0.22 within 200 epochs, which is 35% faster than the fixed learning rate training. This ensures that the model converges quickly in the early stage of training and stably optimizes in the later stage to avoid falling into the local optimum.

[0064] Step 4: Loss function optimization: CIoU Loss (Complete Intersection over Union Loss) is used as the bounding box regression loss function. The results of overlapping area, center point distance and aspect ratio are as follows: Figure 3 ,Figure 4 As shown in the figure, considering various factors comprehensively to optimize the regression accuracy of the bounding box. In the lithium battery defect detection task, the positioning error (Δx, Δy) of the bounding box is reduced by 23% compared to GIoU, and the regression accuracy for targets with abnormal aspect ratios is significantly improved. For example, the AP75 of the blue film defect category is increased by 11%.

[0065] Use the confusion matrix to verify the classification performance, and optimize the classification branch in combination with Focal Loss to solve the problem of imbalance between easy and difficult samples. As Figure 5 shown, in the confusion matrix, the precision of high-frequency defect categories (such as dents) is increased from 79% to 84%, and the recall rate of low-frequency categories is increased from 68% to 76%. Further improve the positioning accuracy of the detection box.

[0066] Step S105 Training and verification of the object detection model

[0067] Input the prepared dataset into the improved YOLO v8 model for model training. During the training process, evaluate the performance of the model by calculating evaluation metrics such as intersection over union (IoU), precision, recall, and mean average precision (mAP). According to the visual evaluation results, further optimize the model, such as adjusting the network structure, optimizer parameters, etc., to improve the detection accuracy and speed of the model.

[0068] The specific steps are as follows:

[0069] Step 1: Calculate the intersection over union (IoU) to evaluate the accuracy of the prediction box. The formula for calculating the intersection over union is as follows:

[0070]

[0071] where bgt and bpred represent the ground truth box of the actual boundary of the object and the detected prediction box, respectively.

[0072] Step 2: Calculate precision and recall. Set the intersection over union threshold to 0.5. Only when the IoU between the prediction box and the ground truth box is greater than the set threshold and the classification is correct, is a positive sample considered to be correctly predicted.

[0073] The precision is the proportion of samples that are actually positive among the samples predicted as positive by the model. Its calculation formula is as follows:

[0074]

[0075] Among them, TP (True Positive) is the number of positive samples correctly predicted as positive, and FP (False Positive) is the number of negative samples wrongly predicted as positive samples.

[0076] The corresponding precision is calculated under different confidence thresholds, and then these points are plotted in a coordinate system and connected into a curve to obtain the Precision-Confidence Curve, as Figure 6 shown, which can visually analyze the performance of the model under different confidence thresholds, select an appropriate threshold to balance precision and recall, and optimize the performance of the model.

[0077] The recall is the proportion of samples that are actually positive and are correctly predicted as positive by the model. Its calculation formula is as follows:

[0078]

[0079] Among them, TP (True Positive) is the number of positive samples correctly predicted as positive, and FN (False Negative) is the number of positive samples wrongly predicted as negative.

[0080] The corresponding recall is calculated under different confidence thresholds, and a curve is plotted to obtain the Recall-Confidence Curve, as Figure 7 shown, to analyze the model's ability to identify positive samples at different confidence thresholds, and understand the performance of the model in terms of recall through the curve. Evaluate the advantages and disadvantages of the model at low and high recall rates, providing a basis for optimization selection.

[0081] The precision and recall calculated under different thresholds are used to plot the Precision-Recall Curve, as Figure 8 , where the X-axis is the recall and the Y-axis is the precision. Intuitively understand the balance of the model under various thresholds.

[0082] The F1 score is the harmonic mean of precision and recall. The corresponding F1 scores are calculated under different confidence thresholds, and a curve of the F1 score varying with the threshold is plotted to obtain the F1-Confidence Curve, as Figure 9 shown. Through the F1, a comprehensive evaluation of precision and recall can be obtained, and the performance of different models can be compared under a single metric.

[0083] Step 3: Calculate the mean average precision (mAP) to reflect the detection accuracy of the network model for all category targets and evaluate the performance of the model. The formula for calculating the mean average precision (mAP) is as follows:

[0084]

[0085] where N is the number of object categories, n is the nth category, and AP n represents the detection accuracy of the algorithm for objects of the nth category; the formula for calculating the average precision (AP) is as follows:

[0086]

[0087] where R P (t) represents the precision rate when the intersection over union (IoU) threshold takes t.

[0088] According to the evaluation results, as Figure 10 shown, adjust the network structure and optimizer parameters, and adjust the hyperparameters of the model according to actual needs to optimize the detection performance of the model.

[0089] Among them, box_loss is used to supervise the regression of the detection box, the error (CIoU) between the predicted box and the calibrated box; cls_loss is used to supervise the category classification and calculate whether the anchor box and the corresponding calibrated classification are correct; the dfl_loss function (Distribution Focal Loss) is used to optimize the bbox; mAP50-95 represents the average mAP at different IoU thresholds (from 0.5 to 0.95, step 0.05) (0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95); mAP50 represents the mAP value change curve when the IoU threshold is 0.5.

[0090] Embodiment 2

[0091] In this embodiment, a vision detection method for surface defects of new energy lithium batteries based on the YOLOv8 model is provided, including:

[0092] S1. Build a stable data acquisition platform;

[0093] S2. Optimize the optical parameters;

[0094] S3. Collect surface defect images of several lithium-ion batteries for data preprocessing and construct a standardized data set;

[0095] S4. Adopt an improved network architecture deep learning detection engine based on YOLOv8

[0096] S5. Input the prepared dataset into the improved YOLOv8 model for model training. During the training process, evaluate the performance of the model by calculating evaluation metrics such as Intersection over Union (IoU), Precision, Recall, and mean Average Precision (mAP).

[0097] Preferably, optimize the optical parameters, including:

[0098] Adopt a black velvet light-absorbing cloth background and equip with a zoom lens.

[0099] Preferably, construct a normalized dataset, including:

[0100] Obtain a large number of pictures of lithium-ion battery surface defects through a data acquisition platform;

[0101] Use Labelimg software to label defect samples with clear features, generate XML label files containing lithium battery surface defects, and organize the labeled images and label files into a VOC format dataset.

[0102] Adopt the Mosaic data augmentation technique, create a mosaic canvas, and randomly generate a point. Randomly select the coordinates (x c , y c ) of the picture splicing reference point, and randomly select another four pictures. According to the reference point, the four pictures are respectively adjusted in size and scaled in proportion, and then placed in the upper left, upper right, lower left, and lower right positions of the large picture with the specified size. Update the bbox coordinates, and according to the size transformation method of each picture, map the mapping relationship to the picture label. Stitch the large picture according to the specified horizontal and vertical coordinates. Process the detection box coordinates that exceed the boundary.

[0103] Preferably, adopt an improved network architecture based on YOLOv8, including:

[0104] The Backbone adopts the CSPDarknet53 structure to enhance the feature extraction ability through the Cross Stage Partial (CSP) mechanism.

[0105] Introduce an Anchor-free detection head to directly predict the target center point and the size of the bounding box;

[0106] Dynamically adjust the learning rate according to the change of the loss function;

[0107] Adopt CIoU Loss (Complete Intersection over Union Loss) as the bounding box regression loss function to comprehensively consider the overlapping area, the distance of the center point, and the aspect ratio to optimize the bounding box regression accuracy.

[0108] The dataset used in the experiments of this embodiment is composed of pictures obtained by the team members collecting, detecting, photographing, and sorting defective lithium-ion batteries provided by related battery cooperation companies. Moreover, in this embodiment, the positions and types of their defects are marked. In order to develop and evaluate the model, a total of 1977 original lithium battery defect pictures are divided into an internal training set, a validation set, and a test set, and the ratio is 7:2:1.

[0109] This embodiment covers 7 typical defects of lithium-ion batteries: dirt, leakage, QR code defect, depression, explosion-proof valve depression, extrusion, and blue film defect. The data distribution of the produced dataset is shown in Table 1 below.

[0110] Table 1

[0111]

[0112] Robustness verification: As Figure 5 shown, the normalized confusion matrix shows that the accuracy deviation of defect detection for each category is small, indicating that the model has balanced recognition ability for different defect types.

[0113] In summary, this embodiment proposes a visual detection method for surface defects of new energy lithium batteries based on the YOLOv8 model. Through the tripartite collaborative innovation of optics, algorithms, and data, it breaks through the limitations of traditional detection technologies; constructs a micron-level imaging system; improves the YOLOv8 network; establishes an industrial-level defect feature library covering 7 types of defects; while ensuring efficient detection, it significantly improves the accuracy and robustness of defect recognition, realizes real-time monitoring of the production process, optimizes cost-effectiveness, and solves the limitations of the combined method of manual visual inspection and semi-automated detection.

[0114] The above is only a preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed in the present application should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A new energy lithium battery surface defect visual detection method based on the YOLOv8 model, characterized in that: include: Constructing an image acquisition system for multimodal optical imaging and optimizing optical parameters of the image acquisition system; Collecting images of surface defects of lithium-ion batteries based on the optimized image acquisition system, and constructing a normalized data set based on the images of surface defects of lithium-ion batteries; Building an improved YOLOv8 network based on the CSPDarknet53 structure and the Anchor-free detection head, training the improved YOLOv8 network based on the normalized data set to obtain a deep learning detection engine; Surface defects of new energy lithium batteries are detected based on the deep learning detection engine.

2. The method according to claim 1, characterized in that The multimodal optical imaging image acquisition system is based on a high-resolution industrial camera, a controllable annular light source and a small synchronous feeding system.

3. The method according to claim 1, characterized in that The optical parameters of the image acquisition system are: using a black velvet light-absorbing cloth background and equipped with a zoom lens.

4. The method according to claim 1, characterized in that: The process of constructing a normalized data set based on the lithium-ion battery surface defect images includes: Collect images of lithium-ion battery surface defects based on the optimized image acquisition system; Annotate the lithium-ion battery surface defect image to generate an XML tag file containing the lithium-ion battery surface defects, and organize the annotated image and tag file into a VOC format data set; The VOC format dataset is processed using Mosaic data enhancement technology to obtain the normalized dataset.

5. The method according to claim 4, characterized in that The process of processing the VOC format data set using the Mosaic data enhancement technology includes: Create a new mosaic canvas and randomly generate a point. Randomly select the coordinates of the image stitching reference point. Randomly select four other images. According to the reference point, the four images are resized and scaled, and placed at the upper left, upper right, lower left, and lower right positions of the large image of the specified size. Update the bbox coordinates. According to the size transformation method of each image, the mapping relationship is mapped to the image label. According to the specified horizontal and vertical coordinates, the large image is stitched, and the detection box coordinates that exceed the boundary are processed.

6. The method according to claim 1, characterized in that The process of building an improved YOLOv8 network based on the CSPDarknet53 structure and the Anchor-free detection head includes: Backbone adopts the CSPDarknet53 structure and enhances feature extraction capabilities through a cross-stage local connection mechanism; Introducing the Anchor-free detection head to directly predict the target center point and bounding box size; Dynamically adjust the learning rate according to the changes in the loss function; CIoU Loss is used as the bounding box regression loss function to complete the construction of the improved YOLOv8 network.

7. The method according to claim 6, characterized in that The Backbone adopts the CSPDarknet53 structure, enhances the feature extraction capability through a cross-stage local connection mechanism, adopts a partial channel fusion strategy to reduce redundant calculations, and embeds a channel attention module.

8. The method according to claim 1, characterized in that The process of training the improved YOLOv8 network based on the normalized data set also includes: evaluating the performance of the model by calculating the intersection-over-union ratio, precision, recall rate and average precision mean evaluation indicators, and further tuning the model according to the visual evaluation results.

9. An electronic device comprising a memory, a processor, and a computing program stored in the memory and executable on the processor, characterized in that: When the processor executes the computing program, the method described in any one of claims 1 to 8 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method described in any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Battery defect detection method and system based on deep learning

    CN115170550A

  • PCB surface defect detection method based on improved YOLOv5 algorithm

    CN116309427A

  • PCB surface defect detection method based on improved YOLOv8 algorithm

    CN117422681A

  • PCB surface defect detection method based on improved YOLOv8n model

    CN118735883A

  • Metal surface defect detection method based on improved YOLOv5

    CN119067919A

Cited By

  • Appearance detection system for new energy battery module based on machine vision

    CN121068611A

  • New energy battery module appearance detection system based on machine vision

    CN121068611B