An AI-based battery defect detection method and system

By combining feature extraction and fusion analysis of RGB and thermal infrared images, the detection accuracy problem when external and internal defect positions overlap in battery defect detection is solved, and accurate identification and stability guarantee of battery defects are achieved.

CN119671970BActive Publication Date: 2025-08-22ACSON (SHENZHEN) INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411730893.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-29
Publication Date
2025-08-22
Estimated Expiration
2044-11-29

AI Technical Summary

Technical Problem

The prior art is difficult to accurately distinguish the characteristics of surface and deep defects when the battery has both external defects and internal defects and the two overlap, affecting the detection accuracy.

Method used

Using the AI-based battery defect detection method, by obtaining the initial RGB image and initial thermal infrared image of the target battery, determining the abnormal area and cutting it, channel and spatial feature extraction are performed separately, combining the characteristics of RGB and thermal infrared images for fusion analysis, and finding the preset database to determine the defect type.

Benefits of technology

It realizes the simultaneous capture of the battery surface and internal defects, reduces misjudgment, and can accurately distinguish external and internal defects. Even if the position overlaps, it can reduce confusion and ensure the accuracy and stability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119671970B_ABST
    Figure CN119671970B_ABST
Patent Text Reader

Abstract

The present invention discloses an AI-based battery defect detection method and system, which relates to the field of image processing technology. After determining the abnormal areas in the initial RGB image and the initial thermal infrared image, the initial RGB image and the initial thermal infrared image are cut according to the abnormal areas to obtain the target RGB image and the target thermal infrared image; channel feature extraction and spatial feature extraction are performed on the target RGB image and the target thermal infrared image respectively to obtain the target total feature, and the defect type of the target battery is determined by searching a preset database based on the target total feature. Through the joint analysis of RGB and thermal infrared images, the surface and internal defect information of the battery can be captured simultaneously, reducing the misjudgment of a single detection method, performing multi-scale feature separation in the abnormal area, and finally enabling the solution to accurately distinguish between external and internal defects by extracting channel features and spatial features. Even if the positions overlap, confusion can be reduced, ensuring the accuracy of detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of image processing technology, and specifically relates to an AI-based battery defect detection method and system. Background Art

[0002] With the rapid development of electric vehicles, energy storage equipment and consumer electronics, batteries and other high-energy-density batteries are being used more and more widely. The safety and reliability of batteries have become core concerns for major manufacturers. Battery defect detection is crucial in quality control during the production and delivery stages. During the production process, batteries may have various defects such as poor electrode coating, diaphragm damage, welding defects, surface scratches, bulging, etc. These defects will affect the performance and safety of the battery during use, and may even cause safety accidents such as overheating and explosion.

[0003] Patent CN113989267B discloses a battery defect detection method based on a lightweight neural network. This method builds a defect detection model based on a lightweight ShuffleNetV2 neural network, integrating a refined cross-stage local mechanism and a parallel grouping attention module to form a refined cross-stage local ShuffleNetV2 network. The network first realizes the fusion of shallow and deep features through a parallel grouping attention module, and then expands the receptive field through a fusion module guided by low-level features. Finally, the output feature map is input into the region recommendation network to classify and locate the defect area, thereby obtaining the category and location of the defect. However, this solution does not solve the problem that when the battery has both external and internal defects and the positions of the two overlap, it is difficult to distinguish between surface and deep defect features, which affects the accuracy of detection. Summary of the Invention

[0004] The purpose of the present invention is to solve the problem that when a battery has both external defects and internal defects and their positions overlap, it is difficult to distinguish between surface and deep-level defect characteristics, which affects the accuracy of detection. An AI-based battery defect detection method and system are proposed.

[0005] In a first aspect of the present invention, a battery defect detection method based on AI is first proposed, the method comprising:

[0006] Acquire an initial RGB image and an initial thermal infrared image of a target battery, determine abnormal regions in the initial RGB image and the initial thermal infrared image to obtain a first abnormal region and a second abnormal region; the intersection of the first abnormal region and the second abnormal region is recorded as a common abnormal region; the initial RGB image and the initial thermal infrared image are images taken under the same environment;

[0007] Cutting the initial RGB image and the initial thermal infrared image according to the common abnormal area to obtain a target RGB image and a target thermal infrared image;

[0008] Performing channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features;

[0009] A target total feature is obtained according to the target channel feature and the target space feature, and a preset database is searched according to the target total feature to determine the defect type of the target battery.

[0010] Optionally, determining abnormal areas in the initial RGB image and the initial thermal infrared image to obtain a first abnormal area and a second abnormal area includes:

[0011] After aligning the initial RGB image and the initial thermal infrared image, segmenting the initial RGB image and the initial thermal infrared image to obtain a region only containing the target battery using an edge detection algorithm to obtain a first RGB image and a first thermal infrared image;

[0012] Performing abnormal region detection on the first RGB image to obtain a first abnormal pixel set, and performing abnormal region detection on the first thermal infrared image to obtain a second abnormal pixel set;

[0013] For a target abnormal pixel set, boundary coordinates in the target abnormal pixel set are obtained, and a target abnormal region is generated according to the boundary coordinates; if the target abnormal pixel set is a first abnormal pixel set, the target abnormal region is a first abnormal region; if the target abnormal pixel set is a second abnormal pixel set, the target abnormal region is a second abnormal region.

[0014] Optionally, performing channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features includes:

[0015] Performing multi-channel feature extraction on the target RGB image and the target thermal infrared image respectively through an encoder to obtain an RGB channel feature set and a thermal infrared channel feature set;

[0016] For each channel feature in the RGB channel feature set and the thermal infrared channel feature set, a spatial feature corresponding to the channel feature is obtained by a 2D convolution operation to obtain an RGB spatial feature set and a thermal infrared spatial feature set;

[0017] For the first target feature set and the second target feature set, a preset number of channel groups are obtained to obtain a target channel group set, a first target weight and a second target weight are determined according to the target channel group set, and the first target feature set and the second target feature set are fused according to the first target weight and the second target weight to obtain a target feature; the channel group is the first target feature and the second target feature under the same parameters; if the first target feature set is the RGB channel feature set, then the second target feature set is the thermal infrared channel feature set, and the target feature is the target channel feature; if the first target feature set is the RGB space feature set, then the second target feature set is the thermal infrared space feature set, and the target feature is the target space feature.

[0018] Optionally, determining a first target weight and a second target weight according to the target channel set, and fusing the first target feature set and the second target feature set according to the first target weight and the second target weight to obtain a target feature includes:

[0019] Performing maximum pooling on the target features in the target channel group to obtain a first target vector group;

[0020] Convolving the first target vector group to obtain a second target vector group, and concatenating vectors in the second target vector group to obtain a concatenated vector;

[0021] Normalizing the splicing vector to obtain a weight vector, and splitting the weight vector to obtain a first target weight and a second target weight;

[0022] According to the first target weight and the second target weight, feature weighted fusion is performed on each channel group to obtain local features, and all local features are fused to obtain target features.

[0023] Optionally, obtaining the target total feature according to the target channel feature and the target space feature includes:

[0024] Performing a deconvolution operation on the target channel feature and the target spatial feature to obtain a target local feature;

[0025] Obtaining a first local abnormal region and a second local abnormal region according to the first abnormal region and the second abnormal region;

[0026] Cutting the initial RGB image according to the first local abnormal area to obtain a first local RGB image, and cutting the initial thermal infrared image according to the second local abnormal area to obtain a first local thermal infrared image;

[0027] Substituting the first local RGB image into a first preset model to obtain a first local feature, and substituting the first local thermal infrared image into a second preset model to obtain a second local feature;

[0028] The target local feature, the first local feature, and the second local feature are spliced ​​together to obtain a target overall feature.

[0029] In a second aspect of the present invention, an AI-based battery defect detection system is proposed, comprising:

[0030] an abnormal region determination module, configured to obtain an initial RGB image and an initial thermal infrared image of a target battery, determine abnormal regions in the initial RGB image and the initial thermal infrared image to obtain a first abnormal region and a second abnormal region; the intersection of the first abnormal region and the second abnormal region is recorded as a common abnormal region; the initial RGB image and the initial thermal infrared image are images taken in the same environment;

[0031] An image cutting module, configured to cut the initial RGB image and the initial thermal infrared image according to the common abnormal area to obtain a target RGB image and a target thermal infrared image;

[0032] A feature extraction module is used to perform channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features;

[0033] The defect determination module is used to obtain a target total feature according to the target channel feature and the target space feature, and to search a preset database according to the target total feature to determine the defect type of the target battery.

[0034] Optionally, the abnormal area determination module includes:

[0035] an image alignment module, configured to align the initial RGB image and the initial thermal infrared image, and then segment the initial RGB image and the initial thermal infrared image to obtain a first RGB image and a first thermal infrared image by using an edge detection algorithm to obtain a region containing only the target battery;

[0036] an abnormal region detection module, configured to perform abnormal region detection on the first RGB image to obtain a first abnormal pixel set, and perform abnormal region detection on the first thermal infrared image to obtain a second abnormal pixel set;

[0037] The abnormal pixel coordinate determination module is used to obtain the boundary coordinates of the target abnormal pixel set for the target abnormal pixel set, and generate a target abnormal area according to the boundary coordinates; if the target abnormal pixel set is the first abnormal pixel set, the target abnormal area is the first abnormal area; if the target abnormal pixel set is the second abnormal pixel set, the target abnormal area is the second abnormal area.

[0038] Optionally, the feature extraction module includes:

[0039] A multi-channel feature extraction module is used to perform multi-channel feature extraction on the target RGB image and the target thermal infrared image through an encoder to obtain an RGB channel feature set and a thermal infrared channel feature set;

[0040] A spatial feature extraction module is used to obtain the spatial feature corresponding to each channel feature in the RGB channel feature set and the thermal infrared channel feature set by performing a 2D convolution operation to obtain the RGB spatial feature set and the thermal infrared spatial feature set;

[0041] A target feature determination module is used to obtain a preset number of channel groups for the first target feature set and the second target feature set to obtain a target channel group set, determine a first target weight and a second target weight based on the target channel group set, and fuse the first target feature set and the second target feature set according to the first target weight and the second target weight to obtain a target feature; the channel group is the first target feature and the second target feature under the same parameters; if the first target feature set is the RGB channel feature set, then the second target feature set is the thermal infrared channel feature set, and the target feature is the target channel feature; if the first target feature set is the RGB space feature set, then the second target feature set is the thermal infrared space feature set, and the target feature is the target space feature.

[0042] Optionally, the target feature determination module includes:

[0043] A pooling module, configured to perform maximum pooling on the target features in the target channel group to obtain a first target vector group;

[0044] a vector splicing module, configured to convolve the first target vector group to obtain a second target vector group, and splice vectors in the second target vector group to obtain a spliced ​​vector;

[0045] a weight vector splitting module, configured to perform a normalization operation on the splicing vector to obtain a weight vector, and split the weight vector to obtain a first target weight and a second target weight;

[0046] The feature weighted fusion module is used to perform feature weighted fusion on each channel group according to the first target weight and the second target weight to obtain local features, and to fuse all local features to obtain target features.

[0047] Optionally, the defect determination module includes:

[0048] A deconvolution operation module, configured to perform a deconvolution operation on the target channel feature and the target spatial feature to obtain a target local feature;

[0049] a local abnormal region determining module, configured to obtain a first local abnormal region and a second local abnormal region according to the first abnormal region and the second abnormal region;

[0050] a local image cutting module, configured to cut the initial RGB image according to the first local abnormal region to obtain a first local RGB image, and cut the initial thermal infrared image according to the second local abnormal region to obtain a first local thermal infrared image;

[0051] a local feature determination module, configured to substitute the first local RGB image into a first preset model to obtain a first local feature, and substitute the first local thermal infrared image into a second preset model to obtain a second local feature;

[0052] A feature splicing module is used to splice the target local feature, the first local feature and the second local feature to obtain a target overall feature.

[0053] Beneficial effects of the present invention:

[0054] The present invention proposes an AI-based battery defect detection method, which obtains the initial RGB image and initial thermal infrared image of the target battery, determines the abnormal areas in the initial RGB image and the initial thermal infrared image to obtain the first abnormal area and the second abnormal area; cuts the initial RGB image and the initial thermal infrared image according to the common abnormal area to obtain the target RGB image and the target thermal infrared image; performs channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain the target channel feature and the target spatial feature; obtains the target total feature based on the target channel feature and the target spatial feature, and searches a preset database based on the target total feature to determine the defect type of the target battery. Through the joint analysis of RGB and thermal infrared images, the surface and internal defect information of the battery can be captured simultaneously, reducing the misjudgment of a single detection method, performing multi-scale feature separation in the abnormal area, and finally enabling the solution to accurately distinguish between external and internal defects by extracting channel features and spatial features, and reducing confusion even if the positions overlap, thus ensuring the accuracy and stability of detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The present invention will be further described below with reference to the accompanying drawings.

[0056] Figure 1 A flowchart of an AI-based battery defect detection method is provided for an embodiment of the present invention;

[0057] Figure 2 A framework diagram of an AI-based battery defect detection system is provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0058] The following will provide a clear and complete description of the technical solutions in the embodiments of the present invention, in conjunction with the accompanying drawings. Obviously, the described embodiments represent only a portion of the embodiments of the present invention, not all of them. The term "and / or" herein simply describes an association relationship between associated objects, indicating that three possible relationships exist. For example, "A" and "B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, references to "first," "second," and so on in the present invention are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include at least one of these features. Furthermore, the technical solutions of the various embodiments may be combined, but only if they are achievable by a person of ordinary skill in the art. If a combination of technical solutions contradicts or is unachievable, such combination shall be deemed non-existent and outside the scope of protection claimed by the present invention.

[0059] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention.

[0060] The embodiment of the present invention provides a battery defect detection method based on AI. Figure 1 , Figure 1 A flowchart of an AI-based battery defect detection method provided in an embodiment of the present invention. The method includes the following steps:

[0061] S101, acquiring an initial RGB image and an initial thermal infrared image of a target battery, determining abnormal areas in the initial RGB image and the initial thermal infrared image to obtain a first abnormal area and a second abnormal area;

[0062] S102, cutting the initial RGB image and the initial thermal infrared image according to the common abnormal area to obtain a target RGB image and a target thermal infrared image;

[0063] S103, performing channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features;

[0064] S104, obtaining a target total feature according to the target channel feature and the target space feature, and searching a preset database according to the target total feature to determine the defect type of the target battery.

[0065] The intersection of the first abnormal area and the second abnormal area is recorded as the common abnormal area; the initial RGB image and the initial thermal infrared image are images taken in the same environment;

[0066] An AI-based battery defect detection method provided in an embodiment of the present invention can simultaneously capture surface and internal defect information of the battery through joint analysis of RGB and thermal infrared images, reduce misjudgments of a single detection method, perform multi-scale feature separation in abnormal areas, and extract channel features and spatial features. Ultimately, the solution can accurately distinguish between external and internal defects, reducing confusion even if the locations overlap, thereby ensuring the accuracy and stability of detection.

[0067] One implementation method combines the characteristics of RGB images with thermal infrared images to more comprehensively identify and analyze battery surface and internal defects. RGB images mainly capture the appearance information of the battery surface, while infrared images can reveal temperature distribution anomalies, thereby effectively distinguishing surface defects from internal defects.

[0068] One implementation method starts from channel characteristics and spatial characteristics respectively, which can obtain information of different dimensions, thereby comprehensively characterizing the abnormal areas of the battery; directly matching the target characteristics with the defect templates in the preset database not only speeds up the diagnosis speed, but also reduces the subjective errors of manual inspection.

[0069] In one implementation method, the target battery is the battery to be inspected, the initial RGB image and the initial thermal infrared image are images taken at the same time and at the same angle; the preset database is used to store defect types corresponding to different features, where the defect features include not only individual defect features but also defect features formed by the superposition of internal defects and external defects.

[0070] In one embodiment, determining abnormal regions in the initial RGB image and the initial thermal infrared image to obtain first abnormal regions and second abnormal regions includes:

[0071] After aligning the initial RGB image and the initial thermal infrared image, an edge detection algorithm is used to segment the area containing only the target battery from the initial RGB image and the initial thermal infrared image to obtain a first RGB image and a first thermal infrared image;

[0072] Performing abnormal region detection on the first RGB image to obtain a first abnormal pixel set, and performing abnormal region detection on the first thermal infrared image to obtain a second abnormal pixel set;

[0073] For the target abnormal pixel set, the boundary coordinates in the target abnormal pixel set are obtained, and a target abnormal region is generated according to the boundary coordinates; if the target abnormal pixel set is the first abnormal pixel set, the target abnormal region is the first abnormal region; if the target abnormal pixel set is the second abnormal pixel set, the target abnormal region is the second abnormal region.

[0074] One implementation method uses an edge detection algorithm to segment the target battery area from the background, which can effectively eliminate noise and irrelevant information, making subsequent anomaly detection more accurate; mapping the RGB image and thermal infrared image into the same two-dimensional coordinate system ensures the spatial consistency of the two data sources, facilitating comprehensive analysis.

[0075] One implementation method performs abnormal area detection on RGB images and thermal infrared images respectively to obtain the first and second abnormal pixel sets, which can refine the observation of defects and ensure that potential anomalies can be effectively identified in each image. Utilizing the color information of RGB images and the temperature information of thermal infrared images, anomalies can be detected from different angles, providing more comprehensive data support for defect analysis.

[0076] One implementation method extracts boundary coordinates for abnormal pixel sets, which can accurately describe the shape and location of the abnormal area, providing a basis for subsequent processing and analysis; the target abnormal area generated based on the boundary coordinates provides a clearer defect representation, which helps to more intuitively understand the distribution and impact of defects.

[0077] One implementation method is to extract feature points from an initial RGB image and an initial thermal infrared image using a feature extraction algorithm such as SIFT, SURF, or ORB, wherein the battery edges of the initial thermal infrared image and the battery edges of the initial RGB image are extracted, and based on the extracted feature points, the feature points in the initial RGB image and the initial thermal infrared image are compared using a distance-based algorithm, and corresponding feature points are determined based on the comparison results, and the initial RGB image and the initial thermal infrared image are aligned based on the corresponding feature points; the edge detection algorithm can be Canny edge detection, Sobel edge detection, Laplacian edge detection, Prewitt edge detection, Scharr edge detection, etc., and the first RGB image and the first thermal infrared image are mapped to the same two-dimensional coordinates, and each pixel in the first RGB image and the first thermal infrared image has a corresponding coordinate.

[0078] One implementation method is to perform abnormal area detection on the first RGB image to obtain a first abnormal pixel set, and to perform abnormal area detection on the first thermal infrared image to obtain a second abnormal pixel set. Specifically, after denoising the RGB image and the thermal infrared image, the RGB image is converted to HSV, the histogram of the HSV space is calculated, and a preset color threshold interval is set. For each pixel point, if the color of the pixel is within the preset color threshold interval, it is recorded as a normal pixel; if the color of the pixel is not within the preset color threshold interval, it is recorded as an abnormal pixel. The preset color threshold interval is determined by technical personnel. All pixel abnormal points of the RGB image are obtained to obtain the first abnormal pixel set; for the thermal infrared image, the regions in the thermal infrared image are clustered by a region growing algorithm. The region growing algorithm can be K-means or DBSCAN. For each clustered region, the mean and standard deviation of the corresponding temperatures of all pixels in the region are calculated. If the mean temperature is greater than the preset temperature value and / or the standard deviation is greater than the preset standard deviation, the region is recorded as an abnormal region to obtain the second abnormal pixel set.

[0079] In one implementation, the boundary coordinates of the target abnormal pixel set are obtained. The boundary coordinates are the boundary coordinates of the abnormal pixels, that is, the leftmost, rightmost, topmost and bottommost pixel coordinates. The leftmost, rightmost, topmost and bottommost pixel coordinates are used as boundaries, and a rectangle parallel to the X-axis and Y-axis of the two-dimensional coordinates is used to generate the target abnormal area.

[0080] In one embodiment, performing channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image to obtain target channel features and target spatial features includes:

[0081] The encoder performs multi-channel feature extraction on the target RGB image and the target thermal infrared image to obtain the RGB channel feature set and the thermal infrared channel feature set;

[0082] For each channel feature in the RGB channel feature set and the thermal infrared channel feature set, the spatial feature corresponding to the channel feature is obtained through a 2D convolution operation to obtain the RGB spatial feature set and the thermal infrared spatial feature set;

[0083] For the first target feature set and the second target feature set, a preset number of channel groups are obtained to obtain a target channel group set, the first target weight and the second target weight are determined according to the target channel group set, and the first target feature set and the second target feature set are fused according to the first target weight and the second target weight to obtain the target feature; the channel group is the first target feature and the second target feature under the same parameters; if the first target feature set is the RGB channel feature set, the second target feature set is the thermal infrared channel feature set, and the target feature is the target channel feature; if the first target feature set is the RGB space feature set, the second target feature set is the thermal infrared space feature set, and the target feature is the target space feature.

[0084] One implementation method is to extract features from RGB and thermal infrared images separately, which can obtain different detailed information at the channel level. The RGB channel provides visual color features, while the thermal infrared channel contains temperature distribution information. The combination of these features improves the integrity of the overall information; using channel weights to fuse features, deep information interaction is achieved, enabling the system to have a more comprehensive understanding of potential defects in the battery.

[0085] In one implementation, the encoder is a VGG encoder, a DenseNet encoder, a Segformer encoder, etc. The channel features in the RGB channel feature set and the thermal infrared channel feature set are sorted according to the features extracted by the channel size, that is, the features extracted by the large channel are ranked first, and the features extracted by the small channel are ranked last. The RGB channel feature set and the thermal infrared channel feature set have the same number of features, and the scales of the channels correspond one to one in the sequence. For example, if the first feature in the RGB channel feature set is obtained by 512*512, then the first feature in the thermal infrared channel feature set is also obtained by 512*512.

[0086] One implementation method is to perform 2D convolution on the features of each channel to obtain a spatial feature set, which can effectively extract the spatial correlation of pixels in different channels, such as edges, shapes and other details, which helps to identify local anomalies on the surface or inside the battery. By extracting spatial features, the subtle characteristics of defects can be captured more sensitively, greatly improving the level of detection and helping to distinguish different types of defects.

[0087] One implementation method assigns different weights to each data source by calculating the target weights of RGB and thermal infrared feature sets, ensuring that more informative feature sets are prioritized in different situations, which helps to enhance the flexibility and accuracy of detection. It also improves precision by using a preset number of channel groups as screening conditions. A 2D convolution operation is performed on each channel feature in the RGB channel feature set to obtain an RGB spatial feature set, and a 2D convolution operation is performed on each channel feature in the thermal infrared channel feature set to obtain a thermal infrared spatial feature set.

[0088] In one implementation method, the initial RGB channel feature set and the initial thermal infrared channel feature set have the same number of channel features, the same channel size, and the same channel order; the preset number is determined by a technician.

[0089] In one embodiment, determining a first target weight and a second target weight according to the target channel set, and fusing the first target feature set and the second target feature set according to the first target weight and the second target weight to obtain the target feature includes:

[0090] Perform maximum pooling on the target features in the target channel group to obtain the first target vector group;

[0091] Convolving the first target vector group to obtain a second target vector group, and concatenating vectors in the second target vector group to obtain a concatenated vector;

[0092] Normalize the concatenated vector to obtain a weight vector, and split the weight vector to obtain a first target weight and a second target weight;

[0093] According to the first target weight and the second target weight, feature weighted fusion is performed on each channel group to obtain local features, and all local features are fused to obtain target features.

[0094] One implementation method uses a maximum pooling operation to extract the most significant parts of the feature set, which helps retain the particularly prominent information in each channel group, while reducing data dimensions, reducing redundant features, and improving data processing efficiency; the convolution operation further refines the pooled features, enhancing the hierarchical and deep expression of the features, so that the details and characteristics of the defects can be better described after feature fusion.

[0095] One implementation method is to perform weighted fusion on the channel groups according to the weight vector so that the contributions of different channel features are reasonably distributed. By splicing and splitting the feature vectors, the correlation integration between features can be achieved while maintaining the information of each channel group, providing a global perspective for subsequent weighted fusion, and enhancing the system's ability to integrate multi-dimensional information. The weighted fusion of each channel group forms local features, and finally the target features are obtained through global fusion, ensuring that the system can focus on the local details of the defects and the global feature distribution, thereby identifying defects more comprehensively, so that when surface defects and internal defects exist in the same position, the surface defect features and internal defect features can still be expressed.

[0096] In one implementation method, normalization can be performed through Min-Max normalization, Z-score normalization, etc., to split the weight vector into a first target weight and a second target weight, where the first target weight is counted from the first digit of the weight vector until the length is the same as the first channel feature in the channel group, the second target weight is the same as the length of the second channel feature in the channel group, and the last digit of the second target weight is the last digit of the weight vector.

[0097] In one implementation, for each layer in the RGB channel feature set and the initial thermal infrared channel feature set, the first target weight is multiplied by the current RGB channel feature to obtain the spliced ​​RGB channel feature, and the second target weight is multiplied by the current thermal infrared channel feature to obtain the spliced ​​thermal infrared channel feature.

[0098] The global features of the previous layer of the current layer are obtained and the spliced ​​RGB channel features and spliced ​​thermal infrared channel features of the current layer are spliced ​​to obtain rectangular features. The rectangular features are subjected to 2D convolution and then applied to 1D convolution to obtain target features. For each layer in the RGB spatial feature set and the initial thermal infrared spatial feature set, the current RGB spatial feature is multiplied by the first target weight to obtain the spliced ​​RGB spatial feature, and the current thermal infrared spatial feature is multiplied by the second target weight to obtain the spliced ​​thermal infrared spatial feature. The spliced ​​RGB channel space and spliced ​​thermal infrared spatial features of the current layer are obtained and spliced ​​to obtain the first rectangular feature. After the rectangular feature is subjected to 1D convolution, the target feature is obtained by a deconvolution operation with a stride of 2.

[0099] In one embodiment, obtaining the target overall feature according to the target channel feature and the target spatial feature includes:

[0100] Deconvolution operation is performed on the target channel features and target spatial features to obtain the target local features;

[0101] Obtaining a first local abnormal region and a second local abnormal region according to the first abnormal region and the second abnormal region;

[0102] The initial RGB image is cut according to the first local abnormal area to obtain a first local RGB image, and the initial thermal infrared image is cut according to the second local abnormal area to obtain a first local thermal infrared image;

[0103] Substituting the first local RGB image into a first preset model to obtain a first local feature, and substituting the first local thermal infrared image into a second preset model to obtain a second local feature;

[0104] The target local feature, the first local feature and the second local feature are spliced ​​together to obtain the target overall feature.

[0105] One implementation method extracts local abnormal areas of RGB and thermal infrared from the initial image and performs feature extraction separately to ensure that the features of both image modes are fully expressed and avoid information loss. The initial image is segmented according to the local abnormal areas to remove irrelevant areas, which greatly reduces the amount of subsequent calculations. This allows the system to focus more on the analysis of specific areas, improves the efficiency of feature extraction, and focuses detection on local abnormal areas. This can effectively reduce the interference of background or irrelevant areas on feature extraction, thereby improving the accuracy and stability of defect detection.

[0106] One implementation method is to segment the first and second local abnormal areas to perform separate feature extraction on areas where there is no duplication of defect positions. Different preset models are used to extract local features of RGB images and thermal infrared images, which helps to extract specific features of each mode more professionally and make the features more expressive.

[0107] In one implementation, the first and second local abnormal regions are obtained based on the first and second abnormal regions, specifically by removing the common abnormal regions in the first abnormal region to obtain the first local abnormal region, and removing the common abnormal regions in the second abnormal region to obtain the second local abnormal region; and the target channel features and the target spatial features are deconvolved to obtain the target local features, specifically by inputting the target channel features and the target spatial features into the deconvolution layer respectively to obtain the first deconvolution feature and the second deconvolution feature, and the first deconvolution feature and the second deconvolution feature are superimposed to obtain the target local feature.

[0108] In one implementation, the first preset model may be SIFT, SURF, ResNet, VGGNet, etc., and the second preset model may be InceptionNet, EfficientNet, AlexNet, U-Net, etc.

[0109] One implementation method is to splice the local features of the target with the local RGB and thermal infrared features, combining all abnormal features, which can better describe the overall state and local details of the target, improve the system's discrimination ability, and avoid omissions in abnormal detection.

[0110] Based on the same inventive concept, the present invention also provides an AI-based battery defect detection system. Figure 2 , Figure 2 A framework diagram of an AI-based battery defect detection system provided in an embodiment of the present invention includes:

[0111] An abnormal area determination module is used to obtain an initial RGB image and an initial thermal infrared image of the target battery, determine the abnormal areas in the initial RGB image and the initial thermal infrared image to obtain a first abnormal area and a second abnormal area; the intersection area of ​​the first abnormal area and the second abnormal area is recorded as a common abnormal area; the initial RGB image and the initial thermal infrared image are images taken under the same environment;

[0112] An image segmentation module is used to segment the initial RGB image and the initial thermal infrared image according to the common abnormal areas to obtain the target RGB image and the target thermal infrared image;

[0113] A feature extraction module is used to perform channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features;

[0114] The defect determination module is used to obtain the target total feature based on the target channel feature and the target space feature, and to search the preset database based on the target total feature to determine the defect type of the target battery.

[0115] An AI-based battery defect detection system provided by an embodiment of the present invention can simultaneously capture surface and internal defect information of the battery through joint analysis of RGB and thermal infrared images, reduce misjudgments of a single detection method, perform multi-scale feature separation in abnormal areas, and extract channel features and spatial features. Ultimately, the solution can accurately distinguish between external and internal defects, reducing confusion even if the locations overlap, thereby ensuring the accuracy and stability of detection.

[0116] In one embodiment, the abnormal area determination module includes:

[0117] An image alignment module is used to align the initial RGB image and the initial thermal infrared image, and then segment the initial RGB image and the initial thermal infrared image using an edge detection algorithm to obtain a first RGB image and a first thermal infrared image by extracting only the area containing the target battery.

[0118] an abnormal region detection module, configured to perform abnormal region detection on the first RGB image to obtain a first abnormal pixel set, and perform abnormal region detection on the first thermal infrared image to obtain a second abnormal pixel set;

[0119] The abnormal pixel coordinate determination module is used to obtain the boundary coordinates of the target abnormal pixel set for the target abnormal pixel set, and generate a target abnormal area according to the boundary coordinates; if the target abnormal pixel set is the first abnormal pixel set, the target abnormal area is the first abnormal area; if the target abnormal pixel set is the second abnormal pixel set, the target abnormal area is the second abnormal area.

[0120] In one embodiment, the feature extraction module includes:

[0121] A multi-channel feature extraction module is used to perform multi-channel feature extraction on the target RGB image and the target thermal infrared image through an encoder to obtain an RGB channel feature set and a thermal infrared channel feature set;

[0122] The spatial feature extraction module is used to obtain the spatial feature corresponding to each channel feature in the RGB channel feature set and the thermal infrared channel feature set through a 2D convolution operation to obtain the RGB spatial feature set and the thermal infrared spatial feature set;

[0123] A target feature determination module is used to obtain a preset number of channel groups for the first target feature set and the second target feature set to obtain a target channel group set, determine the first target weight and the second target weight according to the target channel group set, and fuse the first target feature set and the second target feature set according to the first target weight and the second target weight to obtain the target feature; the channel group is the first target feature and the second target feature under the same parameters; if the first target feature set is the RGB channel feature set, the second target feature set is the thermal infrared channel feature set, and the target feature is the target channel feature; if the first target feature set is the RGB space feature set, the second target feature set is the thermal infrared space feature set, and the target feature is the target space feature.

[0124] In one embodiment, the target feature determination module includes:

[0125] A pooling module is used to perform maximum pooling on the target features in the target channel group to obtain a first target vector group;

[0126] a vector splicing module, configured to convolve the first target vector group to obtain a second target vector group, and splice vectors in the second target vector group to obtain a spliced ​​vector;

[0127] A weight vector splitting module is used to perform a normalization operation on the splicing vector to obtain a weight vector, and split the weight vector to obtain a first target weight and a second target weight;

[0128] The feature weighted fusion module is used to perform feature weighted fusion on each channel group according to the first target weight and the second target weight to obtain local features, and to fuse all local features to obtain target features.

[0129] In one embodiment, the defect determination module includes:

[0130] The deconvolution operation module is used to perform deconvolution operations on the target channel features and target spatial features to obtain the target local features;

[0131] A local abnormal region determining module, configured to obtain a first local abnormal region and a second local abnormal region according to the first abnormal region and the second abnormal region;

[0132] A local image cutting module is used to cut the initial RGB image according to the first local abnormal area to obtain a first local RGB image, and cut the initial thermal infrared image according to the second local abnormal area to obtain a first local thermal infrared image;

[0133] a local feature determination module, configured to substitute the first local RGB image into a first preset model to obtain a first local feature, and substitute the first local thermal infrared image into a second preset model to obtain a second local feature;

[0134] The feature splicing module is used to splice the target local feature, the first local feature and the second local feature to obtain the target overall feature.

[0135] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and should not be considered to limit the scope of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.

Claims

1. A battery defect detection method based on AI, characterized in that: The method comprises: Acquire an initial RGB image and an initial thermal infrared image of a target battery, determine abnormal regions in the initial RGB image and the initial thermal infrared image to obtain a first abnormal region and a second abnormal region; the intersection of the first abnormal region and the second abnormal region is recorded as a common abnormal region; the initial RGB image and the initial thermal infrared image are images taken under the same environment; Cutting the initial RGB image and the initial thermal infrared image according to the common abnormal area to obtain a target RGB image and a target thermal infrared image; Performing channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features; A target total feature is obtained according to the target channel feature and the target space feature, and a preset database is searched according to the target total feature to determine the defect type of the target battery.

2. The AI-based battery defect detection method according to claim 1, characterized in that: Determining abnormal areas in the initial RGB image and the initial thermal infrared image to obtain a first abnormal area and a second abnormal area includes: After aligning the initial RGB image and the initial thermal infrared image, segmenting the initial RGB image and the initial thermal infrared image to obtain a region only containing the target battery using an edge detection algorithm to obtain a first RGB image and a first thermal infrared image; Performing abnormal region detection on the first RGB image to obtain a first abnormal pixel set, and performing abnormal region detection on the first thermal infrared image to obtain a second abnormal pixel set; For a target abnormal pixel set, boundary coordinates in the target abnormal pixel set are obtained, and a target abnormal region is generated according to the boundary coordinates; if the target abnormal pixel set is a first abnormal pixel set, the target abnormal region is a first abnormal region; if the target abnormal pixel set is a second abnormal pixel set, the target abnormal region is a second abnormal region.

3. The AI-based battery defect detection method according to claim 1, characterized in that: Performing channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features includes: Performing multi-channel feature extraction on the target RGB image and the target thermal infrared image respectively through an encoder to obtain an RGB channel feature set and a thermal infrared channel feature set; For each channel feature in the RGB channel feature set and the thermal infrared channel feature set, a spatial feature corresponding to the channel feature is obtained by a 2D convolution operation to obtain an RGB spatial feature set and a thermal infrared spatial feature set; For the first target feature set and the second target feature set, a preset number of channel groups are obtained to obtain a target channel group set, a first target weight and a second target weight are determined according to the target channel group set, and the first target feature set and the second target feature set are fused according to the first target weight and the second target weight to obtain a target feature; the channel group is the first target feature and the second target feature under the same parameters; if the first target feature set is the RGB channel feature set, then the second target feature set is the thermal infrared channel feature set, and the target feature is the target channel feature; if the first target feature set is the RGB space feature set, then the second target feature set is the thermal infrared space feature set, and the target feature is the target space feature.

4. The AI-based battery defect detection method according to claim 3, characterized in that: Determining a first target weight and a second target weight according to the target channel set, and fusing the first target feature set and the second target feature set according to the first target weight and the second target weight to obtain a target feature includes: Performing maximum pooling on the target features in the target channel group to obtain a first target vector group; Convolving the first target vector group to obtain a second target vector group, and concatenating vectors in the second target vector group to obtain a concatenated vector; Normalizing the splicing vector to obtain a weight vector, and splitting the weight vector to obtain a first target weight and a second target weight; According to the first target weight and the second target weight, feature weighted fusion is performed on each channel group to obtain local features, and all local features are fused to obtain target features.

5. The AI-based battery defect detection method according to claim 2, characterized in that: Obtaining the target total feature according to the target channel feature and the target space feature includes: Performing a deconvolution operation on the target channel feature and the target spatial feature to obtain a target local feature; Obtaining a first local abnormal region and a second local abnormal region according to the first abnormal region and the second abnormal region; Cutting the initial RGB image according to the first local abnormal area to obtain a first local RGB image, and cutting the initial thermal infrared image according to the second local abnormal area to obtain a first local thermal infrared image; Substituting the first local RGB image into a first preset model to obtain a first local feature, and substituting the first local thermal infrared image into a second preset model to obtain a second local feature; The target local feature, the first local feature, and the second local feature are spliced ​​together to obtain a target overall feature.

6. An AI-based battery defect detection system, characterized in that: The system comprises: an abnormal region determination module, configured to obtain an initial RGB image and an initial thermal infrared image of a target battery, determine abnormal regions in the initial RGB image and the initial thermal infrared image to obtain a first abnormal region and a second abnormal region; the intersection of the first abnormal region and the second abnormal region is recorded as a common abnormal region; the initial RGB image and the initial thermal infrared image are images taken in the same environment; An image cutting module, configured to cut the initial RGB image and the initial thermal infrared image according to the common abnormal area to obtain a target RGB image and a target thermal infrared image; A feature extraction module is used to perform channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features; The defect determination module is used to obtain a target total feature according to the target channel feature and the target space feature, and to search a preset database according to the target total feature to determine the defect type of the target battery.

7. The AI-based battery defect detection system according to claim 6, characterized in that: The abnormal area determination module includes: an image alignment module, configured to align the initial RGB image and the initial thermal infrared image, and then segment the initial RGB image and the initial thermal infrared image to obtain a first RGB image and a first thermal infrared image by using an edge detection algorithm to obtain a region containing only the target battery; an abnormal region detection module, configured to perform abnormal region detection on the first RGB image to obtain a first abnormal pixel set, and perform abnormal region detection on the first thermal infrared image to obtain a second abnormal pixel set; The abnormal pixel coordinate determination module is used to obtain the boundary coordinates of the target abnormal pixel set for the target abnormal pixel set, and generate a target abnormal area according to the boundary coordinates; if the target abnormal pixel set is the first abnormal pixel set, the target abnormal area is the first abnormal area; if the target abnormal pixel set is the second abnormal pixel set, the target abnormal area is the second abnormal area.

8. The AI-based battery defect detection system according to claim 6, characterized in that: The feature extraction module includes: A multi-channel feature extraction module is used to perform multi-channel feature extraction on the target RGB image and the target thermal infrared image through an encoder to obtain an RGB channel feature set and a thermal infrared channel feature set; A spatial feature extraction module is used to obtain the spatial feature corresponding to each channel feature in the RGB channel feature set and the thermal infrared channel feature set by performing a 2D convolution operation to obtain the RGB spatial feature set and the thermal infrared spatial feature set; A target feature determination module is used to obtain a preset number of channel groups for the first target feature set and the second target feature set to obtain a target channel group set, determine a first target weight and a second target weight based on the target channel group set, and fuse the first target feature set and the second target feature set according to the first target weight and the second target weight to obtain a target feature; the channel group is the first target feature and the second target feature under the same parameters; if the first target feature set is the RGB channel feature set, then the second target feature set is the thermal infrared channel feature set, and the target feature is the target channel feature; if the first target feature set is the RGB space feature set, then the second target feature set is the thermal infrared space feature set, and the target feature is the target space feature.

9. The AI-based battery defect detection system according to claim 8, characterized in that: The target feature determination module includes: A pooling module, configured to perform maximum pooling on the target features in the target channel group to obtain a first target vector group; a vector splicing module, configured to convolve the first target vector group to obtain a second target vector group, and splice vectors in the second target vector group to obtain a spliced ​​vector; a weight vector splitting module, configured to perform a normalization operation on the splicing vector to obtain a weight vector, and split the weight vector to obtain a first target weight and a second target weight; The feature weighted fusion module is used to perform feature weighted fusion on each channel group according to the first target weight and the second target weight to obtain local features, and to fuse all local features to obtain target features.

10. The AI-based battery defect detection system according to claim 7, characterized in that: The defect determination module includes: A deconvolution operation module, configured to perform a deconvolution operation on the target channel feature and the target spatial feature to obtain a target local feature; a local abnormal region determining module, configured to obtain a first local abnormal region and a second local abnormal region according to the first abnormal region and the second abnormal region; a local image cutting module, configured to cut the initial RGB image according to the first local abnormal region to obtain a first local RGB image, and cut the initial thermal infrared image according to the second local abnormal region to obtain a first local thermal infrared image; a local feature determination module, configured to substitute the first local RGB image into a first preset model to obtain a first local feature, and substitute the first local thermal infrared image into a second preset model to obtain a second local feature; A feature splicing module is used to splice the target local feature, the first local feature and the second local feature to obtain a target overall feature.

Citation Information

Patent Citations

  • Battery defect detection method based on lightweight neural network

    CN113989267B

  • Remote sensing image target detection method and system based on multi-modal difference complementation fusion

    CN118628930A

  • Multi-modal fusion fault detection method and system based on acoustic image-visible light-infrared, and electronic equipment

    CN118657747A