Battery defect detection method and system based on AI

By extracting and analyzing the RGB and thermal infrared images of the battery, combining the two features to distinguish the external and internal defects of the battery, the problem of low accuracy when overlapping positions in battery defect detection is solved, and high-accuracy defect detection is achieved.

CN119671970AActive Publication Date: 2025-03-21ACSON (SHENZHEN) INTELLIGENT TECH CO LTD

Patent Information

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

AI Technical Summary

Technical Problem

When the battery has both external and internal defects, and the two overlap, it is difficult to distinguish the characteristics of surface and deep defects, which affects the accuracy of detection.

Method used

By acquiring the initial RGB image and the initial thermal infrared image of the target battery, the abnormal area is determined and cut, and the channel feature extraction and spatial feature extraction are performed on the target RGB image and the target thermal infrared image respectively, and the two features are combined to find the preset database to determine the defect type of the battery.

Benefits of technology

Through the joint analysis of RGB and thermal infrared images, the defects between the outside and the inside can be accurately distinguished, and 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 CN119671970A_ABST
    Figure CN119671970A_ABST
Patent Text Reader

Abstract

The invention discloses a battery defect detection method and system based on AI, and relates to the technical field of image processing. After abnormal areas in the initial RGB image and the initial thermal infrared image are determined, cutting the initial RGB image and the initial thermal infrared image according to the abnormal areas to obtain a target RGB image and a target thermal infrared image; and respectively performing channel feature extraction and spatial feature extraction on the target RGB image and the target thermal infrared image to obtain a target total feature, and searching a preset database according to the target total feature to determine the defect type of the target battery. Through joint analysis of RGB and thermal infrared images, surface and internal defect information of the battery can be captured at the same time, misjudgment of a single detection mode is reduced, multi-scale feature separation is performed in an abnormal region, and external and internal defects can be accurately distinguished finally by extracting channel features and spatial features, so that the accuracy of detection is improved. Even if the positions are overlapped, confusion can be reduced, and detection accuracy is guaranteed.
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 a battery defect detection method and system based on AI. 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 the core issues of concern to 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 regional recommendation network for classification and location of defective areas, thereby obtaining the category and location of the defects. However, this solution does not solve the problem that when the battery has both external defects 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 defect characteristics, which affects the detection accuracy, and to propose an AI-based battery defect detection method and system.

[0005] In a first aspect of the implementation 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 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 in the same environment;

[0007] Cutting the initial RGB image and the initial thermal infrared image according to the 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 the abnormal regions in the initial RGB image and the initial thermal infrared image to obtain the first abnormal region and the second abnormal region 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 first RGB image and a first thermal infrared image by using an edge detection algorithm to obtain a region only including the target battery;

[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 by 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, 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.

[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 concatenated to obtain a target overall feature.

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

[0030] An abnormal area determination module is used to obtain an initial RGB image and an initial thermal infrared image of a 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 in the same environment;

[0031] An image cutting module, used for cutting the initial RGB image and the initial thermal infrared image according to the 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 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 only including 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 in 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 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 to obtain a target channel group set for a first target feature set and a second target feature set, determine a first target weight and a 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 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, 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.

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

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

[0044] A vector concatenation module, configured to convolve the first target vector group to obtain a second target vector group, and concatenate vectors in the second target vector group to obtain a concatenated vector;

[0045] A weight vector splitting module, used for performing a normalization operation on the splicing vector to obtain a weight vector, and splitting 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, used for performing 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 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;

[0051] A local feature determination module, used for 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;

[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 abnormal area to obtain the target RGB image and the target thermal infrared image; respectively extracts channel features and spatial features from the target RGB image and the target thermal infrared image to obtain the target channel features and the target spatial features; obtains the target total features according to the target channel features and the target spatial features, and searches the preset database according to the target total features 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 external and internal defects by extracting channel features and spatial features, and reducing confusion even if the positions overlap, thereby ensuring the accuracy and stability of detection. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0056] Figure 1 A flowchart of a battery defect detection method based on AI 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 be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions 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. The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the present invention, the description of "first", "second", etc. is only used for descriptive purposes, and cannot be understood as indicating or implying its relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" can explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in the field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection required 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 a battery defect detection method based on AI provided by an embodiment of the present invention. The method comprises the following steps:

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

[0062] S102, cutting the initial RGB image and the initial thermal infrared image according to the 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 the surface and internal defect information of the battery through the joint analysis of RGB and thermal infrared images, reduce the misjudgment 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, reduce confusion even if the positions overlap, and ensure 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, so as to comprehensively characterize the abnormal area of ​​the battery; directly matching the defect template in the preset database according to the target characteristics not only speeds up the diagnosis speed, but also reduces the subjective error 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, wherein 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 the abnormal regions in the initial RGB image and the initial thermal infrared image to obtain the first abnormal region and the second abnormal region includes:

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

[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 the 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 is to segment the target battery area from the background through an edge detection algorithm, 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] An 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 abnormalities can be effectively identified in each image. By using the color information of RGB images and the temperature information of thermal infrared images, abnormalities can be detected from different angles, providing more comprehensive data support for defect analysis.

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

[0077] An implementation method is to extract feature points from an initial RGB image and an initial thermal infrared image through a feature extraction algorithm such as SIFT, SURF or ORB, wherein the battery edge of the initial thermal infrared image and the battery edge of the initial RGB image are extracted, and the feature points in the initial RGB image and the initial thermal infrared image are compared according to the extracted feature points through a distance-based algorithm, and the corresponding feature points are determined according to the comparison result, and the initial RGB image and the initial thermal infrared image are aligned according to 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] In one implementation, abnormal region detection is performed on a first RGB image to obtain a first abnormal pixel set, and abnormal region detection is performed on a 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, a 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, and 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 a technician, and all abnormal pixel points of the RGB image are obtained to obtain a first abnormal pixel set; for the thermal infrared image, regions in the thermal infrared image are clustered by a region growing algorithm. The region growing algorithm may 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 a second abnormal pixel point set.

[0079] In one implementation, the boundary coordinates of the target abnormal pixel set are obtained, and 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 is made parallel to the X-axis and Y-axis of the two-dimensional coordinates 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 the target channel feature and the target spatial feature 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, a spatial feature corresponding to the channel feature is obtained through a 2D convolution operation to obtain an RGB spatial feature set and a 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 an RGB channel feature set, the second target feature set is a thermal infrared channel feature set, and the target feature is a target channel feature; if the first target feature set is an RGB space feature set, the second target feature set is a thermal infrared space feature set, and the target feature is a 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; the features are fused using channel weights to achieve deep interaction of information, allowing 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 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 features of defects can be captured more sensitively, greatly improving the level of detection and helping to distinguish different types of defects.

[0087] An implementation method calculates the target weights of RGB and thermal infrared feature sets, assigns different weights to each data source, ensures that more informative feature sets are given priority in different situations, helps to enhance the flexibility and accuracy of detection, and uses a preset number of channel groups as screening conditions to improve accuracy; performs a 2D convolution operation on each channel feature in the RGB channel feature set to obtain an RGB spatial feature set, and performs a 2D convolution operation on each channel feature in the thermal infrared channel feature set to obtain a thermal infrared spatial feature set.

[0088] In one implementation, 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 pre-set number is determined by a technician.

[0089] In one embodiment, determining a first target weight and a second target weight according to a 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:

[0090] Perform maximum pooling on the target features in the target channel group to obtain a 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] Normalizing the concatenated vector to obtain a weight vector, and splitting 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 is to extract the most significant part of the feature set through the maximum pooling operation, which helps to retain the particularly prominent information in each channel group, while reducing the data dimension, reducing redundant features, and improving data processing efficiency; the convolution operation further refines the pooled features, enhances 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 channel groups according to weight vectors so that the contributions of different channel features are reasonably distributed. By splicing and splitting feature vectors, the correlation and integration between features can be achieved while maintaining the information of each channel group, providing a global perspective for subsequent weighted fusion, thereby 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 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, wherein 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 length as 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] An implementation method, for each layer in the RGB channel feature set and the initial thermal infrared channel feature set, multiply the current RGB channel feature by the first target weight to obtain a spliced ​​RGB channel feature, multiply the current thermal infrared channel feature by the second target weight to obtain a spliced ​​thermal infrared channel feature, obtain the global feature of the previous layer of the current layer and the spliced ​​RGB channel feature and the spliced ​​thermal infrared channel feature of the current layer to obtain a rectangular feature, perform 2D convolution on the rectangular feature and apply it to 1D convolution to obtain the target feature; for each layer in the RGB spatial feature set and the initial thermal infrared spatial feature set, multiply the current RGB spatial feature by the first target weight to obtain a spliced ​​RGB spatial feature, multiply the current thermal infrared spatial feature by the second target weight to obtain a spliced ​​thermal infrared spatial feature, obtain the spliced ​​RGB channel space and the spliced ​​thermal infrared spatial feature of the current layer to obtain a first rectangular feature, perform 1D convolution on the rectangular feature, and obtain the target feature through a deconvolution operation with a stride of 2.

[0098] In one embodiment, obtaining the target total feature according to the target channel feature and the target space feature includes:

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

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

[0101] 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;

[0102] 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;

[0103] The target local feature, the first local feature and the second local feature are concatenated to obtain the target overall feature.

[0104] One implementation method is to extract local abnormal areas of RGB and thermal infrared in the initial image, and perform feature extraction respectively to ensure that the features of the two image modes are fully expressed and avoid information loss. The initial image is cut according to the local abnormal areas to remove irrelevant areas, which greatly reduces the amount of subsequent calculations and makes the system more focused on the analysis of specific areas. The efficiency of feature extraction is improved, and the detection focus is placed on the local abnormal areas. It can effectively reduce the interference of background or irrelevant areas on feature extraction, thereby improving the accuracy and stability of defect detection.

[0105] One implementation method is to segment the first and second local abnormal areas to perform separate feature extraction on places where there is no duplication of defect positions, and use different preset models 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.

[0106] In one implementation, the first abnormal region and the second abnormal region are obtained according to the first abnormal region and the second abnormal region, specifically by removing the common abnormal region in the first abnormal region to obtain the first local abnormal region, and removing the common abnormal region in the second abnormal region to obtain the second local abnormal region; the target channel feature and the target space feature are deconvolved to obtain the target local feature, specifically by inputting the target channel feature and the target space feature 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.

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

[0108] An implementation method that combines the local features of the target with the local RGB and thermal infrared features, combines all abnormal features, can better describe the overall state and local details of the target, improves the system's discrimination ability, and avoids omissions in abnormal detection

[0109] Based on the same inventive concept, the embodiment of 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:

[0110] The abnormal area determination module is used to obtain the initial RGB image and the 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 the first abnormal area and the second abnormal area; the intersection area 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;

[0111] An image cutting module is used to cut the initial RGB image and the initial thermal infrared image according to the abnormal area to obtain the target RGB image and the target thermal infrared image;

[0112] A feature extraction module is used to extract channel features and spatial features from the target RGB image and the target thermal infrared image respectively to obtain target channel features and target spatial features;

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

[0114] An AI-based battery defect detection system provided based on an embodiment of the present invention can simultaneously capture the surface and internal defect information of the battery through the joint analysis of RGB and thermal infrared images, reduce the misjudgment 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, reduce confusion even if the positions overlap, and ensure the accuracy and stability of detection.

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

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

[0117] An abnormal region detection module is used 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;

[0118] The abnormal pixel coordinate determination module is used to obtain the boundary coordinates in 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.

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

[0120] 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;

[0121] 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 through a 2D convolution operation to obtain the RGB spatial feature set and the thermal infrared spatial feature set;

[0122] A target feature determination module is used to obtain a preset number of channel groups to obtain a target channel group set for the first target feature set and the second target feature 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 an RGB channel feature set, the second target feature set is a thermal infrared channel feature set, and the target feature is a target channel feature; if the first target feature set is an RGB space feature set, the second target feature set is a thermal infrared space feature set, and the target feature is a target space feature.

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

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

[0125] A vector concatenation module, configured to convolve the first target vector group to obtain a second target vector group, and concatenate vectors in the second target vector group to obtain a concatenated vector;

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

[0127] 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.

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

[0129] A deconvolution operation module is used to perform a deconvolution operation on target channel features and target spatial features to obtain target local features;

[0130] 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;

[0131] A local image cutting module, used for 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;

[0132] A local feature determination module, used for 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;

[0133] 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.

[0134] 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 cannot be considered to limit the scope of implementation 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 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 in the same environment; Cutting the initial RGB image and the initial thermal infrared image according to the 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 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 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 first RGB image and a first thermal infrared image by using an edge detection algorithm to obtain a region only including the target battery; 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 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 by 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, 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.

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 comprises: 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 concatenated 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, weighted fusion of features 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 concatenated to obtain a target overall feature.

6. An AI-based battery defect detection system, characterized in that: The system comprises: An abnormal area determination module is used to obtain an initial RGB image and an initial thermal infrared image of a 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 in the same environment; An image cutting module, used for cutting the initial RGB image and the initial thermal infrared image according to the 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 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 comprises: 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 only including 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 in 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 comprises: 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 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 to obtain a target channel group set for a first target feature set and a second target feature set, determine a first target weight and a 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 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, 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.

9. The AI-based battery defect detection system according to claim 8, characterized in that: The target feature determination module comprises: A pooling module, used for performing maximum pooling on the target features in the target channel group to obtain a first target vector group; A vector concatenation module, configured to convolve the first target vector group to obtain a second target vector group, and concatenate vectors in the second target vector group to obtain a concatenated vector; A weight vector splitting module, used for performing a normalization operation on the splicing vector to obtain a weight vector, and splitting 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 comprises: A deconvolution operation module, used for performing 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 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; A local feature determination module, used for 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; 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

  • Detection method of aviation composite material based on multi-modal information

    CN113848234A

  • Target tracking system and method fusing multi-modal features

    CN117522923A

  • Subway station steel pipe column detection method based on infrared sensor

    CN117809072A

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

    CN118628930A

Cited By

  • Highway pavement disease detection method and system

    CN120182625A