Steel shell battery surface defect detection method and related device

By combining RGB images and 3D point cloud data in a multimodal detection method, the efficiency and accuracy issues of surface defect detection for steel-cased batteries have been resolved, achieving efficient and accurate defect detection and improving battery quality and safety.

CN120852287APending Publication Date: 2025-10-28WUYI UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510807306.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-10-28

AI Technical Summary

Technical Problem

During the manufacturing process of steel-cased batteries, defects such as scratches, dents, and indentations are easily generated on the surface, affecting product quality, safety, and service life. Existing technologies are difficult to detect efficiently and accurately.

Method used

Using RGB images and 3D point cloud data as dual-modal inputs, and through SDAS network, PointNetGAN network, ViT network, Point MAE network, cross-modal local-global feature consistency alignment module, weighted feature fusion module, multi-scale neighborhood aggregation module and mutual scoring mechanism, we can achieve efficient fusion of cross-modal information and anomaly scoring calculation, thereby enhancing the model's generalization ability and detection accuracy.

Benefits of technology

It improves the precision and accuracy of surface defect detection for steel-cased batteries, reduces false detections and missed detections, is suitable for complex industrial environments, and ensures battery safety and production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852287A_ABST
    Figure CN120852287A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a steel shell battery surface defect detection method and a related device. The method comprises the following steps: acquiring an RGB image and 3D point cloud data of the surface of the steel shell battery; and inputting the RGB image and the 3D point cloud data into a steel shell battery surface defect detection model to obtain a steel shell battery surface defect detection result, the steel shell battery surface defect detection model comprises an SDAS network, a Point NetGAN network, a ViT network, a Point MAE network, a cross-modal local-global feature consistency alignment module, a weighted feature fusion module, a multi-scale neighborhood aggregation module and a mutual scoring mechanism, and the steel shell battery surface defect detection result comprises an abnormal segmentation result and an abnormal classification result. On the basis, accurate detection on the surface defects of the steel shell battery can be efficiently achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial defect detection, and more particularly to a method and related apparatus for detecting surface defects in steel-cased batteries. Background Art

[0002] Steel-cased batteries are widely used in consumer electronics, power tools, energy storage devices, and new energy vehicles due to their high strength, excellent sealing performance, and stable mechanical structure. With the increasing market demand for high-performance batteries, the production scale of steel-cased batteries is also continuously expanding, making quality control a key focus of the industry. However, during the manufacturing process of steel-cased batteries, defects such as scratches, dents, indentations, and foreign matter contamination can easily occur on their surface after stamping, welding, coating, and handling. These defects not only affect the appearance quality of the product but may also weaken the structural integrity of the battery, thereby affecting its safety, reliability, and lifespan, and even causing potential safety hazards. Therefore, how to efficiently and accurately detect surface defects in steel-cased batteries has become an urgent technical problem to be solved. Summary of the Invention

[0003] This invention provides a method and related apparatus for detecting surface defects in steel-cased batteries, which can efficiently and accurately detect surface defects in steel-cased batteries.

[0004] In a first aspect, embodiments of the present invention provide a method for detecting surface defects in steel-cased batteries, comprising:

[0005] Acquire RGB images and 3D point cloud data of the steel-cased battery surface;

[0006] The RGB image and the 3D point cloud data are input into the steel-shell battery surface defect detection model to obtain the steel-shell battery surface defect detection results. The steel-shell battery surface defect detection model includes an SDAS network, a PointNetGAN network, a ViT network, a Point MAE network, a cross-modal local-global feature consistency alignment module, a weighted feature fusion module, a multi-scale neighborhood aggregation module, and a mutual scoring mechanism. The steel-shell battery surface defect detection results include anomaly segmentation results and anomaly classification results.

[0007] In some embodiments, inputting the RGB image and the 3D point cloud data into the steel-cased battery surface defect detection model to obtain the steel-cased battery surface defect detection result includes:

[0008] The RGB image is input into the SDAS network to obtain a synthesized abnormal image;

[0009] The 3D point cloud data is input into the PointNetGAN network to obtain 3D abnormal point cloud data;

[0010] Local features are obtained by extracting features from the synthesized abnormal image using the ViT network.

[0011] The Point MAE network is used to extract features from the 3D abnormal point cloud data to obtain global features.

[0012] The local alignment loss of the local features and the global alignment loss of the global features are calculated by the cross-modal local-global feature consistency alignment module to obtain the aligned features;

[0013] The weighted feature fusion module performs cross-modal information fusion on the aligned features to obtain cross-modal fused features;

[0014] The multi-scale neighborhood aggregation module extracts multi-level features with spatial context information from the cross-modal fusion features to obtain anomaly perception features that fuse information at different scales.

[0015] The anomaly perception features are scored using the mutual scoring mechanism, and the anomaly segmentation result and the anomaly classification result are output in parallel.

[0016] In some embodiments, the step of calculating the local alignment loss of the local features and the global alignment loss of the global features through the cross-modal local-global feature consistency alignment module to obtain aligned features includes:

[0017] Using bilinear interpolation, 3D point cloud features are converted into patch-level features of 2D images;

[0018] K-Means clustering is performed on the patch-level features of the RGB image and point cloud to generate global features of the RGB image and global features of the point cloud, respectively.

[0019] The cross-modal local-global feature consistency alignment module calculates the cross-modal global alignment loss based on the global features of the RGB image and the global features of the point cloud;

[0020] The CLC algorithm is used to obtain the overall loss function by jointly optimizing the local alignment loss and the global alignment loss;

[0021] Based on the overall loss function, the RGB image and 3D point cloud features are aligned for depth consistency to obtain the aligned features.

[0022] In some embodiments, the step of fusing cross-modal information on the aligned features through the weighted feature fusion module to obtain cross-modal fused features includes:

[0023] The RGB image fusion weights are determined based on the contribution of RGB image features to defect detection.

[0024] The weights of 3D point cloud data are determined based on the contribution of 3D point cloud features to defect detection.

[0025] The weighted feature fusion module fuses RGB image features and 3D point cloud features according to the RGB image fusion weight and the 3D point cloud data weight to obtain cross-modal fusion features.

[0026] In some embodiments, the step of extracting multi-level features with spatial context information from the cross-modal fusion features through the multi-scale neighborhood aggregation module to obtain anomaly perception features that fuse information at different scales includes:

[0027] The cross-modal fusion features are rearranged into a spatial structure using the multi-scale neighborhood aggregation module.

[0028] Based on the aggregation of neighborhoods at different scales of the spatial structure, anomaly perception features that fuse information at different scales are obtained.

[0029] In some embodiments, the step of calculating anomaly scores for the anomaly perception features through the mutual scoring mechanism and outputting the anomaly segmentation result and the anomaly classification result in parallel includes:

[0030] Based on the aforementioned anomaly perception features, the minimum distance of each patch token in the global feature space is calculated, and the minimum distance is used as the initial anomaly score.

[0031] After calculating the optimized preliminary anomaly scores at all scales, further multi-scale fusion calculations are performed to obtain patch-level anomaly scores.

[0032] The patch-level anomaly scores are upsampled to the original image size to generate the anomaly segmentation result;

[0033] The image-level anomaly score is extracted using a maximum value strategy to obtain the anomaly classification result.

[0034] In some embodiments, it also includes:

[0035] The RGB image and the 3D point cloud data are preprocessed to generate a defect mask image;

[0036] Defects are identified based on the defect mask image, and key information about battery defects is obtained.

[0037] The key information on battery defects is transmitted to the battery defect management platform in real time, so that the battery defect platform can display the detection results of surface defects of the steel-cased battery in conjunction with the visualization interface of the key information on battery defects. The detection results of surface defects of the steel-cased battery also include defect annotation, statistical reports and trend analysis.

[0038] Secondly, embodiments of the present invention also provide a surface defect detection device for steel-cased batteries, the device comprising:

[0039] The acquisition module is used to acquire RGB images and 3D point cloud data of the steel-cased battery surface;

[0040] The detection module is used to input the RGB image and the 3D point cloud data into the steel-shell battery surface defect detection model to obtain the steel-shell battery surface defect detection result. The steel-shell battery surface defect detection model includes an SDAS network, a PointNetGAN network, a ViT network, a Point MAE network, a cross-modal local-global feature consistency alignment module, a weighted feature fusion module, a multi-scale neighborhood aggregation module, and a mutual scoring mechanism. The steel-shell battery surface defect detection result includes anomaly segmentation result and anomaly classification result.

[0041] Thirdly, embodiments of the present invention also provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steel-cased battery surface defect detection method as described in the first aspect.

[0042] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer-executable instructions for performing the steel-cased battery surface defect detection method as described in the first aspect.

[0043] The present invention provides a method and related apparatus for detecting surface defects in steel-shell batteries. The method includes: acquiring RGB images and 3D point cloud data of the steel-shell battery surface; inputting the RGB images and 3D point cloud data into a steel-shell battery surface defect detection model to obtain surface defect detection results. The steel-shell battery surface defect detection model includes an SDAS network, a PointNetGAN network, a ViT network, a Point MAE network, a cross-modal local-global feature consistency alignment module, a weighted feature fusion module, a multi-scale neighborhood aggregation module, and a mutual scoring mechanism. The surface defect detection results include anomaly segmentation results and anomaly classification results. By using RGB images and 3D point cloud data as dual-modal inputs, the complementary advantages of multimodal data are fully utilized. Cross-modal local-global feature consistency alignment improves the depth alignment between the RGB images and 3D point clouds, achieving efficient fusion of multimodal information and thus improving the accuracy of defect detection. Combining anomaly data synthesis technology based on a strength-controllable SDAS network and PointNetGAN enhances the model's generalization ability and effectively solves the problem of scarce defect samples in industrial environments. By introducing a multi-scale neighborhood aggregation module, the model's ability to perceive defects of different sizes is improved. Furthermore, by combining a mutual scoring mechanism to optimize anomaly scoring calculation, false positives and false negatives are reduced, enhancing the accuracy and robustness of detection. Based on this, the embodiments of the present invention can achieve efficient and accurate surface defect detection of steel-cased batteries. Attached Figure Description

[0044] Figure 1A This is a flowchart of a method for detecting surface defects in steel-cased batteries according to an embodiment of the present invention;

[0045] Figure 1B This is a synthetic diagram of diffusion anomalies with controllable intensity provided in one embodiment of the present invention;

[0046] Figure 2 This is a general framework diagram of a steel-cased battery surface defect detection method provided in one embodiment of the present invention;

[0047] Figure 3 This is a schematic diagram of the structure of an RGB image feature extraction network provided in one embodiment of the present invention;

[0048] Figure 4 This is a schematic diagram of the structure of a 3D point cloud feature extraction network provided in one embodiment of the present invention;

[0049] Figure 5 This is a schematic diagram of a cross-modal local-global feature consistency alignment module provided in one embodiment of the present invention;

[0050] Figure 6This is a schematic diagram of a multi-scale neighborhood aggregation module provided in one embodiment of the present invention;

[0051] Figure 7 This is a schematic diagram of the structure of a steel-cased battery surface defect detection device provided in one embodiment of the present invention;

[0052] Figure 8 This is a schematic diagram of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0054] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the following drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0055] In this embodiment of the invention, the terms "furthermore," "exemplarily," or "optionally" are used as examples, illustrations, or descriptions and should not be construed as being more preferred or advantageous than other embodiments or designs. The use of the terms "furthermore," "exemplarily," or "optionally" is intended to present the relevant concepts in a specific manner.

[0056] To facilitate a more convenient description of the working principle of the embodiments of the present invention, the following introduction of relevant technical scenarios is given first.

[0057] Steel-cased batteries are widely used in consumer electronics, power tools, energy storage devices, and new energy vehicles due to their high strength, excellent sealing performance, and stable mechanical structure. With the increasing market demand for high-performance batteries, the production scale of steel-cased batteries is also continuously expanding, making quality control a key focus of the industry. However, during the manufacturing process of steel-cased batteries, defects such as scratches, dents, indentations, and foreign matter contamination can easily occur on their surface after stamping, welding, coating, and handling. These defects not only affect the appearance quality of the product but may also weaken the structural integrity of the battery, thereby affecting its safety, reliability, and lifespan, and even causing potential safety hazards. Therefore, how to efficiently and accurately detect surface defects in steel-cased batteries has become an urgent technical problem to be solved.

[0058] Based on this, the present invention provides a method and related apparatus for detecting surface defects in steel-shell batteries. The method includes: acquiring RGB images and 3D point cloud data of the steel-shell battery surface; inputting the RGB images and 3D point cloud data into a steel-shell battery surface defect detection model to obtain surface defect detection results. The steel-shell battery surface defect detection model includes an SDAS network, a PointNetGAN network, a ViT network, a Point MAE network, a cross-modal local-global feature consistency alignment module, a weighted feature fusion module, a multi-scale neighborhood aggregation module, and a mutual scoring mechanism. The surface defect detection results include anomaly segmentation results and anomaly classification results. By using RGB images and 3D point cloud data as dual-modal inputs, the complementary advantages of multimodal data are fully utilized. Cross-modal local-global feature consistency alignment improves the depth alignment between the RGB images and 3D point clouds, achieving efficient fusion of multimodal information and thus improving the accuracy of defect detection. Combining anomaly data synthesis technology based on the intensity-controllable SDAS network and PointNetGAN enhances the model's generalization ability and effectively solves the problem of scarce defect samples in industrial environments. By introducing a multi-scale neighborhood aggregation module, the model's ability to perceive defects of different sizes is improved. Furthermore, by combining a mutual scoring mechanism to optimize anomaly scoring calculation, false positives and false negatives are reduced, enhancing the accuracy and robustness of detection. Based on this, the embodiments of the present invention can achieve efficient and accurate surface defect detection of steel-cased batteries.

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

[0060] like Figure 1A As shown, Figure 1A This is a flowchart of a method for detecting surface defects in a steel-cased battery according to an embodiment of the present invention. The method for detecting surface defects in a steel-cased battery may include, but is not limited to, steps S101 to S102.

[0061] Step S101: Acquire RGB image and 3D point cloud data of the steel-cased battery surface;

[0062] Step S102: Input the RGB image and 3D point cloud data into the steel-shell battery surface defect detection model to obtain the steel-shell battery surface defect detection results. The steel-shell battery surface defect detection model includes SDAS network, PointNetGAN network, ViT network, Point MAE network, cross-modal local-global feature consistency alignment module, weighted feature fusion module, multi-scale neighborhood aggregation module and mutual scoring mechanism. The steel-shell battery surface defect detection results include anomaly segmentation results and anomaly classification results.

[0063] Understandably, RGB image acquisition is the first step in defect detection for steel-cased batteries. This invention uses a high-resolution industrial camera (e.g., Basler acA2500-14um) to photograph the battery surface to obtain clear and detailed image data. However, due to the scarcity of real-world anomaly data in industrial environments, training with only a limited number of defect samples restricts the model's generalization ability. Therefore, to overcome this limitation, this invention proposes a Strength-controllable Diffusion Anomaly Synthesis (SDAS) method. This method not only generates anomaly samples that conform to natural distributions but also provides flexible anomaly intensity adjustment capabilities, making it applicable to various industrial scenarios and effectively improving the performance of the defect detection model.

[0064] During the SDAS process, such as Figure 1B As shown, this invention first performs forward diffusion on the normal image, gradually adding noise to it until it conforms to a standard Gaussian distribution. Then, in the reverse denoising process, the variance (1+s)Σ is adjusted... θ Additional perturbations are introduced to cause the generated image to deviate from the normal image distribution, thus synthesizing anomaly images. To ensure that the anomalous regions conform to the true defect morphology, SDAS is combined with SIA (Structure-Informed Augmentation) for structured enhancement of the anomalous regions. SIA generates anomaly masks M using a PerlinNoise generator and uses an adaptive thresholding method to locate the anomalous regions. Finally, the normal image I and the anomalous image P generated by the diffusion model are blended using the mask image M and the inverse mask image m to obtain the synthesized anomalous image A. By adjusting the anomalous intensity parameter s, different sample data ranging from minor flaws to obvious defects can be generated, which can be represented as:

[0065] p θ (x′ t-1 |x′ t )=N(x′ t-1 μ θ (x′ t ,t),(1+s)Σ θ (x′ t ,t)) (1)

[0066] Where, x′ t-1 For the synthesized anomalous image, μ θ and Σ θ, representing the mean and variance predictions of the diffusion model, respectively, with s controlling the anomaly intensity. When s→0, the generated image is close to a normal image, while increasing s can increase the anomaly intensity. Furthermore, this invention combines Perlin noise to generate anomaly masks, thereby improving the realism and diversity of anomaly samples. Compared to traditional anomaly synthesis methods, SDAS possesses higher realism, controllable anomaly intensity, and better adaptability, effectively improving the training effect of the steel-cased battery surface defect detection model.

[0067] It is understandable that RGB images provide texture and color information of the battery surface, but they have limitations in detecting three-dimensional defects such as dents, scratches, and bulges. Therefore, this invention introduces 3D point cloud data to enhance spatial structural information. However, traditional point cloud acquisition is easily affected by environmental noise when processing highly reflective battery materials, leading to the loss of point clouds in defect areas. To address this, this invention combines laser scanning, structured light projection, and depth camera technology to acquire high-precision point clouds from multiple angles, ensuring the integrity and accuracy of defect areas. Due to the scarcity of severe defect samples in industrial production, relying solely on limited data to train the model will affect generalization ability. To solve this problem, this invention employs an anomaly data synthesis method based on PointNetGAN, combining Generative Adversarial Networks (GANs) with PointNet feature extraction to generate high-quality 3D anomaly point cloud data. Specifically, PointNetGAN extracts global features from normal point clouds through PointNet, then uses a generator G to generate anomaly point cloud data, and introduces a spatial perturbation mechanism during the generation process to enhance the diversity and realism of the anomaly point clouds.

[0068] Let the normal point cloud data be P. nor PointNetGAN uses a generator G to generate anomalous point clouds through random noise z, and combines this with a spatial perturbation mechanism D. spatial This method simulates defects and deformations in real-world environments, such as dents, bulges, and scratches, thereby enhancing the diversity and realism of synthetic data. The process for constructing anomalous point cloud data can be represented as follows:

[0069]

[0070] Furthermore, this invention employs WGAN-GP (Wasserstein GAN with Gradient Penalty) to improve model stability and prevent mode collapse. The generated 3D anomalous point cloud data can be fused across modalities with RGB anomalous data generated by SDAS to construct a more comprehensive anomalous sample library, supporting multimodal defect detection.

[0071] It is understood that this invention uses RGB images and 3D point cloud data as dual-modal inputs to achieve high-precision defect detection. First, high-resolution industrial cameras and 3D scanning technology are used to acquire data, and an anomaly data synthesis method based on an intensity-controlled diffusion model and PointNetGAN is employed to enhance the diversity and realism of anomaly samples. Subsequently, a cross-modal local-global feature consistency alignment module is used to optimize the alignment effect of RGB and point cloud features through local comparison and global feature matching, and an adaptive weighted fusion strategy is adopted to improve information complementarity. After feature extraction, a multi-scale neighborhood aggregation module is introduced to improve the model's ability to perceive defects of multiple sizes through the fusion of spatial information at different scales. To further improve the stability and accuracy of anomaly scoring, this invention proposes a mutual scoring mechanism, combining global feature matching, interval mean optimization, and multi-scale fusion, and then outputting anomaly segmentation and classification results in parallel. Finally, the defect detection results are post-processed and transmitted to an intelligent management platform for real-time monitoring and feedback. Based on this, the method can effectively reduce false detections and false negatives, and is suitable for battery quality inspection in complex industrial environments.

[0072] In one embodiment, step S102 may include, but is not limited to, steps S201 to S208.

[0073] Step S201: Input the RGB image into the SDAS network to obtain the synthesized abnormal image;

[0074] Step S202: Input the 3D point cloud data into the PointNetGAN network to obtain 3D abnormal point cloud data;

[0075] Step S203: Extract features from the synthesized abnormal image using the ViT network to obtain local features;

[0076] Step S204: Extract features from the 3D anomalous point cloud data using the Point MAE network to obtain global features;

[0077] Step S205: Calculate the local alignment loss of local features and the global alignment loss of global features through the cross-modal local-global feature consistency alignment module to obtain the aligned features;

[0078] Step S206: Perform cross-modal information fusion on the aligned features through the weighted feature fusion module to obtain cross-modal fused features;

[0079] Step S207: Extract multi-level features with spatial context information from cross-modal fusion features through the multi-scale neighborhood aggregation module to obtain anomaly perception features that fuse information at different scales;

[0080] Step S208: Calculate anomaly scores for anomaly perception features using a mutual scoring mechanism, and output anomaly segmentation and anomaly classification results in parallel.

[0081] It is understood that the overall framework of the steel-cased battery surface defect detection method based on cross-modal multi-scale neighborhood aggregation proposed in this invention is as follows: Figure 2 As shown, this method uses RGB images and 3D point clouds as dual-modal inputs. These two types of data are fed into the SDAS and PointNetGAN networks respectively for anomaly data synthesis. Then, feature extraction modules (ViT network and PointMAE network) process the two modalities separately. Subsequently, a cross-modal local-global feature consistency alignment module achieves deep alignment of features from the two modalities through local and global contrastive losses. The aligned features are first integrated through a weighted feature fusion module for cross-modal information, and then multi-level features with spatial contextual information are extracted through a multi-scale neighborhood aggregation module. Finally, the model outputs anomaly segmentation and classification results in parallel through an innovative mutual scoring mechanism. The entire method achieves progressive processing from feature alignment and fusion to multi-scale neighborhood aggregation and mutual scoring mechanism, ensuring accurate detection of battery surface defects.

[0082] Understandably, in defect detection tasks involving RGB images and 3D point clouds, direct feature fusion may lead to information loss or mismatch due to differences in structure and distribution between modalities, affecting detection accuracy. To address this, this invention proposes a Cross-modal Local-to-global Consistency Alignment (CLC) algorithm. This algorithm enhances the complementarity and consistency of features across different modalities through cross-modal feature projection, local feature alignment, and global feature alignment.

[0083] It is understood that this invention employs a dual-branch deep network architecture to extract feature representations from RGB images and 3D point clouds respectively. For RGB image modalities, such as Figure 3 As shown, this invention constructs a feature extraction network based on Vision Transformer (ViT). This network preserves spatial structure information through positional encoding, achieves feature transformation through linear mapping, and effectively captures long-range dependencies and deep semantic features of images by leveraging multi-head attention mechanisms and multi-layer perceptron stacking.

[0084] For 3D point cloud data, such as Figure 4As shown, this invention designs a feature extraction network based on PointMAE. This network first constructs a hierarchical point cloud structure using farthest point sampling (FPS) and K-nearest neighbors (KNN), then employs an attention-enhanced MLP network to extract local geometric features, and finally uses a Transformer encoder-decoder architecture to achieve global feature modeling.

[0085] Finally, to align cross-modal space features, this invention utilizes bilinear interpolation to transform 3D point cloud features into the patch-level feature space of a 2D image. Specifically, the point cloud is first divided into local regions using KNN and features are extracted. Then, weights are assigned based on the distance from each point to the center of the region to ensure smoothness and accuracy of the mapping. Subsequently, the corresponding positions of the 3D points in the 2D image are determined using camera projection parameters, and mean pooling is performed on the point cloud features within the same region to align them with RGB features.

[0086] Following feature projection, this invention proposes a cross-modal local-global feature consistency alignment algorithm, such as... Figure 5 As shown, this invention first designs local feature alignment to optimize the feature similarity between RGB images and point cloud data at the same spatial location. This invention designs a local alignment loss (L... LA This enhances the feature consistency between two modalities at the same spatial location through contrastive learning.

[0087]

[0088] Among them, F I ′ and F p '' represents the patch-level features of the RGB image and the point cloud, respectively. Using this loss function, the present invention can ensure that the features of RGB and 3D point cloud data remain consistent at the local level.

[0089] In addition to local feature alignment, this invention also considers the importance of global structural information for defect detection, and further designs a global consistency alignment loss (Li). GA To ensure consistency in the overall structure of RGB and point cloud data, K-Means clustering is first performed on the patch-level features of RGB and point cloud data to form global features G. I (Global features of RGB images) and G P (Point cloud global features), then calculate the global alignment loss across modalities:

[0090]

[0091] Where, N b For batch size, G I ′ and G P' represents the global features of RGB and 3D point clouds. This loss ensures consistency of the two modalities in global semantics, improving detection stability.

[0092] Finally, the CLC algorithm proposed in this invention achieves depth consistency alignment between RGB images and 3D point cloud features by jointly optimizing local alignment loss and global alignment loss. The overall loss function is as follows:

[0093] L CLC =α1L LA +α2L GA (5)

[0094] Here, α1 and α2 are adjustable weight parameters.

[0095] Understandably, after achieving cross-modal local-global feature consistency alignment, this invention further designs an adaptive weighted feature fusion algorithm to achieve optimal integration of RGB image and 3D point cloud features. This algorithm effectively solves the information selection problem in multimodal feature fusion through a dynamic weight allocation mechanism.

[0096] The goal of weighted feature fusion is to calculate the importance of each modal feature in the fusion process, weight them accordingly, and thus maximize the retention of useful information while avoiding interference between modalities. This invention sets different fusion weights w based on the contribution of different modal features to defect detection. rgb and w 3D The RGB image features f are weighted and fused using the following formula. rgb and 3D point cloud features F 2D To merge:

[0097] F fusion =w rgb ·f rgb +w 3D ·f 3D (6)

[0098] Among them, F fusion It is the weighted fusion feature, w rgb and w 3D The weights are determined based on the importance of each modality or dynamically adjusted through training.

[0099] Understandably, due to the significant differences in the size of anomalous regions, features at a single scale may not be able to fully capture all anomalous patterns. Therefore, this invention introduces a multi-scale neighborhood aggregation (MSNA) mechanism to improve the model's ability to perceive defects of different sizes.

[0100] MSNA uses adaptive pooling to aggregate neighborhood features at multiple scales, which can improve the detection accuracy of small-scale anomalies while ensuring the complete representation of large-scale anomaly regions. For example... Figure 6 As shown, this invention first rearranges the cross-modal fusion features into a spatial structure and aggregates them in neighborhoods of different scales r = {1, 3, 5} to enhance the model's ability to perceive anomalies of different sizes. For example, smaller neighborhoods (r = 1) are more suitable for detecting subtle anomalies, while larger neighborhoods (r = 5) help capture large-scale defect features. Ultimately, the aggregated features can characterize anomaly patterns at different scales, thereby improving detection performance.

[0101] To reduce computational complexity, MSNA applies pooling operations only at the high-level feature stage, thereby reducing computational overhead. Simultaneously, it introduces group pooling to improve feature aggregation efficiency, ensuring that the model achieves both enhanced detection performance and fast inference speed, meeting the needs of industrial applications.

[0102] Understandably, after completing multi-scale neighborhood aggregation, this invention can obtain anomaly perception features that fuse information from different scales. However, normal regions may have complex textures or lighting variations, and relying solely on local features may lead to false detections. To improve the discriminative power and detection stability of anomaly regions, this invention proposes a Mutual Scoring Mechanism (MSM). By combining global feature matching, interval mean optimization, and multi-scale fusion, it optimizes anomaly score calculation and outputs anomaly segmentation and classification results in parallel.

[0103] First, this invention calculates the minimum distance of each patch token in the global feature space and uses it as a preliminary anomaly score:

[0104]

[0105] in, Let G represent the feature representation of the m-th patch token after MSNA processing at scale r, where G represents the global feature space, i.e., the set of features of all tokens on the entire feature map. Since the features of normal regions can usually find similar matches globally, their anomaly scores are low. However, the features of abnormal regions are often more unique, making it difficult to find similar features globally, thus resulting in a larger matching distance and a relatively higher anomaly score.

[0106] To reduce the impact of lighting or texture variations in normal areas on anomaly scores, this invention introduces an interval mean optimization strategy, selecting only the top 5% of the lowest-scoring samples to calculate the mean, thereby suppressing noise and optimizing anomaly score calculation.

[0107]

[0108] Where K is the number of samples in the minimum scoring interval, usually taken as the top 5% of all patch scores. This strategy can effectively smooth out abnormal scores, reduce the influence of lighting or texture changes on normal areas, and improve the stability of defect detection.

[0109] After calculating the optimized anomaly scores at all scales r, this invention further performs multi-scale fusion calculations to obtain the final patch-level anomaly scores:

[0110]

[0111] Here, r represents the weights for different scales to ensure that both small-scale and large-scale anomaly regions are considered simultaneously. Finally, this invention upsamples the patch-level anomaly scores to the original image size to generate a complete anomaly segmentation result. Simultaneously, a maximum value (MAX) strategy is used to extract image-level anomaly scores, yielding the final anomaly classification result.

[0112] In summary, the mutual scoring mechanism significantly improves the accuracy and stability of surface defect detection for steel-cased batteries through global feature matching, interval mean optimization, and multi-level fusion. This method not only effectively reduces false positives and false negatives but also adapts to anomaly patterns of different sizes and shapes. Finally, it outputs anomaly segmentation and classification results in parallel, giving it greater practical value in industrial inspection and other application scenarios.

[0113] Understandably, the detection system preprocesses the input image and inputs it into the detection algorithm to generate a defect mask image. The post-processing algorithm accurately identifies defects and integrates key information such as the original image, defect mask, defect category, production line information, and battery model, transmitting this information in real time to the battery defect management platform. This platform displays the detection results through an intelligent visual interface, including defect annotations, statistical reports, and trend analysis, and automatically pushes alerts to staff terminals to remind them to take appropriate measures. Staff can quickly locate problematic production lines based on defect information and adjust production parameters or equipment to reduce the generation of defective batteries. This system forms a closed-loop control system of detection, feedback, and processing, improving detection accuracy and real-time performance, and ensuring battery quality and production efficiency.

[0114] Based on this, the present invention proposes a method for detecting surface defects in steel-cased batteries, which can significantly improve the detection accuracy and efficiency of steel-cased battery industrial production lines, reduce the false negative and false positive rates, and thus effectively ensure the quality of battery products. This method improves the depth alignment between RGB images and 3D point clouds through cross-modal local-global feature consistency alignment, achieving efficient fusion of multimodal information and thus improving the accuracy of defect detection. Combining anomaly data synthesis technology based on a controllable diffusion model and PointNetGAN enhances the model's generalization ability and effectively solves the problem of scarce defect samples in industrial environments. By introducing a multi-scale neighborhood aggregation mechanism, the model's ability to perceive defects of different sizes is improved, and the anomaly scoring calculation is optimized by combining a mutual scoring mechanism, further reducing false positives and false negatives and enhancing the accuracy and robustness of detection. By timely detecting potential surface defects in steel-cased batteries, especially dangerous defects that may cause temperature deviations, leakage, and explosions, this invention effectively prevents unqualified products from entering the market, thereby protecting people's lives and property.

[0115] In addition, if Figure 7 As shown, one embodiment of the present invention also discloses a surface defect detection device for steel-cased batteries, the device comprising:

[0116] The acquisition module 110 is used to acquire RGB images and 3D point cloud data of the surface of the steel-cased battery;

[0117] The detection module 120 is used to input RGB images and 3D point cloud data into the steel-shell battery surface defect detection model to obtain the steel-shell battery surface defect detection results. The steel-shell battery surface defect detection model includes SDAS network, PointNetGAN network, ViT network, Point MAE network, cross-modal local-global feature consistency alignment module, weighted feature fusion module, multi-scale neighborhood aggregation module and mutual scoring mechanism. The steel-shell battery surface defect detection results include anomaly segmentation results and anomaly classification results.

[0118] The steel-cased battery surface defect detection device of this invention is used to perform the steel-cased battery surface defect detection method in the above embodiments. Its specific processing procedure is the same as that of the steel-cased battery surface defect detection method in the above embodiments, and will not be described in detail here.

[0119] In addition, if Figure 8 As shown, one embodiment of the present invention also discloses an electronic device, including: at least one processor 210; at least one memory 220 for storing at least one program; when the at least one program is executed by the at least one processor 210, it implements the steel-cased battery surface defect detection method as described in any of the preceding embodiments.

[0120] In addition, one embodiment of the present invention discloses a computer-readable storage medium storing computer-executable instructions for performing the steel-cased battery surface defect detection method as described in any of the preceding embodiments.

[0121] The system architecture and application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0122] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0123] In hardware implementations, the division between functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0124] The terms “component,” “module,” “system,” etc., used in this specification are used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution. For example, a component can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, or a computer. As illustrated, applications running on computing devices and computing devices can both be components. One or more components may reside in a process or execution thread, and components may be located on a single computer or distributed among two or more computers. Furthermore, these components can be executed from various computer-readable media on which various data structures are stored. Components can communicate, for example, via local or remote processes based on signals having one or more data packets (e.g., data from two components interacting with another component between a local system, a distributed system, or a network, such as the Internet interacting with other systems via signals).

Claims

1. A method for detecting surface defects in steel-cased batteries, comprising: Acquire RGB images and 3D point cloud data of the steel-cased battery surface; The RGB image and the 3D point cloud data are input into the steel-shell battery surface defect detection model to obtain the steel-shell battery surface defect detection results. The steel-shell battery surface defect detection model includes an SDAS network, a PointNetGAN network, a ViT network, a Point MAE network, a cross-modal local-global feature consistency alignment module, a weighted feature fusion module, a multi-scale neighborhood aggregation module, and a mutual scoring mechanism. The steel-shell battery surface defect detection results include anomaly segmentation results and anomaly classification results.

2. The method according to claim 1, characterized in that, The step of inputting the RGB image and the 3D point cloud data into the steel-cased battery surface defect detection model to obtain the steel-cased battery surface defect detection results includes: The RGB image is input into the SDAS network to obtain a synthesized abnormal image; The 3D point cloud data is input into the PointNetGAN network to obtain 3D abnormal point cloud data; Local features are obtained by extracting features from the synthesized abnormal image using the ViT network. The Point MAE network is used to extract features from the 3D abnormal point cloud data to obtain global features. The local alignment loss of the local features and the global alignment loss of the global features are calculated by the cross-modal local-global feature consistency alignment module to obtain the aligned features; The weighted feature fusion module performs cross-modal information fusion on the aligned features to obtain cross-modal fused features; The multi-scale neighborhood aggregation module extracts multi-level features with spatial context information from the cross-modal fusion features to obtain anomaly perception features that fuse information at different scales. The anomaly perception features are scored using the mutual scoring mechanism, and the anomaly segmentation result and the anomaly classification result are output in parallel.

3. The method according to claim 2, characterized in that, The step of calculating the local alignment loss of the local features and the global alignment loss of the global features through the cross-modal local-global feature consistency alignment module to obtain the aligned features includes: Using bilinear interpolation, 3D point cloud features are converted into patch-level features of 2D images; K-Means clustering is performed on the patch-level features of the RGB image and point cloud to generate global features of the RGB image and global features of the point cloud, respectively. The cross-modal local-global feature consistency alignment module calculates the cross-modal global alignment loss based on the global features of the RGB image and the global features of the point cloud; The CLC algorithm is used to obtain the overall loss function by jointly optimizing the local alignment loss and the global alignment loss; Based on the overall loss function, the RGB image and 3D point cloud features are aligned for depth consistency to obtain the aligned features.

4. The method according to claim 2, characterized in that, The step of fusing cross-modal information on the aligned features through the weighted feature fusion module to obtain cross-modal fused features includes: The RGB image fusion weights are determined based on the contribution of RGB image features to defect detection. The weights of 3D point cloud data are determined based on the contribution of 3D point cloud features to defect detection. The weighted feature fusion module fuses RGB image features and 3D point cloud features according to the RGB image fusion weight and the 3D point cloud data weight to obtain cross-modal fusion features.

5. The method according to claim 2, characterized in that, The step of extracting multi-level features with spatial context information from the cross-modal fusion features through the multi-scale neighborhood aggregation module to obtain anomaly perception features that fuse information at different scales includes: The cross-modal fusion features are rearranged into a spatial structure using the multi-scale neighborhood aggregation module. Based on the aggregation of neighborhoods at different scales of the spatial structure, anomaly perception features that fuse information at different scales are obtained.

6. The method according to claim 2, characterized in that, The step of calculating anomaly scores for the anomaly perception features through the mutual scoring mechanism and outputting the anomaly segmentation result and the anomaly classification result in parallel includes: Based on the aforementioned anomaly perception features, the minimum distance of each patch token in the global feature space is calculated, and the minimum distance is used as the initial anomaly score. After calculating the optimized preliminary anomaly scores at all scales, further multi-scale fusion calculations are performed to obtain patch-level anomaly scores. The patch-level anomaly scores are upsampled to the original image size to generate the anomaly segmentation result; The image-level anomaly score is extracted using a maximum value strategy to obtain the anomaly classification result.

7. The method according to claim 1, characterized in that, Also includes: The RGB image and the 3D point cloud data are preprocessed to generate a defect mask image; Defects are identified based on the defect mask image, and key information about battery defects is obtained. The key information on battery defects is transmitted to the battery defect management platform in real time, so that the battery defect platform can display the detection results of surface defects of the steel-cased battery in conjunction with the visualization interface of the key information on battery defects. The detection results of surface defects of the steel-cased battery also include defect annotation, statistical reports and trend analysis.

8. A device for detecting surface defects in steel-cased batteries, characterized in that, The device includes: The acquisition module is used to acquire RGB images and 3D point cloud data of the steel-cased battery surface; The detection module is used to input the RGB image and the 3D point cloud data into the steel-shell battery surface defect detection model to obtain the steel-shell battery surface defect detection result. The steel-shell battery surface defect detection model includes an SDAS network, a PointNetGAN network, a ViT network, a Point MAE network, a cross-modal local-global feature consistency alignment module, a weighted feature fusion module, a multi-scale neighborhood aggregation module, and a mutual scoring mechanism. The steel-shell battery surface defect detection result includes anomaly segmentation result and anomaly classification result.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the steel-cased battery surface defect detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing computer-executable instructions for performing the steel-cased battery surface defect detection method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Defect detection method and device for inner cavity of valve body and electronic equipment

    CN121259461A

  • Zero-sample multi-mode industrial defect segmentation method based on test sample relation calculation

    CN121640051A