Appearance detection method, device and equipment for soft package lithium battery and medium

Through unsupervised learning, the defect areas of the soft-pack lithium battery are initially identified, and then accurately classified with supervised learning, the problems of insufficient samples and high false alarm rates in the existing technology are solved, and efficient and low-cost appearance detection is achieved.

CN120374540APending Publication Date: 2025-07-25INST OF ELECTRONICS & ELECTRICAL APPLIANCES GUANGDONG ACAD OF SCI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510446589.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the existing soft-pack lithium battery appearance detection technology, supervised models require a large number of defect samples to be marked with high cost, while unsupervised models have high false alarm rates, resulting in poor detection results.

Method used

The first appearance detection model constructed by unsupervised learning is initially identified by defective areas, and the second appearance classification model with supervised learning is accurately classified to reduce the calculation amount and false alarm rate.

Benefits of technology

With fewer defect samples, efficient and accurate appearance defect detection of soft-pack lithium batteries is achieved, reducing model training costs and false alarm rates, and improving the accuracy and production efficiency of the detection system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120374540A_ABST
    Figure CN120374540A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an appearance detection method, device and equipment for a soft package lithium battery and a medium, and relates to the technical field of battery appearance detection. The method comprises the following steps: acquiring a first image of a to-be-detected part of the soft package lithium battery; processing the first image based on a pre-trained first appearance detection model to obtain an identification result; and if the identification result is that the defect exists, processing a defect area in the identification result based on a pre-trained second appearance classification model to obtain a detection result of the to-be-detected part of the soft package lithium battery. According to the technical scheme, the input data of the second appearance classification model constructed based on supervised learning is the defect area, and compared with a scheme in which the input data is a whole image, the calculation amount and the calculation difficulty of the second appearance classification model are greatly reduced; therefore, the method provided by the invention can accurately identify the defect under the condition that the defect samples are few, and the model training cost is greatly reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of battery appearance detection, and particularly to an appearance detection method, device, equipment and medium for soft-pack lithium batteries. Background Art

[0002] As a new generation of energy storage power source, soft-pack lithium batteries have excellent performance and broad application prospects, and their production capacity is increasing rapidly. The aluminum-plastic film shell material used in soft-pack lithium batteries is relatively soft and easily damaged, so appearance defects often occur during the production process. Among them, larger defects may pose a serious threat to the safety of the battery, resulting in electrolyte leakage inside the battery and even safety accidents such as fires. Therefore, the appearance defect detection of soft-pack lithium batteries is an important link in the production process of lithium batteries.

[0003] There are currently two soft-pack lithium battery appearance detection schemes. One is to perform appearance detection based on a supervised model, and the other is to perform appearance detection based on an unsupervised model. However, since the supervised model can achieve good results only when there are sufficient defect samples, and it is difficult to collect various defect samples during the production process of soft-pack lithium batteries, there is a problem that the use effect of the model is poor due to insufficient sample volume, and the supervised model needs to label the samples, resulting in a high cost of manual labeling. The unsupervised model has a problem of high false alarm rate for weak defects. Summary of the Invention

[0004] The present invention provides an appearance detection method, device, equipment and medium for soft-pack lithium batteries, which can perform appearance detection on the appearance of soft-pack lithium batteries based on an unsupervised model and a supervised model, while reducing the false alarm rate of the unsupervised model and greatly reducing the model training cost.

[0005] According to one aspect of the present invention, there is provided an appearance detection method for soft-pack lithium batteries, the method comprising:

[0006] Obtaining a first image of a part to be detected of a soft-pack lithium battery;

[0007] Processing the first image based on a pre-trained first appearance detection model to obtain a recognition result; the first appearance detection model is constructed by an unsupervised learning method;

[0008] If the recognition result is that there is a defect, processing the defect area in the recognition result based on a pre-trained second appearance classification model to obtain a detection result of the part to be detected of the soft-pack lithium battery; the second appearance classification model is constructed by a supervised learning method.

[0009] According to another aspect of the present invention, there is provided an appearance detection device for soft-pack lithium batteries, comprising:

[0010] A first image acquisition module, configured to acquire a first image of a part to be detected of a soft-pack lithium battery;

[0011] An identification result determination module, configured to process the first image based on a pre-trained first appearance detection model to obtain an identification result; the first appearance detection model is constructed by an unsupervised learning method;

[0012] A detection result determination module, configured to, if the identification result indicates a defect, process the defective area in the identification result based on a pre-trained second appearance classification model to obtain a detection result of the part to be detected of the soft-pack lithium battery; the second appearance classification model is constructed by a supervised learning method.

[0013] According to another aspect of the present invention, there is provided an electronic device, the electronic device includes:

[0014] At least one processor; and

[0015] A memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the appearance detection method of the soft-pack lithium battery according to any embodiment of the present invention.

[0017] According to another aspect of the present invention, there is provided a computer-readable storage medium, the computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the appearance detection method of the soft-pack lithium battery according to any embodiment of the present invention when executed by a processor.

[0018] The technical solution of the embodiment of the present application includes: obtaining a first image of the part to be detected of a soft-pack lithium battery; processing the first image based on a pre-trained first appearance detection model to obtain a recognition result; the first appearance detection model is constructed by unsupervised learning; if the recognition result is that there are defects, then based on a pre-trained second appearance classification model, the defective area in the recognition result is processed to obtain a detection result of the part to be detected of the soft-pack lithium battery; the second appearance classification model is constructed by supervised learning. This technical solution first identifies the first image through the first appearance detection model constructed by unsupervised learning. When the recognition result is defective, the defective area can be initially determined, and then the detection result of the defective area can be determined through the second appearance classification model, avoiding the problem of high false alarm rate in detection by a single unsupervised model; since the input data of the second appearance classification model constructed by supervised learning is the defective area, compared with the solution where the input data is the entire image, the calculation amount and calculation difficulty of the second appearance classification model are greatly reduced, so that the second appearance classification model can accurately identify defects even with fewer training samples, greatly reducing the model training cost.

[0019] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Brief Description of the Drawings

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0021] Figure 1 It is a flowchart of a method for detecting the appearance of a soft-pack lithium battery according to Embodiment 1 of the present application;

[0022] Figure 2 It is a schematic diagram of a platform for detecting the appearance defects at the corners of a soft-pack lithium battery according to Embodiment 1 of the present application;

[0023] Figure 3 It is a flowchart of a method for detecting the appearance of a soft-pack lithium battery according to Embodiment 2 of the present application;

[0024] Figure 4 It is a schematic diagram of the detection result of the appearance defects in the corner area of a soft-pack lithium battery according to Embodiment 2 of the present application;

[0025] Figure 5It is a flowchart of the training process of the first appearance detection model provided in Embodiment 3 of the present application

[0026] Figure 6 It is a schematic structural diagram of an appearance detection device for a soft-pack lithium battery provided in Embodiment 4 of the present application;

[0027] Figure 7 It is a schematic structural diagram of an electronic device for implementing an appearance detection method for a soft-pack lithium battery according to an embodiment of the present application. Detailed implementation manners

[0028] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0029] It should be noted that the terms "first", "second", "target", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0030] Embodiment 1

[0031] Figure 1 This is a flowchart of an appearance detection method for a soft-pack lithium battery provided in Embodiment 1 of the present application. The embodiments of the present application are applicable to the situation of detecting appearance anomalies in the corner areas of a soft-pack lithium battery. This method can be executed by an appearance detection device for a soft-pack lithium battery, and the appearance detection device for a soft-pack lithium battery can be implemented in the form of hardware and / or software. The appearance detection device for a soft-pack lithium battery can be configured in an electronic device with data processing capabilities. As Figure 1 shown, the method includes:

[0032] S110, obtain a first image of the part to be detected of the soft-pack lithium battery.

[0033] Among them, a soft-pack lithium battery is a lithium-ion battery that uses an aluminum-plastic composite film as a packaging material, which mainly includes: an aluminum-plastic composite film shell and ear tabs, etc. The aluminum-plastic composite film shell at the corner of the soft-pack lithium battery is easily damaged during production and transportation. Therefore, the part to be detected of the soft-pack lithium battery described in the embodiments of the present application can be the corner part.

[0034] In one case, the image of the soft-pack lithium battery can be obtained by a photographing device photographing the soft-pack lithium battery. In another case, the image of the soft-pack lithium battery can be obtained through a soft-pack lithium battery corner appearance defect detection platform, which includes a base, a fixed bracket, an industrial camera, an industrial lens, an industrial control computer, etc. The platform can be set with 2 industrial cameras with 12 million pixels each, for collecting 2 corner images of the soft-pack lithium battery at one time. Exemplarily, the soft-pack lithium battery corner appearance defect detection platform is as Figure 2 shown.

[0035] Specifically, in a feasible solution, a first image of the part to be detected of the soft-pack lithium battery is obtained through the industrial camera of the soft-pack lithium battery corner appearance defect detection platform. In another feasible solution, an image of the soft-pack lithium battery is obtained through the industrial camera of the soft-pack lithium battery corner appearance defect detection platform, and the image of the soft-pack lithium battery is intercepted through a preset ROI area to obtain a first image of the part to be detected.

[0036] S120, process the first image based on a pre-trained first appearance detection model to obtain a recognition result.

[0037] Among them, the first appearance detection model is constructed by unsupervised learning; during the training process of the first appearance detection model, it is trained in an unsupervised learning manner. The first appearance detection model is used to perform abnormal recognition on the appearance of the soft-pack lithium battery to obtain a recognition result, and the recognition result includes two situations, one is no defect, and the other is defective.

[0038] In a feasible solution, the training process of the first appearance detection model can be: obtain the images of the soft-pack lithium battery during the historical production process, intercept the images of the part to be detected from them, and after pre-configuring the parameters of the first appearance detection model to be trained, train the first appearance detection model to be trained based on the images of the part to be detected. After the model passes the verification, the trained first appearance detection model is obtained.

[0039] Specifically, after obtaining the first appearance detection model that has completed training, the first image is processed by the first appearance detection model to obtain the output result of the first appearance detection model, and this output result is the recognition result. If the recognition result is defect-free, it indicates that there are no defects in the part to be detected of the soft-pack lithium battery in the first image. If the recognition result is defective, the recognition result also includes the defective area identified by the first appearance detection model in the first image, and this defective area can be further detected by the second appearance classification model.

[0040] S130, if the recognition result is defective, then based on the pre-trained second appearance classification model, the defective area in the recognition result is processed to obtain the detection result of the part to be detected of the soft-pack lithium battery.

[0041] Among them, the second appearance classification model is constructed by means of supervised learning. During the training process of the second appearance classification model, it is trained based on the method of supervised learning. The second appearance classification model is used to perform classification detection on the defective area output by the first appearance detection model to obtain the detection result of the part to be detected of the soft-pack lithium battery.

[0042] In an embodiment of the present application, optionally, the detection result of the second appearance classification model includes at least one of the following: deformation, pit, scratch, dirt, and false alarm.

[0043] In an embodiment of the application, the defects of the part to be detected of the soft-pack lithium battery include, but are not limited to: deformation, pit, scratch, and dirt. Since the input of the second appearance classification model is the defective area, and the first appearance detection model is an unsupervised model, the defective area identified by it may actually have no defects. Therefore, in an embodiment of the present application, a new label: false alarm, is also set for the training data, and this label reflects the situation where the recognition result of the first appearance detection model is incorrect.

[0044] Exemplarily, if during the training process of the second appearance classification model, the label of the training sample is deformation, pit, scratch, dirt, or false alarm, then after the trained second appearance classification model processes the defective area in the recognition result, the detection result of the part to be detected of the soft-pack lithium battery is: deformation, pit, scratch, dirt, or false alarm. If during the training process of the second appearance classification model, the label of the training sample is at least one of the following: deformation, pit, scratch, dirt, and false alarm, then after the trained second appearance classification model processes the defective area in the recognition result, the detection result of the part to be detected of the soft-pack lithium battery includes at least one of the following: deformation, pit, scratch, dirt, or false alarm.

[0045] The technical solution of the embodiment of the present application includes: obtaining a first image of the part to be detected of a soft-pack lithium battery; processing the first image based on a pre-trained first appearance detection model to obtain a recognition result; the first appearance detection model is constructed by unsupervised learning; if the recognition result is that there are defects, then based on a pre-trained second appearance classification model, the defective area in the recognition result is processed to obtain a detection result of the part to be detected of the soft-pack lithium battery; the second appearance classification model is constructed by supervised learning. This technical solution first uses the first appearance detection model constructed by unsupervised learning to identify the first image. When the recognition result is defective, the defective area can be initially determined, and then the detection result of the defective area can be determined by the second appearance classification model, avoiding the problem of high false alarm rate in detection by a single unsupervised model; since the input data of the second appearance classification model constructed by supervised learning is the defective area, compared with the solution where the input data is the entire image, the computational amount and computational difficulty of the second appearance classification model are greatly reduced, so that the second appearance classification model can accurately identify defects even with fewer training samples, greatly reducing the model training cost.

[0046] Embodiment 2

[0047] Figure 3 The flowchart of an appearance detection method for a soft-pack lithium battery provided by the second embodiment of the present application is based on the above embodiment for optimization.

[0048] As Figure 3 shown, the method of the embodiment of the present application specifically includes the following steps:

[0049] S210, obtaining a captured image of the soft-pack lithium battery through a capturing device.

[0050] Exemplarily, the capturing device may be an industrial camera, and the captured image of the soft-pack lithium battery is obtained through the industrial camera in the soft-pack lithium battery corner appearance defect detection platform as Figure 2 shown.

[0051] S220, performing an intercepting operation on the captured image based on a pre-set corner detection area to obtain a first image of the part to be detected.

[0052] Exemplarily, a first image of the corner part of the product in the first image is intercepted through a pre-set ROI area (the ROI area is the corner detection area) to obtain an image with a resolution of 2048*2048.

[0053] The method further includes: preprocessing the first image, such as denoising processing.

[0054] S230: Process the first image based on a pre-trained first appearance detection model to obtain a recognition result.

[0055] The first appearance detection model is constructed by unsupervised learning. The first appearance detection model is a DiffusionAD unsupervised learning detection model. It should be noted that the model is an open source model. This solution complies with the open source agreement and intellectual property regulations when citing external software content and model architecture.

[0056] Exemplarily, the first image is input into the improved DiffusionAD unsupervised learning detection model for recognition. If the recognition result includes a defective area, the defective area is further processed by the second appearance classification model.

[0057] S240: If the recognition result is that there is a defect, the defective area in the recognition result is processed based on a pre-trained second appearance classification model to obtain a detection result of the to-be-detected part of the soft-pack lithium battery.

[0058] Wherein, the second appearance classification model is constructed by supervised learning.

[0059] Exemplarily, the maximum circumscribed rectangular area of the defect area is obtained through ROI interception using the OpenCV (Open Source Computer Vision Library) open source library, and the intercepted image is input into the resnet50 classification model (which is an open source model) for classification detection to obtain the detection result of the defect area.

[0060] Exemplarily, the detection result of the second appearance classification model includes at least one of the following: deformation, pits, scratches, dirt and false alarms; the false alarm means that the recognition result of the first appearance detection model is wrong, and there is actually no defect in the defect area.

[0061] This scheme is set up in such a way that defective products that appear in the production process can be detected in a timely manner, thereby improving the product yield; it solves the problem of high false alarm rate in a single unsupervised learning product appearance defect detection method, and is based on a soft-pack lithium battery appearance defect detection method that combines unsupervised and supervised learning. It combines the respective advantages of supervised and unsupervised learning, shortens the project's R&D cycle, and improves the detection accuracy of the detection system.

[0062] The method also includes: after detecting that the product is an unqualified product (NG product), the NG character is displayed and the defect type is prompted, and the data is counted in the background database. If the product is detected as a qualified product or a false positive area product, the software interface displays an OK character prompt.

[0063] In an embodiment of the present application, optionally, after processing the first image based on a pre-trained first appearance detection model to obtain an identification result, the method further includes: if the identification result is defect-free, determining that the detection result of the part to be detected of the soft-pack lithium battery is defect-free.

[0064] With this setting, after the identification result of the first appearance detection model is defect-free, the result is directly determined as the final detection result, avoiding subsequent defect detection, which has the effect of greatly improving the speed of generating the detection result.

[0065] Exemplarily, in a specific example, the appearance detection method of the soft-pack lithium battery includes: Steps 1 - 7:

[0066] Step 1: Build a detection platform for the appearance defects of the corners of the soft-pack lithium battery. The detection platform is as Figure 2 shown. The detection platform includes a base, a fixed bracket, an industrial camera, an industrial lens, an industrial control computer, etc. The platform is provided with 2 industrial cameras with 12 million pixels, which are used to collect 2 corner images of the soft-pack lithium battery at one time, and a total of 560 qualified product OK images and 80 unqualified product NG images are collected as the data set for model training.

[0067] Step 2: Intercept the effective area (corner detection area) of the product in each image by setting the ROI area to obtain images with a resolution of 2048 * 2048. Among them, there are 560 qualified product OK images and 80 defective NG images.

[0068] The specific steps included in Step 2 are as follows: Step 2.1: Intercept the effective detection area (2048 * 2048) MainRegionImage in the 12 million pixel image through the set ROI area; Step 2.2: Perform image preprocessing on MainRegionImage (for example: denoising, etc.).

[0069] Step 3: Select 500 qualified images (the second image) to train the improved unsupervised DiffusionAD model (the first appearance detection model) to obtain the training weights of the model. After the model training is completed, use 60 qualified product OK images (the third image) and 80 unqualified product NG images (the fourth image) as the verification data set to verify the training weights. If the obtained result does not meet the requirements, adjust the model hyperparameters and retrain.

[0070] Among them, the specific steps in step 3 are as follows: Step 3.1: Select 500 qualified images (2048*2048) as the training dataset for the improved DiffusionAD model of unsupervised learning. The video memory is 11G, the computer memory is 128G, and the set hyperparameters are BatchSize = 4 and Max_epochs = 2000. Step 3.2: Select 60 qualified OK images and 80 defective NG images as the validation dataset for the improved DiffusionAD model.

[0071] Step 4: The detection result defect area or false alarm area obtained by the improved DiffusionAD model predicting the validation dataset. Using the OpenCV open source library, the maximum circumscribed rectangle area of the defect area or false alarm area is intercepted through ROI to obtain a classification dataset including defect and false alarm images together.

[0072] Step 5: Resize the classification dataset to images with a resolution of 64*64. Divide it into 5 types of data: deformation, pit, scratch, dirt, and false alarm. Select resnet50 (the second appearance classification model) as the classification model, and use the classification dataset to train the resnet50 classification model. After training is completed, obtain the weights of the resnet50 classification model.

[0073] Among them, the specific steps in step 5 are as follows: Step 5.1: Resize the classification dataset to images with a resolution of 64*64. Divide it into 5 types of data: deformation, pit, scratch, dirt, and false alarm, that is, put the classification dataset into 5 corresponding folders respectively; Step 5.2: Select resnet50 as the classification model, and use the classification dataset to train the resnet50 classification model to obtain the weights of the resnet50 classification model.

[0074] During prediction, the software system first intercepts the original image taken by the industrial camera through ROI to obtain an image area ImageSrcROI with a resolution of 2048*2048. Input ImageSrcROI (the first image) into the improved DiffusionAD unsupervised learning detection model (the first appearance detection model) for prediction. If a defect area or false alarm area is predicted, use OpenCV to intercept the maximum circumscribed rectangle area of the defect area or false alarm area through ROI to obtain the ImageMaybeDefectROI picture. Input ImageMaybeDefectROI into the resnet50 classification model (the second appearance classification model) for prediction to obtain the defect type of the defect area or determine it as a false alarm. The software system displays the corresponding prompt information according to the defect type or false alarm.

[0075] Step 7: After detecting that the product is a non-conforming product (NG product), the software interface displays an NG character prompt, shows the defect type, and statistics the data into the background database. If it is a qualified product or a product in the false alarm area, the software interface displays an OK character prompt, as Figure 4 shown Figure 4 is a schematic diagram of the appearance defect detection result of the corner area of a soft-pack lithium battery.

[0076] The technical solution of this application includes a method for detecting appearance defects of soft-pack lithium batteries based on the combination of unsupervised and supervised learning, which has the following beneficial effects: timely detecting defective products in the production process, improving the product yield; solving the problems in the method for detecting appearance defects of products by supervised learning that a large number of various defect samples need to be collected and a large amount of manual annotation of data sets is required, with a long data collection cycle and high annotation cost; solving the problem of high false alarm rate in the method for detecting appearance defects of products by single unsupervised learning. The method for detecting appearance defects of soft-pack lithium batteries based on the combination of unsupervised and supervised learning combines the respective advantages of supervised and unsupervised learning, shortens the R & D cycle of the project, and improves the detection accuracy of the detection system; effectively records the batch number of defective products, the number of defective pieces, the position of defects, and the defect type, assisting production personnel to better optimize the process and further improve the product yield and production efficiency.

[0077] Embodiment III

[0078] Figure 5 is a flowchart of the training process of the first appearance detection model provided in Embodiment III of this application. Embodiment III of this application is optimized based on the above embodiment.

[0079] As Figure 5 shown, the method of the embodiment of this application specifically includes the following steps:

[0080] S310, obtaining a second image of a first preset number of defect-free parts to be detected.

[0081] Among them, the second image includes defect-free parts to be detected of the soft-pack lithium battery, such as the corner part. The first preset number can be determined according to the actual situation, and this application does not limit it. Exemplarily, the first preset number is 500.

[0082] S320, training the first appearance detection model to be trained based on the second image to obtain a trained first appearance detection model.

[0083] S330, verifying the trained first appearance detection model through a verification data set to obtain a verification result.

[0084] Among them, the verification dataset includes the third images of the to-be-detected parts with and without defects and the fourth images of the to-be-detected parts with defects. The third images contain the to-be-detected parts without defects of the soft-pack lithium battery. Exemplarily, the to-be-detected part is the corner area, and the number of the third images is 60. The fourth images contain the to-be-detected parts with defects of the soft-pack lithium battery. Exemplarily, the to-be-detected part is the corner area, and the number of the fourth images is 80.

[0085] Specifically, after determining the third images and the fourth images, the trained first appearance detection model is verified based on the third images and the fourth images to obtain a verification result. The verification result contains defective and non-defective. It should be noted that this verification result is the result output by the first appearance detection model, and this result may not be correct. For example, the third images are actually all non-defective, but the verification result output by the first appearance detection model for the third images may be defective. In this case, it indicates that the first appearance detection model has a false alarm problem.

[0086] S340, determine whether the verification result meets the training completion requirement. If so, execute S350; otherwise, execute S360.

[0087] Exemplarily, it is possible to compare whether the verification result matches the true labels of the third images and the fourth images. If they do not match or the proportion of non-matching is greater than a preset threshold, it is determined that the verification result does not meet the training completion requirement; otherwise, it is determined that the verification result meets the training completion requirement.

[0088] S350, determine the first appearance detection model as the first appearance detection model after training is completed.

[0089] Specifically, if the verification result meets the training completion requirement, it can be determined that the first appearance detection model has completed training.

[0090] S360, train the first appearance detection model again until the verification result meets the training completion requirement.

[0091] Specifically, if the verification result does not meet the training completion requirement, it can be determined that the first appearance detection model has not completed training, and the model hyperparameters can be adjusted and training can be carried out again.

[0092] In an embodiment of the present application, optionally, the training process of the second appearance classification model includes: obtaining a fifth image corresponding to a defective verification result output by the first appearance detection model; the verification result is obtained by verifying the trained first appearance detection model through a verification dataset; the verification dataset includes a third image of a part to be detected with or without a defect and a fourth image of a part to be detected with a defect; determining the label of the fifth image; training the second appearance classification model to be trained based on the fifth image and the label of the fifth image to obtain the trained second appearance classification model.

[0093] Among them, the fifth image is an image considered defective by the first appearance detection model in the verification dataset. It should be noted that the fifth image is not the fourth image because the fourth image is an image with an actual defect, while the fifth image is an image identified as defective by the first appearance detection model in the verification dataset. Since the first appearance detection model may have misidentifications, the fifth image and the fourth image are different.

[0094] Specifically, after obtaining the verification result output by the first appearance detection model for the verification dataset, determine the images marked as defective by the first appearance detection model in the verification result as the fifth images, and then obtain the labels marked by the user for each fifth image. Then, train the second appearance classification model to be trained based on the fifth image and the label of each fifth image to obtain the trained second appearance classification model.

[0095] With this setting in this solution, the training data of the second appearance classification model overlaps with the verification dataset of the first appearance detection model, avoiding the situation of obtaining the training data of the second appearance classification model again and saving costs. In addition, since the training samples of the second appearance classification model are the images in which the first appearance detection model detects defects during verification, the second appearance classification model can be used to further determine the type of defect and whether there is a false alarm in the output of the first appearance detection model, greatly improving the accuracy of appearance defect recognition.

[0096] In an embodiment of the present application, optionally, after obtaining the fifth image corresponding to a defective verification result output by the first appearance detection model, the method further includes: determining the minimum bounding rectangle of the defective area determined by the first appearance detection model in the fifth image; performing a cropping operation on the defective area of the minimum bounding rectangle and scaling the cropped image to a fixed size to obtain a sixth image; correspondingly, training the second appearance classification model to be trained based on the fifth image and the label of the fifth image to obtain the trained second appearance classification model includes: training the second appearance classification model to be trained based on the sixth image and the label of the sixth image to obtain the trained second appearance classification model.

[0097] Exemplarily, the maximum circumscribed rectangle of the defective area can be determined in the fifth image, and then an intercepting operation is performed on the defective area of the maximum circumscribed rectangle, and the intercepted image is scaled to a fixed size to obtain a sixth image; the fixed size refers to the size of the image pixels, and the fixed size can be determined according to the actual situation; the label of the fifth image is determined as the label of the sixth image, and then the second appearance classification model is trained based on the sixth image and the label of the sixth image. Such a setting can reduce the amount of image data processed by the second appearance classification model, improve the training speed, and improve the classification speed when the second appearance classification model is actually applied.

[0098] Embodiment 4

[0099] Figure 6 FIG. is a schematic structural diagram of an appearance detection device for a soft-pack lithium battery provided in Embodiment 4 of the present application. This device can execute the appearance detection method for the soft-pack lithium battery provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method. As Figure 6 shown, the device includes:

[0100] A first image acquisition module 410, configured to acquire a first image of a part to be detected of a soft-pack lithium battery;

[0101] An identification result determination module 420, configured to process the first image based on a pre-trained first appearance detection model to obtain an identification result; the first appearance detection model is constructed by an unsupervised learning method;

[0102] A detection result determination module 430, configured to, if the identification result is that there is a defect, process the defective area in the identification result based on a pre-trained second appearance classification model to obtain a detection result of the part to be detected of the soft-pack lithium battery; the second appearance classification model is constructed by a supervised learning method.

[0103] The technical solution of the embodiment of the present application includes: a first image acquisition module 410, configured to acquire a first image of a to-be-detected part of a soft-pack lithium battery; an identification result determination module 420, configured to process the first image based on a pre-trained first appearance detection model to obtain an identification result; the first appearance detection model is constructed by an unsupervised learning method; a detection result determination module 430, configured to, if the identification result is defective, process the defective area in the identification result based on a pre-trained second appearance classification model to obtain a detection result of the to-be-detected part of the soft-pack lithium battery; the second appearance classification model is constructed by a supervised learning method. This technical solution first identifies the first image through the first appearance detection model constructed based on unsupervised learning. In the case of a defective identification result, the defective area can be initially determined, and then the detection result of the defective area is determined through the second appearance classification model, avoiding the problem of high false alarm rate in detection by a single unsupervised model; since the input data of the second appearance classification model constructed based on supervised learning is the defective area, compared with the solution where the input data is the entire image, the computational amount and computational difficulty of the second appearance classification model are greatly reduced, so that the second appearance classification model can accurately identify defects even with fewer training samples, greatly reducing the model training cost.

[0104] In the embodiment of the present application, optionally, the detection result of the second appearance classification model includes at least one of the following: deformation, pit, scratch, dirt, and false alarm.

[0105] In the embodiment of the present application, optionally, the device further includes: a first appearance detection model training module, including:

[0106] a second image acquisition unit, configured to acquire a second image of a to-be-detected part without defects in a first preset number;

[0107] a first appearance detection model training unit, configured to train a first appearance detection model to be trained based on the second image to obtain a trained first appearance detection model;

[0108] a first appearance detection model verification unit, configured to verify the trained first appearance detection model through a verification data set to obtain a verification result; the verification data set includes a third image of a to-be-detected part with and without defects and a fourth image of a to-be-detected part with defects;

[0109] a first appearance detection model determination unit, configured to, if the verification result meets the training completion requirement, determine the first appearance detection model as the trained first appearance detection model;

[0110] Otherwise, train the first appearance detection model again until the verification result meets the training completion requirement.

[0111] In an embodiment of the present application, optionally, the device further includes: a second appearance classification model training module, including:

[0112] A fifth image acquisition unit, configured to acquire a fifth image corresponding to a defective verification result output by the first appearance detection model; the verification result is obtained by verifying the trained first appearance detection model with a verification dataset; the verification dataset includes a third image of a part to be detected with and without defects and a fourth image of a defective part to be detected;

[0113] A label determination unit, configured to determine the label of the fifth image;

[0114] A second appearance classification model training unit, configured to train a second appearance classification model to be trained based on the fifth image and the label of the fifth image, and obtain a trained second appearance classification model.

[0115] In an embodiment of the present application, optionally, the device further includes:

[0116] A maximum circumscribed rectangle determination unit, configured to determine the maximum circumscribed rectangle of the defective area determined by the first appearance detection model in the fifth image;

[0117] A sixth image determination unit, configured to perform an interception operation on the defective area of the maximum circumscribed rectangle, and scale the intercepted image to a fixed size to obtain a sixth image;

[0118] Correspondingly, the second appearance classification model training unit includes:

[0119] A second appearance classification model training subunit, configured to train a second appearance classification model to be trained based on the sixth image and the label of the sixth image, and obtain a trained second appearance classification model.

[0120] In an embodiment of the present application, optionally, the device further includes:

[0121] A second detection result determination module, configured to determine that the detection result of the part to be detected of the soft-pack lithium battery is defect-free if the recognition result is defect-free.

[0122] In an embodiment of the present application, optionally, the first image acquisition module 410 includes:

[0123] A captured image acquisition unit, configured to acquire a captured image of the soft-pack lithium battery through a capturing device;

[0124] A first image determination unit, configured to perform an interception operation on the captured image based on a preset corner detection area to obtain a first image of the part to be detected.

[0125] The appearance detection device of a soft-pack lithium battery provided by an embodiment of the present application can execute the appearance detection method of a soft-pack lithium battery provided by any embodiment of the present invention, and has function modules and beneficial effects corresponding to the execution of the method.

[0126] Embodiment 5

[0127] Figure 7 FIG. shows a schematic structural diagram of an electronic device 10 that can be used to implement the embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as, personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0128] As Figure 7 shown, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc. Among them, the memory stores a computer program executable by the at least one processor. The processor 11 can execute various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. The input / output (I / O) interface 15 is also connected to the bus 14.

[0129] Multiple components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disc, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0130] The processor 11 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the appearance detection method for a soft-pack lithium battery.

[0131] In some embodiments, the appearance detection method for a soft-pack lithium battery can be implemented as a computer program, which is tangibly included in a computer-readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the appearance detection method for a soft-pack lithium battery described above can be executed. Alternatively, in other embodiments, the processor 11 can be configured to execute the appearance detection method for a soft-pack lithium battery in any other suitable manner (e.g., by means of firmware).

[0132] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: implemented in one or more computer programs, the one or more computer programs can be executed and / or interpreted on a programmable system including at least one programmable processor, the programmable processor can be a dedicated or general-purpose programmable processor, can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowchart and / or block diagram are implemented. The computer program can be executed entirely on the machine, partially on the machine, as an independent software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0134] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0135] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0136] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.

[0137] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0138] It should be understood that various forms of the processes shown above can be used, steps can be reordered, added, or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0139] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An appearance detection method for a soft-pack lithium battery, characterized in that, Including: Obtain a first image of the part to be detected of a soft-pack lithium battery; Process the first image based on a pre-trained first appearance detection model to obtain a recognition result; the first appearance detection model is constructed by unsupervised learning; If the recognition result indicates a defect, process the defective area in the recognition result based on a pre-trained second appearance classification model to obtain a detection result of the part to be detected of the soft-pack lithium battery; the second appearance classification model is constructed by supervised learning.

2. The method according to claim 1, characterized in that, The detection result of the second appearance classification model includes at least one of the following: deformation, pit, scratch, dirt, and false alarm.

3. The method according to claim 1, wherein The training process of the first appearance detection model includes: Obtain second images of a first preset number of parts to be detected without defects; Train a first appearance detection model to be trained based on the second images to obtain a trained first appearance detection model; Verify the trained first appearance detection model through a validation dataset to obtain a verification result; the validation dataset includes third images of parts to be detected with and without defects and fourth images of parts to be detected with defects; If the verification result meets the training completion requirement, determine the first appearance detection model as the trained first appearance detection model; Otherwise, train the first appearance detection model again until the verification result meets the training completion requirement.

4. The method according to claim 1, wherein The training process of the second appearance classification model includes: Obtain a fifth image corresponding to when the verification result output by the first appearance detection model indicates a defect; the verification result is obtained by verifying the trained first appearance detection model through a validation dataset; the validation dataset includes third images of parts to be detected with and without defects and fourth images of parts to be detected with defects; Determine the label of the fifth image; Train a second appearance classification model to be trained based on the fifth image and the label of the fifth image to obtain a trained second appearance classification model.

5. The method according to claim 4, characterized in that After obtaining a fifth image corresponding to when the verification result output by the first appearance detection model indicates a defect, the method further includes: Determine the minimum bounding rectangle of the defective area determined by the first appearance detection model in the fifth image; Perform a cropping operation on the defective area of the minimum bounding rectangle and scale the cropped image to a fixed size to obtain a sixth image; Correspondingly, training a second appearance classification model to be trained based on the fifth image and the label of the fifth image to obtain a trained second appearance classification model includes: Train a second appearance classification model to be trained based on the sixth image and the label of the sixth image to obtain a trained second appearance classification model.

6. The method according to claim 1, wherein After processing the first image based on a pre-trained first appearance detection model to obtain a recognition result, the method further includes: If the recognition result indicates no defect, determine that the detection result of the part to be detected of the soft-pack lithium battery is no defect.

7. The method according to claim 1, wherein Obtaining a first image of the part to be detected of a soft-pack lithium battery includes: Obtain a captured image of the soft-pack lithium battery through a photographing device; Perform an intercept operation on the captured image based on a preset corner detection area to obtain a first image of the part to be detected.

8. An appearance detection device for a soft-pack lithium battery, characterized in that, It includes: A first image acquisition module, configured to acquire a first image of the part to be detected of a soft-pack lithium battery; An identification result determination module, configured to process the first image based on a pre-trained first appearance detection model to obtain an identification result; the first appearance detection model is constructed by an unsupervised learning method; A detection result determination module, configured to, if the identification result indicates a defect, process the defective area in the identification result based on a pre-trained second appearance classification model to obtain a detection result of the part to be detected of the soft-pack lithium battery; the second appearance classification model is constructed by a supervised learning method.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the appearance detection method of the soft-pack lithium battery according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to implement the appearance detection method of the soft-pack lithium battery according to any one of claims 1-7 when executed by a processor.