Pole piece anomaly detection method and device and nonvolatile storage medium
By using the variable kernel convolution module and the border regression loss function to optimize parameters in the pole piece anomaly detection model, the problems of low pole piece anomaly detection accuracy and high overkill rate in the existing technology are solved, and the detection in complex environments is achieved. Efficient anomaly detection.
Patent Information
- Application Number
- CN202411377873.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-24
AI Technical Summary
In the prior art, the extreme abnormality detection algorithm has low accuracy and high overkill rate, making it difficult to effectively detect complex nonlinear abnormal patterns.
The variable kernel convolution module is used to extract feature maps in the pole piece anomaly detection model, and the convolution kernel size is dynamically adjusted to adapt to different feature scales. The model parameters are optimized to improve detection performance by combining the border regression loss function and optimizer.
It effectively learns under limited abnormal samples, adapts to complex pole piece characteristics, and is suitable for real-time online anomaly detection systems. It improves the performance of pole piece anomaly detection algorithms and reduces the overkill rate.
Smart Images

Figure CN119360088A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of battery pole piece quality detection, and in particular to a pole piece abnormality detection method, device and non-volatile storage medium. Background Art
[0002] The performance of the pole piece directly affects the overall performance and life of the battery. Therefore, the quality control of the pole piece is crucial, especially the abnormal detection of the pole piece. At present, the abnormal detection of the pole piece mainly relies on manual re-inspection or traditional machine vision technology. However, these methods have some problems: manual visual inspection is inefficient, easy to fatigue and highly subjective; traditional machine vision technology can usually only process simple and regular image features, and has limited ability to recognize complex and nonlinear abnormal patterns; the traditional method relies on some indicators to directly judge whether the pole piece is abnormal, resulting in a high overkill rate, causing the number of pole pieces produced to fail to meet the target.
[0003] In recent years, with the development of deep learning technology, related research has begun to try to apply deep learning to abnormality detection of pole pieces. For example, by using convolutional neural networks to extract features from pole piece images, and then using traditional machine learning models such as support vector machines or random forests for classification, it is possible to determine whether the pole piece is normal. Although deep learning has shown potential in pole piece anomaly detection, there are still some problems and challenges: first, how to effectively learn useful features from a small number of abnormal samples; second, how to design a deep learning model suitable for pole piece characteristics; and finally, how to apply deep learning models to real-time online anomaly detection systems.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present invention provide a method, device and non-volatile storage medium for detecting anomalies of a pole piece, so as to at least solve the technical problems of low accuracy and high overkill rate of anomaly detection algorithms of pole pieces in related technologies.
[0006] According to one aspect of an embodiment of the present invention, a method for detecting an abnormality of a pole piece is provided, comprising: obtaining image data of a pole piece to be detected in a target production line; inputting the image data of the pole piece to be detected into a target pole piece abnormality detection model, and using a variable kernel convolution module in the target pole piece abnormality detection model to extract a feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected; and determining an abnormality detection result of the pole piece to be detected based on the feature map of the image data of the pole piece to be detected.
[0007] Optionally, before inputting the image data of the pole piece to be detected into the target pole piece abnormality detection model, the training method for the target pole piece abnormality detection model includes: obtaining image data of multiple pole pieces in the target production line, wherein the image data is image data with annotated abnormal types; inputting the image data of multiple pole pieces in the target production line into the initial pole piece abnormality detection model, and extracting the feature maps corresponding to each of the multiple pole pieces in the target production line through the variable kernel convolution module in the initial pole piece abnormality detection model; based on the feature maps corresponding to each of the multiple pole pieces in the target production line, determining the bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line; based on the loss function of the initial pole piece abnormality detection model and the bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line, determining the border regression loss corresponding to each of the multiple pole pieces in the target production line, wherein the border regression loss characterizes the difference between the bounding box of the abnormal position of the corresponding pole piece and the bounding box of the actual abnormal position; based on the optimizer of the initial pole piece abnormality detection model and the border regression loss corresponding to each of the multiple pole pieces in the target production line, adjusting the parameters of the initial pole piece abnormality detection model to obtain the target pole piece abnormality detection model.
[0008] Optionally, the initial pole piece anomaly detection model is obtained by training a preset neural network model using image data of pole pieces in multiple production lines, wherein the image data of pole pieces in multiple production lines are image data with annotated abnormal types.
[0009] Optionally, the training method also includes: obtaining initial image data of multiple pole pieces in the target production line; labeling the initial image data of multiple pole pieces in the target production line based on the abnormal types of the multiple pole pieces in the target production line to obtain labeled image data of multiple pole pieces in the target production line; performing processing operations on the labeled image data of multiple pole pieces in the target production line to obtain image data of multiple pole pieces in the target production line, wherein the processing operations include at least one of the following: adding noise processing, rotation processing, flipping processing and scaling processing.
[0010] Optionally, the image data of multiple pole pieces in the target production line are input into the initial pole piece abnormality detection model, and the feature maps corresponding to each of the multiple pole pieces in the target production line are extracted through the variable kernel convolution module in the initial pole piece abnormality detection model, including: based on the image data of multiple pole pieces in the target production line, determining the feature scales corresponding to each of the image data of multiple pole pieces in the target production line; based on the feature scales corresponding to each of the image data of multiple pole pieces in the target production line, determining the convolution kernel size corresponding to each of the image data of multiple pole pieces in the target production line through the variable kernel convolution module; based on the convolution kernel size corresponding to each of the image data of multiple pole pieces in the target production line, extracting the feature maps corresponding to each of the multiple pole pieces in the target production line through the variable kernel convolution module.
[0011] Optionally, based on the feature maps corresponding to each of the multiple pole pieces in the target production line, the bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line are determined, including: based on the feature maps corresponding to each of the multiple pole pieces in the target production line, multiple candidate bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line are determined; the confidences of the multiple candidate bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line are calculated; based on the confidences of the multiple candidate bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line, the candidate bounding box with the largest confidence among the multiple candidate bounding boxes is selected as the bounding box of the abnormal positions corresponding to each of the multiple pole pieces in the target production line.
[0012] Optionally, the loss function of the initial pole piece anomaly detection model is a shape-based intersection-over-union loss function.
[0013] Optionally, the optimizer of the initial pole piece anomaly detection model is an evolutionary symbolic momentum optimizer.
[0014] Optionally, the method further includes: displaying the abnormal detection result and the image data of the electrode to be detected on a preset screen.
[0015] According to another aspect of an embodiment of the present invention, a pole piece abnormality detection device is also provided, including: an acquisition module for acquiring image data of a pole piece to be detected in a target production line; an extraction module for inputting the image data of the pole piece to be detected into a target pole piece abnormality detection model, and using a variable kernel convolution module in the target pole piece abnormality detection model to extract a feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected; and a determination module for determining the abnormality detection result of the pole piece to be detected based on the feature map of the image data of the pole piece to be detected.
[0016] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned pole piece abnormality detection methods.
[0017] According to another aspect of an embodiment of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above-mentioned pole piece abnormality detection methods is executed.
[0018] According to yet another aspect of an embodiment of the present invention, there is further provided a computer program product, comprising a computer program, which implements any one of the above-mentioned pole piece abnormality detection methods when executed by a processor.
[0019] In an embodiment of the present invention, a pole piece abnormality detection method is adopted, by obtaining image data of the pole piece to be detected in the target production line; the image data of the pole piece to be detected is input into the target pole piece abnormality detection model, and a variable kernel convolution module in the target pole piece abnormality detection model is used to extract a feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected; based on the feature map of the image data of the pole piece to be detected, the abnormality detection result of the pole piece to be detected is determined, so that the pole piece abnormality detection algorithm can effectively learn under limited abnormal samples, adapt to complex pole piece characteristics, and be suitable for real-time online abnormality detection system, thereby achieving the technical effect of improving the performance of the pole piece abnormality detection algorithm, and then solving the technical problems of low accuracy and high overkill rate of the pole piece abnormality detection algorithm in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0021] Figure 1 A hardware structure block diagram of a computer terminal for implementing a method for detecting an abnormality of a pole piece is shown;
[0022] Figure 2 is a flow chart of a method for detecting anomalies of a pole piece according to an embodiment of the present invention;
[0023] Figure 3 is a schematic diagram of information of a predicted frame and a real frame provided according to an optional embodiment of the present invention;
[0024] Figure 4 It is a structural block diagram of a pole piece abnormality detection device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, 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 inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] According to an embodiment of the present invention, an embodiment of a pole piece abnormality detection method is provided. 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 an order different from that shown here.
[0028] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for detecting abnormality of a pole piece. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0029] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0030] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the pole piece abnormality detection method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the pole piece abnormality detection method of the above-mentioned application is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0031] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0032] Figure 2 FIG. 1 is a flow chart of a method for detecting an abnormality of a pole piece according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0033] Step S201, obtaining image data of the electrode to be inspected in the target production line.
[0034] In this step, the target production line is the production line that needs to test the quality of the electrode, and the image data of the electrode to be tested is pre-processed and can be input into the neural network model for prediction. The pre-processing may include adjusting the image size, normalization, grayscale, and noise removal.
[0035] Step S202, input the image data of the pole piece to be detected into the target pole piece anomaly detection model, and use the variable kernel convolution module in the target pole piece anomaly detection model to extract the feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected.
[0036] In this step, the variable kernel convolution module (LDConv, Locally Dynamic Convolution) is a new type of convolutional neural network module, which can adapt to different features and improve network performance. The variable kernel convolution module is characterized by being able to dynamically adjust the size and shape of the convolution kernel so that it can better capture local features. For example, a variable kernel convolution module can be added to the Neck part of the YOLOv8 (YouOnly Look Once, single-stage target detection model) model, so that the convolution kernel can have any number of parameters and sampling shapes, breaking through the limitations of traditional convolutions that are limited to fixed local windows and fixed sampling shapes, while supporting linear increase and decrease in the number of convolution parameters, reducing model parameters and computational costs. This convolution kernel can improve the model's detection performance for abnormal polar objects of different target sizes, and can be deployed in resource-constrained devices such as mobile devices, providing new ideas and directions for the future development of industrial target detection technology. According to the different feature scales of the image data input into the model, the variable kernel convolution module can automatically adjust the appropriate convolution kernel size to extract the feature map of the image data. Among them, the characteristic scale is the characteristic length for evaluating the image structure, which is similar to the characteristic length in physics. It represents the local characteristics of the image and describes the prominence of a certain structure or feature in the image in the scale space. Therefore, different images have different characteristic scales, and different convolution kernel sizes are required when extracting image features. Feature maps refer to image features extracted from input images (or other types of data) through convolution operations in convolutional neural networks. Feature maps can be regarded as abstract representations of raw data, in which each pixel or area represents some specific features.
[0037] Step S203, determining an abnormality detection result of the pole piece to be detected based on the feature map of the image data of the pole piece to be detected.
[0038] In this step, the anomaly detection result can be the presence of an anomaly or the absence of an anomaly. In the case of an anomaly, according to the prediction mechanism of the target pole piece anomaly detection model, a series of candidate boxes can be output on the feature map of the image data of the pole piece to be detected, and the target pole piece anomaly detection model can select the best candidate box as the output of the anomaly detection result, and the anomaly detection result also includes the position and confidence of the detected anomaly in the image. According to the extracted feature map, the target pole piece anomaly detection model can predict the most likely type of anomaly in the input image based on the experience accumulated after training, and use the prediction box to mark the location of the existing anomaly.
[0039] Through the above steps, the purpose of achieving that the pole piece anomaly detection algorithm can effectively learn under limited abnormal samples, adapt to complex pole piece characteristics, and be suitable for real-time online anomaly detection system is achieved, thereby achieving the technical effect of improving the performance of the pole piece anomaly detection algorithm, and further solving the technical problems of low accuracy and high overkill rate of the pole piece anomaly detection algorithm in related technologies.
[0040] As an optional embodiment, before inputting the image data of the electrode to be detected into the target electrode anomaly detection model, the training method for the target electrode anomaly detection model includes: obtaining image data of multiple electrodes in the target production line, wherein the image data is image data with annotated abnormality types; inputting the image data of multiple electrodes in the target production line into the initial electrode anomaly detection model, and extracting the feature maps corresponding to the multiple electrodes in the target production line through the variable kernel convolution module in the initial electrode anomaly detection model; and determining the target production line based on the feature maps corresponding to the multiple electrodes in the target production line. The bounding boxes of the abnormal positions corresponding to multiple pole pieces in the target production line are respectively determined; based on the loss function of the initial pole piece abnormality detection model and the bounding boxes of the abnormal positions corresponding to multiple pole pieces in the target production line, the bounding box regression loss corresponding to each of the multiple pole pieces in the target production line is determined, wherein the bounding box regression loss characterizes the gap between the bounding box of the abnormal position of the corresponding pole piece and the bounding box of the actual abnormal position; based on the optimizer of the initial pole piece abnormality detection model and the bounding box regression loss corresponding to each of the multiple pole pieces in the target production line, the parameters of the initial pole piece abnormality detection model are adjusted to obtain the target pole piece abnormality detection model.
[0041] Optionally, the target production line is a production line that needs to detect the quality of the pole pieces. The pole pieces are collected by taking a large number of photos or by using preset sensors as the initial picture data. After being labeled and preprocessed, the picture data becomes picture data that can be directly input into the deep learning neural network model, that is, the picture data of multiple pole pieces in the target production line. The picture data includes a training set and a test set. The training set includes the picture data of pole pieces with abnormalities, which is used to train the initial pole piece anomaly detection model; and the test set includes the picture data of pole pieces with abnormalities and the picture data of normal pole pieces, which is used to evaluate the performance of the target pole piece anomaly detection model obtained after training.
[0042] Based on the feature maps corresponding to multiple pole pieces in the target production line, according to the neural network model, that is, the prediction mechanism of the pole piece anomaly detection model in the present invention, features are extracted at different scales for target detection, that is, a series of candidate boxes are output on pole piece feature maps of different scales, and each candidate box is accompanied by a predicted category score and bounding box coordinates. For example, in the YOLO model, a category score vector can be provided for each detected object, and each element of this vector represents the probability that the object belongs to a certain category, that is, the confidence level. The bounding box coordinates describe the parameters of the position and size of the detected anomaly in the image, the x and y coordinates of the center point, and the width and height of the bounding box. Then, a unique bounding box can be selected from multiple candidate boxes based on the confidence level.
[0043] The loss function in the initial polar anomaly detection model is used to evaluate the accuracy of the model prediction. Based on the size of the loss function, the model parameters can be adjusted during the training process to optimize the performance. The bounding box regression loss characterizes the position difference between the bounding box predicted by the model and the actual bounding box. Therefore, the appropriate loss function can better optimize the model. For example, for the loss function of YOLOv8, in the boundary regression loss part, the traditional IOU algorithm can be modified based on the geometric relationship between the real box and the predicted box, and the Shape-IoU method can be used to replace it, thereby improving the model's detection performance for labels, joints, and sticky targets and improving the accuracy of regression.
[0044] The optimizer in the initial pole piece anomaly detection model plays a key role in neural network training. Its main function is to adjust the parameters of the model so as to minimize the loss function during the training process, thereby improving the model performance. For example, the learning rate is a parameter in the model training process. The learning rate directly determines the amplitude of the update of other parameters, which in turn affects the change of the loss function. A larger learning rate can cause the loss function to drop rapidly in the early stage of training, but it can also cause fluctuations near the optimal solution in the later stage; a smaller learning rate can make the loss function drop slowly, but it helps the model to converge stably. The optimizer can adjust the learning rate according to the preset learning rate strategy to improve the convergence speed and performance of the model during the training process, which helps the model find the optimal solution faster. The optimizer can also be used in combination with regularization technology to reduce the risk of overfitting and improve the performance of the model on unknown data. For example, in the YOLO model, commonly used optimizers include SGD (stochastic gradient descent), Adam (adaptive moment estimation) and RMSprop (root mean square propagation). According to the characteristics of specific tasks and data sets, suitable optimizers can be selected to improve the performance of the model.
[0045] As an optional embodiment, the present invention provides a training process for a YOLOv8 target detection model, which specifically includes the following steps:
[0046] S1: Data input: Input sample images and labels.
[0047] S2: Data augmentation: Perform various transformations on the image (such as rotation, flipping, scaling, etc.) to improve the generalization ability of the model.
[0048] S3: Data cleaning: Eliminate samples with obvious errors or low quality to ensure the quality of the data set.
[0049] S4: Model loading: Load the common features of polar anomalies in the pre-trained model.
[0050] S5: Feature enhancement: The preprocessed and verified samples are divided into training set and verification set and input into the YOLOv8 model. A variable kernel convolution module is added to the Neck part of the YOLOv8 model. YOLOv8 combined with the variable kernel convolution model will model the interaction relationship between channels during the feature extraction process. The variable kernel convolution module can adjust the sampling shape through learnable offsets to better adapt to targets of various sizes and shapes, providing a basis for subsequent detection tasks.
[0051] S6: Cross-layer feature fusion: After variable kernel convolution enhances the expressive power of feature maps, YOLOv8 adopts cross-layer feature fusion (C2F structure). Before predicting the output, the model will integrate feature information at different levels, which helps to improve the detection accuracy of targets of various sizes.
[0052] S7: Optimizer: In each training, according to the size of the loss function, the optimizer can adjust the parameters of the model, the purpose is to minimize the loss function, and finally obtain the optimal training model. In the present invention, the optimization algorithm can adopt a method of discovering the optimization algorithm for deep neural network training through program search, namely Lion optimizer. Using Lion optimizer greatly reduces the training time, and symbolic operations add noise to each training update, which serves as a form of regularization and helps to generalize the model.
[0053] As an optional embodiment, the initial pole piece abnormality detection model is obtained by training a preset neural network model using image data of pole pieces in multiple production lines, wherein the image data of pole pieces in multiple production lines are image data with annotated abnormal types.
[0054] Optionally, the initial pole piece anomaly detection model can be obtained by pre-training a preset neural network model, wherein the preset neural network model can be a YOLOv8 target detection model. The image data used for pre-training is the image data of various types of pole pieces in multiple different production lines, so a large number of abnormal pole piece features can be collected. At present, the anomaly detection method based on deep learning usually requires a large amount of labeled data to train the model. However, in the actual application of pole piece anomaly detection, the number of abnormal samples is often small, making this method difficult to implement. Most of the pole piece anomalies are difficult to find due to similar colors, which brings certain difficulties to model recognition. At the same time, traditional machine vision technology or shallow learning models can only process simple and regular image features, and have limited ability to recognize complex and nonlinear abnormal patterns. Deep learning models designed for pole pieces of specific types and characteristics may not be well generalized to other types of pole pieces. Therefore, the above problems can be solved through pre-training and targeted training. Specifically, a pre-trained model can be trained in the early stage through a large amount of data labeling with rich types. The training data used by the pre-trained model includes image data of various pole types in multiple production lines. Through various types of image data, the abnormal features of poles can be widely collected to improve the adaptability of the model; in the later stage, training is carried out on a small number of abnormal pole images of the target production line. Using a small amount of pole image data of similar types on the basis of the pre-trained model can improve the model's pertinence and prediction accuracy, while reducing dependence on a large amount of labeled data.
[0055] As an optional embodiment, the training method also includes: obtaining initial image data of multiple pole pieces in the target production line; labeling the initial image data of multiple pole pieces in the target production line based on the abnormal types of the multiple pole pieces in the target production line to obtain labeled image data of multiple pole pieces in the target production line; performing processing operations on the labeled image data of multiple pole pieces in the target production line to obtain image data of multiple pole pieces in the target production line, wherein the processing operations include at least one of the following: adding noise processing, rotation processing, flipping processing and scaling processing.
[0056] Optionally, the image data of the pole pieces can be collected through a variety of methods. For example, the image data of the pole pieces produced in multiple production lines can be collected directly by manual photography, and the image data of the pole pieces in the production line can also be automatically collected through a specific image sensor. The labeling of the initial image data of multiple pole pieces in the target production line can be achieved through the LabelImg tool. LabelImg is an image labeling tool written in PyQt and Python. The labeled content can be the location and type of abnormalities in the image, which provides important data support for the subsequent model training process. In addition, the labeled image data can also be preprocessed to make it suitable for the training and testing of deep learning models. The preprocessing steps can include image resizing, normalization, enhancement (adding noise, rotation, cropping, brightness change, etc.) and data augmentation (random sampling, flipping, mirroring, etc.) to improve the generalization ability and robustness of the model.
[0057] As an optional embodiment, the image data of multiple pole pieces in the target production line are input into the initial pole piece abnormality detection model, and the feature maps corresponding to the multiple pole pieces in the target production line are extracted through the variable kernel convolution module in the initial pole piece abnormality detection model, including: based on the image data of multiple pole pieces in the target production line, determining the feature scales corresponding to the image data of multiple pole pieces in the target production line; based on the feature scales corresponding to the image data of multiple pole pieces in the target production line, determining the convolution kernel size corresponding to the image data of multiple pole pieces in the target production line through the variable kernel convolution module; based on the convolution kernel size corresponding to the image data of multiple pole pieces in the target production line, extracting the feature maps corresponding to the multiple pole pieces in the target production line through the variable kernel convolution module.
[0058] Optionally, the feature scale is the characteristic length for evaluating the image structure, representing the local features of the image. The features in the image have different significance and recognizability at different scales. The scales of features corresponding to different image data may be different. If the traditional fixed convolution kernel module is used for feature extraction, it may lead to incomplete feature extraction. The variable kernel convolution module can dynamically adjust the convolution kernel size in real time according to the size of the feature scale of the image, and extract the corresponding features based on the adjusted appropriate convolution kernel, overcoming the limitations of the fixed size and shape of the convolution kernel in the standard convolution and the inability to effectively capture complex deformations and multi-scale features, thereby more accurately capturing key features.
[0059] As an optional embodiment, based on the feature maps corresponding to each of the multiple pole pieces in the target production line, the bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line are determined, including: based on the feature maps corresponding to each of the multiple pole pieces in the target production line, multiple candidate bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line are determined; the confidence of the multiple candidate bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line is calculated; based on the confidence of the multiple candidate bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line, the candidate bounding box with the largest confidence among the multiple candidate bounding boxes is selected as the bounding box of the abnormal positions corresponding to each of the multiple pole pieces in the target production line.
[0060] Optionally, in the prediction output stage, a series of candidate boxes can be output on the polar feature map of different scales. Each candidate box is accompanied by the predicted confidence and bounding box coordinates, which are used to locate the area that may contain target anomalies in the feature map. The center position of these candidate boxes usually corresponds to the point on the feature map, and the size and aspect ratio are determined according to the preset rules. The role of the candidate box is to reduce the search space, improve the detection efficiency, and serve as the basis for subsequent target classification and position fine-tuning. Specifically, the model can apply the NMS (Non-Maximum Suppression) algorithm to filter out the optimal candidate box according to the confidence and overlapping area of the candidate box, and output a filtered bounding box. Only one bounding box with the highest confidence is retained for each detected target. At the same time, the regression information of the candidate box can also be used to fine-tune the position of the detection result to further improve the accuracy of the detection. Among them, the basic idea of the NMS algorithm is to find the optimal solution by filtering out the local maximum value in a local window, thereby suppressing other non-maximum values. In object detection, this usually means selecting the detection box with the highest score, that is, the highest confidence, and suppressing other detection boxes whose overlap (IOU, Intersection over Union) exceeds a certain threshold to reduce redundant detections and extract the most representative objects.
[0061] As an optional embodiment, the loss function of the initial pole piece anomaly detection model is a shape-based intersection-over-union loss function.
[0062] Optionally, a new method for calculating bounding box regression loss, Shape-IoU (Shape-Intersection over Union), can be used, which takes into account the shape and size of the bounding box itself. Figure 3 is a schematic diagram of information of a predicted frame and a real frame provided according to an optional embodiment of the present invention, such as Figure 3As shown in the figure, GT represents the real box and Anchor represents the predicted box. There is a difference between the positions of the two. Therefore, the box regression loss can be calculated by the Shape-IoU loss function. The calculation formula of the Shape-IoU loss function is as follows:
[0063]
[0064] L Shape-IoU =1-IoU+distance shape +0.5*Ω shape
[0065] Among them, B gt is the ground truth, w represents the horizontal size of the predicted box, h represents the vertical size of the predicted box, and w gt is the width of the true bounding box, h gt is the height of the real bounding box, scale represents the scaling factor of width and height, x c ,y c represents the center coordinate of the predicted bounding box, x c gt ,y c gt represents the center coordinates of the true bounding box, c is a scaling factor related to the image size, used to normalize the difference in the center point, ω t is the matching measure of width and height, θ is the exponential factor, ω w is the relative error of width, indicating the difference in width between the predicted box and the real box, ω h is the relative error of height, indicating the difference in height between the predicted box and the real box, Ω shape For the final shape similarity measure, the errors of width and height are integrated.
[0066] As an optional embodiment, the optimizer of the initial pole piece anomaly detection model is an evolutionary symbol momentum optimizer.
[0067] Optionally, the computational complexity of some current deep learning models is high, which limits their application in real-time online anomaly detection systems. Therefore, the model efficiency can be improved by improving the optimizer. For example, the optimizer of the official YOLOv8 neural network model adopts AdamW (Adaptive Moment Estimation with Weight Decay), which directly decays the weights, while the Lion (Evolved Sign Momentum) optimizer can be used in the present invention, which only requires momentum and uses symbolic operations to calculate updates, and reduces the additional memory usage by half. Other optimizers need to save the first-order and second-order moments at the same time, while the Lion optimizer does not need to save them at the same time, so it has a faster running time in the experiment, further improving the training rate.
[0068] As an optional embodiment, it also includes: displaying the abnormal detection result and the image data of the electrode to be detected on a preset screen.
[0069] Optionally, the anomaly detection results obtained by the target pole piece anomaly detection model may include optimal bounding box information, such as anomaly type, confidence and coordinates. The above information is sorted and sorted, and then these detection results are graphically displayed on the original input image and output to a preset display screen for user observation and understanding.
[0070] As an optional embodiment, Table 1 is the comparison data of the prediction results of the YOLOv8n model and the target pole piece anomaly detection model based on variable kernel convolution proposed in the present invention. As shown in Table 1, under the same data set and training set, the same configuration machine runs the same number of training times, where the YOLOv8n model is officially provided, and is trained 500 times as a pre-training model on this basis and compared with the improved model structure proposed in the present invention after training 500 times. It is found that the model proposed by the present invention is more effective than the official model in all aspects.
[0071]
[0072]
[0073] Table 1 Comparison data of prediction results between YOLOv8n model and the model proposed in this invention
[0074] As an optional embodiment, the present invention provides a real-time pole piece anomaly detection algorithm based on variable kernel convolution deep learning, which may include: a pre-trained data module, a data module, a data preprocessing module and a training and real-time detection module, and the above modules are connected in the above order. The algorithm can effectively learn under limited abnormal samples and can adapt to complex pole piece characteristics. At the same time, it is suitable for real-time online anomaly detection systems, reducing the problem of high overkill rate of current algorithms. In the early stage, a pre-training model can be trained by data labeling, and in the later stage, a small number of pole piece abnormal pictures of the target production line are trained. It can effectively learn under limited abnormal samples and reduce the dependence on a large amount of labeled data; by optimizing the network structure and algorithm, the accuracy and computational efficiency of the model can be improved, the parameters that need to be optimized in the model can be reduced, and high-precision detection effects can also be achieved under small parameter models; by introducing more data enhancement and transfer learning technologies, the generalization ability and adaptability of the model can be improved, and it can adapt to complex pole piece characteristics and various battery cell pole piece abnormal scenarios. The present invention can be widely used in the field of pole piece abnormality detection, improve the quality control level of pole pieces, reduce the production cost of batteries, and improve the overall performance and life of batteries.
[0075] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the pole piece abnormality detection method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0077] According to an embodiment of the present invention, a pole piece abnormality detection device for implementing the pole piece abnormality detection method is also provided. Figure 4 is a structural block diagram of a pole piece abnormality detection device provided according to an embodiment of the present invention, such as Figure 4As shown, the pole piece abnormality detection device includes: an acquisition module 41, an extraction module 42 and a determination module 43. The pole piece abnormality detection device is described below.
[0078] The acquisition module 41 is used to acquire the image data of the electrode to be inspected in the target production line.
[0079] The extraction module 42 is connected to the acquisition module 41, and is used to input the image data of the pole piece to be detected into the target pole piece anomaly detection model, and use the variable kernel convolution module in the target pole piece anomaly detection model to extract the feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected.
[0080] The determination module 43 is connected to the extraction module 42 and is used to determine the abnormality detection result of the electrode to be detected based on the feature map of the image data of the electrode to be detected.
[0081] It should be noted that the acquisition module 41, extraction module 42 and determination module 43 correspond to steps S201 to S203 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0082] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.
[0083] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the pole piece abnormality detection method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned pole piece abnormality detection method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories can be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0084] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain the image data of the pole piece to be inspected in the target production line; input the image data of the pole piece to be inspected into the target pole piece abnormality detection model, and use the variable kernel convolution module in the target pole piece abnormality detection model to extract the feature map of the image data of the pole piece to be inspected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be inspected; based on the feature map of the image data of the pole piece to be inspected, determine the abnormality detection result of the pole piece to be inspected.
[0085] Optionally, the processor may also execute the following program code: before inputting the image data of the electrode to be detected into the target electrode anomaly detection model, the training method for the target electrode anomaly detection model includes: obtaining image data of multiple electrodes in the target production line, wherein the image data is image data with an anomaly type marked; inputting the image data of multiple electrodes in the target production line into the initial electrode anomaly detection model, and extracting the feature maps corresponding to each of the multiple electrodes in the target production line through the variable kernel convolution module in the initial electrode anomaly detection model; based on the feature maps corresponding to each of the multiple electrodes in the target production line , determine the bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line; based on the loss function of the initial pole piece abnormality detection model and the bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line, determine the border regression loss corresponding to each of the multiple pole pieces in the target production line, wherein the border regression loss characterizes the difference between the bounding box of the abnormal position of the corresponding pole piece and the bounding box of the actual abnormal position; based on the optimizer of the initial pole piece abnormality detection model and the border regression loss corresponding to each of the multiple pole pieces in the target production line, adjust the parameters of the initial pole piece abnormality detection model to obtain the target pole piece abnormality detection model.
[0086] Optionally, the processor may also execute the program code of the following steps: the initial pole piece abnormality detection model is obtained by training a preset neural network model using image data of pole pieces in multiple production lines, wherein the image data of pole pieces in multiple production lines are image data with annotated abnormal types.
[0087] Optionally, the processor may also execute the program code of the following steps: the training method also includes: obtaining initial image data of multiple pole pieces in the target production line; labeling the initial image data of multiple pole pieces in the target production line based on the abnormal types of the multiple pole pieces in the target production line to obtain labeled image data of multiple pole pieces in the target production line; performing processing operations on the labeled image data of multiple pole pieces in the target production line to obtain image data of multiple pole pieces in the target production line, wherein the processing operations include at least one of the following: adding noise processing, rotation processing, flipping processing and scaling processing.
[0088] Optionally, the processor may also execute the program code of the following steps: inputting the image data of multiple pole pieces in the target production line into the initial pole piece abnormality detection model, and extracting the feature maps corresponding to each of the multiple pole pieces in the target production line through the variable kernel convolution module in the initial pole piece abnormality detection model, including: determining the feature scales corresponding to each of the image data of multiple pole pieces in the target production line based on the image data of multiple pole pieces in the target production line; determining the convolution kernel size corresponding to each of the image data of multiple pole pieces in the target production line through the variable kernel convolution module based on the feature scales corresponding to each of the image data of multiple pole pieces in the target production line; extracting the feature maps corresponding to each of the multiple pole pieces in the target production line through the variable kernel convolution module based on the convolution kernel size corresponding to each of the image data of multiple pole pieces in the target production line.
[0089] Optionally, the processor may also execute program code for the following steps: determining the bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line based on the feature maps corresponding to the multiple pole pieces in the target production line, including: determining the multiple candidate bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line based on the feature maps corresponding to the multiple pole pieces in the target production line; calculating the confidence of the multiple candidate bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line; based on the confidence of the multiple candidate bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line, selecting the candidate bounding box with the largest confidence among the multiple candidate bounding boxes as the bounding box of the abnormal positions corresponding to the multiple pole pieces in the target production line.
[0090] Optionally, the processor may also execute the program code of the following steps: the loss function of the initial pole piece anomaly detection model is a shape-based intersection-over-union loss function.
[0091] Optionally, the processor may also execute program code of the following steps: the optimizer of the initial pole piece anomaly detection model is an evolutionary symbol momentum optimizer.
[0092] Optionally, the processor may also execute program code of the following steps: further comprising: displaying the abnormality detection result and the image data of the electrode to be detected on a preset screen.
[0093] According to an embodiment of the present invention, a method for detecting anomalies of a pole piece is provided. The image data of the pole piece to be detected in the target production line is obtained; the image data of the pole piece to be detected is input into the target pole piece anomaly detection model, and the variable kernel convolution module in the target pole piece anomaly detection model is used to extract the feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected; based on the feature map of the image data of the pole piece to be detected, the anomaly detection result of the pole piece to be detected is determined, thereby achieving the purpose that the pole piece anomaly detection algorithm can effectively learn under limited abnormal samples, can adapt to complex pole piece characteristics, and is suitable for real-time online anomaly detection system, thereby achieving the technical effect of improving the performance of the pole piece anomaly detection algorithm, and further solving the technical problems of low accuracy and high overkill rate of the pole piece anomaly detection algorithm in the related technology.
[0094] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0095] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the pole piece abnormality detection method provided in the above embodiment.
[0096] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0097] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining image data of the pole piece to be inspected in the target production line; inputting the image data of the pole piece to be inspected into the target pole piece abnormality detection model, and using the variable kernel convolution module in the target pole piece abnormality detection model to extract a feature map of the image data of the pole piece to be inspected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the characteristic scale of the image data of the pole piece to be inspected; based on the feature map of the image data of the pole piece to be inspected, determining the abnormality detection result of the pole piece to be inspected.
[0098] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: before inputting the image data of the pole piece to be detected into the target pole piece abnormality detection model, the training method for the target pole piece abnormality detection model includes: obtaining image data of multiple pole pieces in the target production line, wherein the image data is image data with an anomaly type marked; inputting the image data of multiple pole pieces in the target production line into the initial pole piece abnormality detection model, and extracting the feature maps corresponding to each of the multiple pole pieces in the target production line through the variable kernel convolution module in the initial pole piece abnormality detection model; based on the multiple pole pieces in the target production line Based on the corresponding feature maps, the bounding boxes of the abnormal positions of the multiple pole pieces in the target production line are determined; based on the loss function of the initial pole piece abnormality detection model and the bounding boxes of the abnormal positions of the multiple pole pieces in the target production line, the border regression loss corresponding to the multiple pole pieces in the target production line is determined, wherein the border regression loss characterizes the difference between the bounding box of the abnormal position of the corresponding pole piece and the bounding box of the actual abnormal position; based on the optimizer of the initial pole piece abnormality detection model and the corresponding border regression loss of the multiple pole pieces in the target production line, the parameters of the initial pole piece abnormality detection model are adjusted to obtain the target pole piece abnormality detection model.
[0099] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: an initial pole piece abnormality detection model is obtained by training a preset neural network model using image data of pole pieces in multiple production lines, wherein the image data of pole pieces in multiple production lines are image data with labeled abnormal types.
[0100] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for performing the following steps: the training method also includes: obtaining initial image data of multiple pole pieces in the target production line; labeling the initial image data of multiple pole pieces in the target production line based on the abnormal types of the multiple pole pieces in the target production line to obtain labeled image data of multiple pole pieces in the target production line; performing processing operations on the labeled image data of multiple pole pieces in the target production line to obtain image data of multiple pole pieces in the target production line, wherein the processing operation includes at least one of the following: adding noise processing, rotation processing, flipping processing and scaling processing.
[0101] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: inputting the image data of multiple pole pieces in the target production line into the initial pole piece abnormality detection model, and extracting the feature maps corresponding to the multiple pole pieces in the target production line through the variable kernel convolution module in the initial pole piece abnormality detection model, including: based on the image data of multiple pole pieces in the target production line, determining the feature scales corresponding to the image data of multiple pole pieces in the target production line; based on the feature scales corresponding to the image data of multiple pole pieces in the target production line, determining the convolution kernel size corresponding to the image data of multiple pole pieces in the target production line through the variable kernel convolution module; based on the convolution kernel size corresponding to the image data of multiple pole pieces in the target production line, extracting the feature maps corresponding to the multiple pole pieces in the target production line through the variable kernel convolution module.
[0102] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: based on the feature maps corresponding to the multiple pole pieces in the target production line, determining the bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line, including: based on the feature maps corresponding to the multiple pole pieces in the target production line, determining multiple candidate bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line; calculating the confidence of the multiple candidate bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line; based on the confidence of the multiple candidate bounding boxes of the abnormal positions corresponding to the multiple pole pieces in the target production line, selecting the candidate bounding box with the largest confidence among the multiple candidate bounding boxes as the bounding box of the abnormal positions corresponding to the multiple pole pieces in the target production line.
[0103] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: the loss function of the initial pole piece anomaly detection model is a shape-based intersection-over-union loss function.
[0104] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: the optimizer of the initial pole piece anomaly detection model is an evolutionary symbol momentum optimizer.
[0105] Optionally, in this embodiment, the non-volatile storage medium is configured to store program codes for executing the following steps: further comprising: displaying the abnormality detection result and the image data of the electrode to be detected on a preset screen.
[0106] An embodiment of the present invention also provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it can achieve: obtaining image data of a pole piece to be inspected in a target production line; inputting the image data of the pole piece to be inspected into a target pole piece abnormality detection model, and using a variable kernel convolution module in the target pole piece abnormality detection model to extract a feature map of the image data of the pole piece to be inspected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be inspected; and determining the abnormality detection result of the pole piece to be inspected based on the feature map of the image data of the pole piece to be inspected.
[0107] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0108] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0109] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0110] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0112] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0113] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for detecting abnormality of a pole piece, characterized in that: include: Obtain image data of the electrode to be inspected in the target production line; Input the image data of the pole piece to be detected into the target pole piece anomaly detection model, and use the variable kernel convolution module in the target pole piece anomaly detection model to extract the feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used to adjust the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected; Based on the feature graph of the image data of the pole piece to be detected, the abnormality detection result of the pole piece to be detected is determined.
2. The method according to claim 1, characterized in that Before inputting the image data of the pole piece to be detected into the target pole piece anomaly detection model, the training method for the target pole piece anomaly detection model includes: Acquire image data of a plurality of electrodes in the target production line, wherein the image data is image data with abnormal types marked; Inputting the image data of multiple pole pieces in the target production line into the initial pole piece anomaly detection model, and extracting the feature graphs corresponding to the multiple pole pieces in the target production line through the variable kernel convolution module in the initial pole piece anomaly detection model; Determine, based on the characteristic graphs corresponding to the plurality of pole pieces in the target production line, the bounding boxes of the abnormal positions corresponding to the plurality of pole pieces in the target production line; Based on the loss function of the initial pole piece abnormality detection model and the bounding boxes of the abnormal positions corresponding to the plurality of pole pieces in the target production line, the frame regression loss corresponding to the plurality of pole pieces in the target production line is determined, wherein the frame regression loss represents the difference between the bounding box of the abnormal position of the corresponding pole piece and the bounding box of the actual abnormal position; Based on the optimizer of the initial pole piece anomaly detection model and the corresponding frame regression losses of the plurality of pole pieces in the target production line, the parameters of the initial pole piece anomaly detection model are adjusted to obtain the target pole piece anomaly detection model.
3. The method according to claim 2, characterized in that The initial pole piece anomaly detection model is obtained by training a preset neural network model using image data of pole pieces in multiple production lines, wherein the image data of pole pieces in the multiple production lines are image data with annotated abnormal types.
4. The method according to claim 2, characterized in that: The training method further comprises: Acquire initial image data of multiple pole pieces in the target production line; Based on the abnormal types of the multiple pole pieces in the target production line, the initial image data of the multiple pole pieces in the target production line are annotated to obtain the annotated image data of the multiple pole pieces in the target production line; Processing operations are performed on the labeled image data of multiple pole pieces in the target production line to obtain image data of multiple pole pieces in the target production line, wherein the processing operation includes at least one of the following: adding noise processing, rotating processing, flipping processing and scaling processing.
5. The method according to claim 2, characterized in that: The step of inputting the image data of the plurality of pole pieces in the target production line into the initial pole piece anomaly detection model, and extracting the feature graphs corresponding to the plurality of pole pieces in the target production line through the variable kernel convolution module in the initial pole piece anomaly detection model, comprises: Based on the image data of the plurality of pole pieces in the target production line, determining the characteristic scales corresponding to the image data of the plurality of pole pieces in the target production line; Based on the characteristic scales corresponding to the image data of the plurality of pole pieces in the target production line, the convolution kernel sizes corresponding to the image data of the plurality of pole pieces in the target production line are determined by the variable kernel convolution module; Based on the convolution kernel sizes corresponding to the image data of multiple pole pieces in the target production line, the variable kernel convolution module is used to extract the feature maps corresponding to the multiple pole pieces in the target production line.
6. The method according to claim 2, characterized in that The determining, based on the characteristic graphs corresponding to the plurality of pole pieces in the target production line, the bounding boxes of the abnormal positions corresponding to the plurality of pole pieces in the target production line respectively include: Based on the feature maps corresponding to the plurality of pole pieces in the target production line, determine a plurality of candidate bounding boxes of abnormal positions corresponding to the plurality of pole pieces in the target production line; Calculating the confidence of multiple candidate bounding boxes of abnormal positions corresponding to multiple pole pieces in the target production line; Based on the confidence levels of multiple candidate bounding boxes of the abnormal positions corresponding to each of the multiple pole pieces in the target production line, the candidate bounding box with the largest confidence level among the multiple candidate bounding boxes is selected as the bounding box of the abnormal positions corresponding to each of the multiple pole pieces in the target production line.
7. The method according to claim 2, characterized in that The loss function of the initial pole piece anomaly detection model is a shape-based intersection-over-union loss function.
8. The method according to claim 2, characterized in that: The optimizer of the initial pole piece anomaly detection model is an evolutionary symbolic momentum optimizer.
9. The method according to any one of claims 1 to 8, characterized in that: Also includes: The abnormal detection result and the image data of the electrode to be detected are displayed on a preset screen.
10. A device for detecting abnormality of a pole piece, characterized in that: include: An acquisition module is used to acquire image data of the electrode to be inspected in the target production line; An extraction module, used for inputting the image data of the pole piece to be detected into the target pole piece anomaly detection model, and using the variable kernel convolution module in the target pole piece anomaly detection model to extract the feature map of the image data of the pole piece to be detected, wherein the variable kernel convolution module is used for adjusting the size of the convolution kernel based on the size of the feature scale of the image data of the pole piece to be detected; A determination module is used to determine the abnormality detection result of the pole piece to be detected based on the feature map of the image data of the pole piece to be detected.
11. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the pole piece abnormality detection method described in any one of claims 1 to 9.
12. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is running, the processor executes the pole piece abnormality detection method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the pole piece abnormality detection method described in any one of claims 1 to 9 is implemented.