A battery defect detection method, device, storage medium and electronic device

Through the improved feature extraction and target detection network, combined with three-dimensional reconstruction technology, the problem of difficulty in detecting battery bulging, deformation, leakage, and rust defects with existing technology is solved, and high-accuracy defect detection and evaluation is achieved.

CN115587987BActive Publication Date: 2024-10-11CHINA THREE GORGES CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211279122.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-19
Publication Date
2024-10-11
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

It is difficult to accurately detect defects such as bulging, deformation, leakage, and corrosion of batteries at the same time with the existing technology.

Method used

The multi-scale path aggregation structure is used to improve the feature extraction network, and the adaptive feature pooling structure is combined to construct a target detection network and a three-dimensional reconstruction network to generate a battery defect detection model. The image data set is processed through the target detection network and the three-dimensional reconstruction network to achieve leakage, Detect rust defects and calculate the degree of bulging and deformation based on depth information.

Benefits of technology

It improves the accuracy of image target detection, achieves accurate detection of leakage and rust defects, and simultaneously performs three-dimensional reconstruction and two-dimensional image defect target detection to comprehensively evaluate battery defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115587987B_ABST
    Figure CN115587987B_ABST
Patent Text Reader

Abstract

The present invention discloses a battery defect detection method, device, storage medium and electronic device, which obtain a first feature extraction network and at least one battery image data set for training; improve the first feature extraction network using a multi-scale path aggregation structure to obtain a second feature extraction network; construct a target detection network using an adaptive feature pooling structure; determine the target detection network and a preset three-dimensional reconstruction network based on the second feature extraction network; process the battery image data set through a preset three-dimensional reconstruction network to generate a battery defect detection model; use the battery defect detection model to detect the battery image data set to be detected to obtain a battery defect detection result. Using the target detection network and the preset three-dimensional reconstruction network, defect target detection of three-dimensional reconstruction and two-dimensional images is simultaneously realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine vision defect detection, and in particular to a battery defect detection method, device, storage medium and electronic equipment. Background Art

[0002] As the main power equipment in the power system such as generation, transmission and distribution, the battery group in the distribution room is the main inspection object of power equipment operation and maintenance. The manual inspection task is heavy and the inspection error is large. With the development of intelligent equipment and computer vision technology, the intelligent inspection system has become the main inspection method in booster stations and other power stations. In the inspection of the distribution room battery, the defects mainly include battery bulging, deformation, leakage, loose connection plate corrosion and other conditions. The bulging and deformation of the battery are mainly caused by long-term charging and discharging, which leads to deformation of the battery grid and expansion of active materials. The bulging and deformation of the battery visually belongs to the defect type in three-dimensional space, while leakage and connection plate corrosion visually belong to the two-dimensional image defect detection type. However, the existing battery defect detection method is difficult to accurately detect the bulging, deformation, leakage, corrosion and other defects of the equipment at the same time. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides a battery defect detection method, device, storage medium and electronic device to solve the technical problem that the battery defect detection method in the prior art is difficult to accurately detect defects such as bulging, deformation, leakage, and rust of the equipment at the same time.

[0004] The technical solution proposed by the present invention is as follows:

[0005] In a first aspect, an embodiment of the present invention provides a battery defect detection method, which includes: obtaining a first feature extraction network and at least one battery image data set for training; improving the first feature extraction network using a multi-scale path aggregation structure to obtain a second feature extraction network; constructing a target detection network using an adaptive feature pooling structure; determining the target detection network and a preset three-dimensional reconstruction network based on the second feature extraction network; processing the battery image data set through the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model; and using the battery defect detection model to detect the battery image data set to be detected to obtain a battery defect detection result.

[0006] In combination with the first aspect, in a possible implementation of the first aspect, the battery image dataset is processed through the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model, including: processing the battery image dataset through the preset three-dimensional reconstruction network to obtain a first depth map; determining a scale value of the first depth map; obtaining a second depth map corresponding to the scale value; constructing a loss function based on the first depth map and the second depth map; and using the loss function to train the battery image dataset to generate the battery defect detection model.

[0007] In combination with the first aspect, in another possible implementation of the first aspect, the battery image data set includes a battery reference depth image, at least one battery source image and the posture information of the camera corresponding to the battery; the battery image data set is processed by the preset three-dimensional reconstruction network to obtain a first depth map, including: based on the battery reference depth image and the at least one battery source image, through the second feature extraction network, obtaining the feature information of at least one of the battery source images; based on the feature information and the posture information of at least one of the battery source images, through homography transformation and regular network processing, obtaining the first depth map.

[0008] In combination with the first aspect, in another possible implementation of the first aspect, after the battery image data set is processed by the target detection network and the preset three-dimensional reconstruction network to obtain a first depth map, the method also includes: based on multi-scale photometric consistency, processing the first depth map to obtain a three-dimensional point cloud map, and the three-dimensional point cloud map reflects the depth information of each point on the battery surface.

[0009] In combination with the first aspect, in another possible implementation of the first aspect, the detection network is used to perform leakage defect detection and corrosion defect detection on the battery.

[0010] In combination with the first aspect, in another possible implementation of the first aspect, the battery defect detection model is used to detect the battery image data set to be detected to obtain a battery defect detection result, including: inputting the battery image data set to be detected into the battery defect detection model to obtain a leakage defect detection result and a rust defect detection result of the battery to be detected.

[0011] In combination with the first aspect, in another possible implementation of the first aspect, the battery defect detection model is used to detect the battery image data set to be detected to obtain a battery defect detection result, which also includes: inputting the battery image data set to be detected into the battery defect detection model to obtain depth information of each point on the surface of the battery to be detected; calculating the surface unevenness and the area of ​​the uneven region of the battery to be detected based on the depth information; and determining the degree of bulging and deformation of the battery to be detected based on the surface unevenness and the area of ​​the uneven region.

[0012] In a second aspect, an embodiment of the present invention provides a battery defect detection device, which includes: a first acquisition module, used to acquire a first feature extraction network and at least one battery image data set for training; an improvement module, used to improve the first feature extraction network using a multi-scale path aggregation structure to obtain a second feature extraction network; a construction module, used to construct a target detection network using an adaptive feature pooling structure; a determination module, used to determine the target detection network and a preset three-dimensional reconstruction network based on the second feature extraction network; a generation module, used to process the battery image data set through the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model; a detection module, used to detect the battery image data set to be detected using the battery defect detection model to obtain a battery defect detection result.

[0013] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the battery defect detection method as described in the first aspect and any one of the first aspects of the embodiment of the present invention.

[0014] In a fourth aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to execute the battery defect detection method as described in the first aspect and any one of the first aspects of the embodiment of the present invention.

[0015] The technical solution provided by the present invention has the following effects:

[0016] The battery defect detection method provided by the embodiment of the present invention adds a multi-scale path aggregation structure to the feature extraction network, thereby improving the accuracy of positioning in image target detection; and adds an adaptive feature pooling structure to the target detection network, thereby realizing the detection of leakage and rust defects of the battery. Therefore, the battery defect detection model obtained by training the target detection network and the feature extraction network simultaneously realizes the defect target detection of three-dimensional reconstruction and two-dimensional images. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 is a flow chart of a battery defect detection method provided according to an embodiment of the present invention;

[0019] Figure 2 is a structural diagram of a region proposal network RPN provided according to an embodiment of the present invention;

[0020] Figure 3 It is a structural diagram based on an improved CasMVSNet network provided according to an embodiment of the present invention;

[0021] Figure 4 is a structural block diagram of a battery defect detection device provided according to an embodiment of the present invention;

[0022] Figure 5 is a schematic diagram of the structure of a computer-readable storage medium provided according to an embodiment of the present invention;

[0023] Figure 6 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0025] Before describing the technical solutions of the embodiments of the present application, the application scenarios of the embodiments of the present application are first described.

[0026] The technical solution of this application is applied to the field of battery inspection technology in distribution rooms. As the main power equipment in power systems such as generation, transmission, and distribution, the battery group in the distribution room is the main inspection object for the operation, maintenance, and inspection of power equipment. The intelligent inspection system is the main inspection method in booster stations and other power stations. In the existing distribution room battery inspection, the different defects of the batteries to be detected are caused by different reasons, and the existing detection technology cannot achieve comprehensive and accurate detection of the batteries at the same time.

[0027] The embodiment of the present invention provides a battery defect detection method, such as Figure 1 As shown, the method comprises the following steps:

[0028] Step 101: Obtain a first feature extraction network and at least one battery image data set for training.

[0029] Among them, the first feature extraction network can realize feature extraction of images in the battery image data set; in the present invention, the first feature extraction network is the internal structure of the three-dimensional reconstruction network (CasMVSNet network).

[0030] The battery image dataset is used for model training. Multiple cameras installed at different field of view angles can be used to collect images of batteries, and the images can fully include the appearance of the batteries.

[0031] Furthermore, in order to improve the accuracy of battery 3D reconstruction and target detection, the image acquisition process makes the image data as rich as possible by setting different lighting, different angles, different brightness and other conditions.

[0032] Step 102: improving the first feature extraction network using a multi-scale path aggregation structure to obtain a second feature extraction network.

[0033] Among them, the second feature extraction network consists of three parts: feature pyramid (FPN), multi-scale semantic aggregation structure and multi-scale path aggregation structure (PAN).

[0034] Specifically, the feature pyramid can be regarded as a coding and decoding structure. Through the feature pyramid, three feature maps of different scales can be obtained. The top-level feature map contains high-level semantic features but lacks the details of the bottom layer. Although the high-level feature map contains feature details, it lacks sufficient semantic information. Therefore, extracting features from multiple scales can accurately describe image features. According to the upsampling and downsampling structure of the feature pyramid, the output feature map has three scales. The feature output size of the top layer is W / 4×H / 4×32, where W and H are the original image scales; the scale of the middle layer is W / 2×H / 2×16; the scale of the bottom layer is W×H×8.

[0035] The multi-scale path aggregation structure (PAN) uses accurate low-level positioning signals to enhance the entire feature hierarchy through bottom-up path enhancement, thereby shortening the information path between low-level and top-level features and improving the positioning accuracy in image target detection.

[0036] Step 103: Construct a target detection network using an adaptive feature pooling structure.

[0037] Among them, the target detection network is mainly composed of the region proposal network (RPN, such as Figure 2 As shown in the figure), adaptive feature pooling (AFP) and fully connected layer fusion, it can realize the leakage and corrosion defect detection of batteries.

[0038] Specifically, the RPN network receives the single-scale feature map output by the PAN network, then undergoes a 3*3 convolution, and generates 9 anchors at each point on the feature map (boxes of several sizes and aspect ratios are created based on a center point: 3 sizes, each size corresponds to 3 aspect ratios), and then performs 1*1 convolution in parallel on two branches, which are used to classify the anchors and regress to generate candidate boxes (proposals). The adaptive pooling network first compresses the ROI extracted by the RPN into a one-dimensional feature vector, and then fuses different feature maps (FeatureMap) by taking the max or sum method, and finally predicts the image bounding box and category (class) based on the fusion.

[0039] Step 104: Determine the target detection network and the preset 3D reconstruction network based on the second feature extraction network.

[0040] Among them, the preset 3D reconstruction network is the improved CasMVSNet network, such as Figure 3 shown.

[0041] Specifically, an object detection network is added to the second feature extraction network to form an improved three-dimensional reconstruction network.

[0042] Furthermore, since the second feature extraction network includes a multi-scale path aggregation structure and the detection network includes an adaptive feature pooling structure, two-dimensional image defect target detection and three-dimensional reconstruction can be simultaneously achieved by using the target detection network and the preset three-dimensional reconstruction network.

[0043] Step 105: Processing the battery image data set through the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model.

[0044] Specifically, a battery defect detection model can be generated by processing and training a battery image dataset using a target detection network and a preset three-dimensional reconstruction network.

[0045] Step 106: Use the battery defect detection model to detect the battery image data set to be detected to obtain a battery defect detection result.

[0046] Specifically, the image data set of the battery to be detected is input into the trained battery defect detection model to obtain the corresponding battery defect detection result.

[0047] The battery defect detection method provided by the embodiment of the present invention adds a multi-scale path aggregation structure to the feature extraction network, thereby improving the accuracy of positioning in image target detection; and adds an adaptive feature pooling structure to the target detection network, thereby realizing the detection of leakage and rust defects of the battery. Therefore, the battery defect detection model obtained by training the target detection network and the feature extraction network simultaneously realizes the defect target detection of three-dimensional reconstruction and two-dimensional images.

[0048] As an optional implementation manner of an embodiment of the present invention, step 105 includes: processing the battery image data set through the preset three-dimensional reconstruction network to obtain a first depth map; determining a scale value of the first depth map; obtaining a second depth map corresponding to the scale value; constructing a loss function based on the first depth map and the second depth map; and using the loss function to train the battery image data set to generate the battery defect detection model.

[0049] Specifically, the improved CasMVSNet network predicts depth maps and target detection maps at three scales. The depth map of each scale (i.e., the first depth map) uses the real depth map of the corresponding scale (i.e., the second depth map) to calculate the loss. The target detection calculates the loss through the predicted box and the real box. The total loss function is defined as shown in equation (1):

[0050]

[0051] Where: x valid Represents the valid pixel set in the depth map; D k ′(x) represents the predicted depth of pixel x in the kth stage; D k ″(x) represents the true depth of pixel x in the kth stage; λ k represents the loss weight; represents the bounding box regression loss; p i Indicates the probability that the i-th anchor is predicted to be the true label; When it is a positive sample, it is 1, and when it is a negative sample, it is 0; t iRepresents the bounding box regression parameter coordinates of the predicted i-th anchor; N represents the parameter coordinates of the real annotation box corresponding to the i-th anchor; cls Represents the number of samples in a mini-batch dataset; N reg Indicates the number of anchor positions.

[0052] Furthermore, by using the loss function shown in equation (1) to perform multi-scale training on the battery image dataset, a corresponding battery defect detection model can be generated.

[0053] Among them, the multi-scale training process is as follows:

[0054] (1) Producing feature maps of three different scales based on the first feature extraction network and the second feature extraction network;

[0055] (2) The scale-1 feature map is passed through a 3D reconstruction network to generate a first-scale depth map;

[0056] (3) The scale 2 feature map is combined with the first scale depth map through a 3D reconstruction network to generate a second depth map;

[0057] (4) The scale 3 feature map is combined with the second depth map to generate a third scale depth map through a 3D reconstruction network;

[0058] (5) The first-scale depth map and the second-scale depth map are upsampled to the same scale as the third-scale depth map, and then the three images are filtered and fused to generate the final depth map; (the final depth map has the same scale as the third-scale depth map)

[0059] As an optional implementation manner of an embodiment of the present invention, the battery image data set includes a battery reference depth image, at least one battery source image and the posture information of the camera corresponding to the battery; the battery image data set is processed by the preset three-dimensional reconstruction network to obtain a first depth map, including: based on the battery reference depth image and the at least one battery source image, through the second feature extraction network, obtaining the feature information of at least one of the battery source images; based on the feature information of at least one of the battery source images and the posture information, through homography transformation and regular network processing, obtaining the first depth map.

[0060] The camera corresponding to the battery is the device used to capture the image of the battery in step 101;

[0061] Specifically, after the feature extraction network, the features of a reference image and N-1 source images can be obtained. Then, according to the homography transformation, each source image is projected onto each layer of depth to form a feature volume. Then, the regular network 3D CNN is used to generate a rough depth map and estimate the depth range of the scene, which includes the following two parts:

[0062] (1) Feature matching and cost aggregation. First, according to the homography transformation, each source image is projected onto each layer of depth to form a feature volume, and then the interpolation method is used to make each projection the same size. In theory, each reference image will have N-1 corresponding feature volumes, and these feature volumes are used to construct a cost volume based on the variance. When constructing the remaining cost volume, the homography transformation of the residual volume needs to be used, as shown in equation (2):

[0063]

[0064] Where: They correspond to the camera's intrinsic parameters, rotation matrix, and translation matrix respectively; I1 represents the reference image; represents the source image; n represents the principal axis of the reference camera, that is, the plane normal vector; d represents the depth.

[0065] Since the cost volume generated in the first stage is sparse with a scale of W / 4×H / 4×32×48, the regular network 3D CNN is used to generate a rough depth map and estimate the depth range of the scene. The depth map obtained in the first stage is used as a reference to estimate the depth map in the second stage (the first stage and the second stage refer to the first and second stages of depth map prediction, respectively). The middle-level feature map is used to sample the depth plane within the remaining depth range to form the residual cost volume, whose scale is W / 2×H / 2×16×32. The 3D CNN residual depth map is used to finally generate the second-stage depth map. The final depth map is based on the depth map estimated in the second stage. The remaining cost volume is constructed in the same way, and its scale is W×H×8×8 to generate the final depth map. The variance-based cost index calculation formula is shown in equation (3):

[0066]

[0067] Where: represents the feature volume; C represents the cost volume; N represents the number of images;

[0068] Among them, W represents the width of the input image; H represents the height of the input image; D represents the number of samples of the input image; and F represents the number of channels of the input image.

[0069] (2) Depth map regression. In order to filter the noise in the aggregated cost volume, a three-dimensional convolutional neural network is used to regularize the aggregated cost volume. Specifically, in order to learn more contextual information along the depth direction, a multi-scale 3D UNet network is used for cost volume regularization in an embodiment of the present invention. The 3D UNet network has multiple encoders and decoders, and the encoders and decoders are jump-connected. In order to reduce the computational cost of the network, after the first 3D convolutional layer, the 32-channel cost volume is reduced to 8 channels, and the convolution of each scale is reduced from 3 layers to 2 layers. The output of the final convolutional layer is a 1-channel volume. Finally, a softmax operation (used to process the initial output results in the classification task) is used in the depth direction to normalize the probability value. The resulting probability volume is well suited for depth value prediction. It can not only be used for pixel-by-pixel depth prediction, but also can be used to measure the confidence of the estimate.

[0070] Furthermore, the depth map is recovered from the probability volume by calculating the expectation in the depth direction. A differentiable soft argmin (disparity prediction) operation is used at the end of the 3D convolutional neural network. The depth of each virtual plane is multiplied by the corresponding probability value to obtain the depth value of pixel x. The depth of pixel x is defined as shown in equation (4):

[0071]

[0072] Where: represents the depth of pixel x in the mth depth plane; represents the probability that pixel x is in the mth depth plane.

[0073] As an optional implementation manner of an embodiment of the present invention, after the battery image data set is processed by the target detection network and the preset three-dimensional reconstruction network to obtain a first depth map, the method further includes: processing the first depth map based on multi-scale photometric consistency to obtain a three-dimensional point cloud map.

[0074] The three-dimensional point cloud image reflects the depth information of each point on the battery surface.

[0075] Specifically, although the multi-cost volume aggregation module filters the occluded pixels in the cost volume, there are still outliers in the depth map due to the existence of low texture areas and exposed areas. In order to generate a more complete point cloud, the outliers in the depth map need to be filtered out before converting it to a point cloud. The probabilities of the four closest to the true depth along the depth direction are added together to generate a confidence map Q to measure the reliability of the depth estimation.

[0076] Furthermore, the steps of filtering outliers in the depth map based on multi-scale photometric consistency are as follows: the confidence maps Q1 and Q2 of the first and second stages are upsampled to the size of the confidence map Q3 of the third stage. If the confidence of pixel x on all confidence maps is higher than the corresponding threshold t, the pixel x is considered reliable, otherwise it is considered an outlier and filtered out.

[0077] The filter pixel depth is expressed by the following relation (5):

[0078]

[0079] Where: t 1 , t 2 , t 3 are the thresholds of confidence maps Q1, Q2, and Q3, respectively, which are set to 0.7, 0.3, and 0.3 in the experiments.

[0080] As an optional implementation of the embodiment of the present invention, step 106 includes: inputting the battery image data set to be detected into the battery defect detection model to obtain a leakage defect detection result and a corrosion defect detection result of the battery to be detected.

[0081] Specifically, since the detection network can directly detect leakage and corrosion defects of batteries, after the battery image data set to be detected is input into the trained battery defect detection model, the leakage defect detection results and corrosion defect detection results of the battery to be detected can be directly obtained.

[0082] Furthermore, battery defects also include battery bulging and deformation defects, which are detected using the battery defect detection model.

[0083] Therefore, as an optional implementation of an embodiment of the present invention, step 106 also includes: inputting the battery image data set to be inspected into the battery defect detection model to obtain depth information of each point on the surface of the battery to be inspected; calculating the surface unevenness and the area of ​​the uneven region of the battery to be inspected based on the depth information; and determining the degree of bulging and deformation of the battery to be inspected based on the surface unevenness and the area of ​​the uneven region.

[0084] Specifically, the surface roughness of the battery can be calculated using the following equation (6):

[0085]

[0086] Where: δ represents the degree of concavity and convexity of the battery surface; L represents the distance between the measured point cloud data of the battery outer surface and the geometric center point of the standard three-dimensional model of the battery; S represents the distance between the point cloud data of the standard battery outer surface and the geometric center point of the three-dimensional model.

[0087] Furthermore, the surface concave-convex area of ​​the battery to be tested is calculated as follows:

[0088] (1) A standard battery three-dimensional model is selected, wherein each plane of the standard battery three-dimensional model is a three-dimensional model of the battery without deformation.

[0089] (2) Set the concave-convex surface threshold. The points whose concave-convex values ​​are greater than the threshold are the points in the deformation area.

[0090] (3) Calculate the area of ​​the minimum rectangle circumscribing the region composed of the point cloud of the deformed region, and the obtained area is approximately the area of ​​the deformed region.

[0091] The bulging degree and deformation degree of the battery to be tested can be determined by calculating the surface convexity and concave-convex area.

[0092] The embodiment of the present invention also provides a battery defect detection device, such as Figure 4 As shown, the device comprises:

[0093] The first acquisition module 401 is used to acquire a first feature extraction network and at least one battery image data set for training; for details, please refer to the relevant description of step 101 in the above method embodiment.

[0094] The improvement module 402 is used to improve the first feature extraction network by using a multi-scale path aggregation structure to obtain a second feature extraction network; for details, please refer to the relevant description of step 102 in the above method embodiment.

[0095] The construction module 403 is used to construct a target detection network using an adaptive feature pooling structure; for details, see the relevant description of step 103 in the above method embodiment.

[0096] The determination module 404 is used to determine the target detection network and the preset 3D reconstruction network based on the second feature extraction network; for details, please refer to the relevant description of step 104 in the above method embodiment.

[0097] The generation module 405 is used to process the battery image data set through the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model; for details, please refer to the relevant description of step 105 in the above method embodiment.

[0098] The detection module 406 is used to detect the battery image data set to be detected using the battery defect detection model to obtain a battery defect detection result. For details, please refer to the relevant description of step 106 in the above method embodiment.

[0099] The battery defect detection device provided by the embodiment of the present invention adds a multi-scale path aggregation structure to the feature extraction network, thereby improving the accuracy of positioning in image target detection; and adds an adaptive feature pooling structure to the target detection network, thereby realizing the detection of leakage and corrosion defects of the battery. Therefore, the battery defect detection model obtained by training the target detection network and the feature extraction network simultaneously realizes the detection of defective targets in three-dimensional reconstruction and two-dimensional images.

[0100] As an optional implementation manner of an embodiment of the present invention, the generation module includes: a first processing submodule, used to process the battery image data set through the preset three-dimensional reconstruction network to obtain a first depth map; a first determination submodule, used to determine the scale value of the first depth map; an acquisition submodule, used to obtain a second depth map corresponding to the scale value; a construction submodule, used to construct a loss function based on the first depth map and the second depth map; a training submodule, used to train the battery image data set using the loss function to generate the battery defect detection model.

[0101] As an optional implementation manner of an embodiment of the present invention, the battery image data set includes a battery reference depth image, at least one battery source image and the posture information of the camera corresponding to the battery; the first processing submodule includes: an extraction submodule, which is used to obtain the feature information of at least one of the battery source images based on the battery reference depth image and the at least one battery source image through the second feature extraction network; and a second processing submodule, which is used to obtain the first depth map based on the feature information of at least one of the battery source images and the posture information through homography transformation and regular network processing.

[0102] As an optional implementation of an embodiment of the present invention, the generation module also includes: a third processing sub-module, which is used to process the first depth map based on multi-scale photometric consistency to obtain a three-dimensional point cloud map, and the three-dimensional point cloud map reflects the depth information of each point on the battery surface.

[0103] As an optional implementation of the embodiment of the present invention, the detection network in the construction module is used to perform leakage defect detection and corrosion defect detection on the battery.

[0104] As an optional implementation of the embodiment of the present invention, the detection module includes: a first input submodule, used to input the battery image data set to be detected into the battery defect detection model to obtain leakage defect detection results and corrosion defect detection results of the battery to be detected.

[0105] As an optional implementation manner of the embodiment of the present invention, the detection module also includes: a second input submodule, used to input the battery image data set to be detected into the battery defect detection model to obtain the depth information of each point on the surface of the battery to be detected; a calculation submodule, used to calculate the surface convexity and the area of ​​the concave-convex region of the battery to be detected based on the depth information; a second determination submodule, used to determine the degree of bulging and deformation of the battery to be detected based on the surface convexity and the area of ​​the concave-convex region.

[0106] For a detailed description of the functions of the battery defect detection device provided in the embodiment of the present invention, please refer to the description of the battery defect detection method in the above embodiment.

[0107] The embodiment of the present invention also provides a storage medium, such as Figure 5 As shown, a computer program 501 is stored thereon, and when the instruction is executed by the processor, the steps of the battery defect detection method in the above embodiment are implemented. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above types of memory.

[0108] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0109] The embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, the electronic device may include a processor 61 and a memory 62, wherein the processor 61 and the memory 62 may be connected via a bus or other means. Figure 6 The example of connecting through bus is taken in the following.

[0110] The processor 61 may be a central processing unit (CPU). The processor 61 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0111] The memory 62 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as the corresponding program instructions / modules in the embodiment of the present invention. The processor 61 executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory 62, that is, the battery defect detection method in the above method embodiment is implemented.

[0112] The memory 62 may include a program storage area and a data storage area, wherein the program storage area may store an application required for operating the device and at least one function; the data storage area may store data created by the processor 61, etc. In addition, the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 62 may optionally include a memory remotely arranged relative to the processor 61, and these remote memories may be connected to the processor 61 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0113] The one or more modules are stored in the memory 62, and when executed by the processor 61, the following is performed: Figure 1-3 The battery defect detection method in the illustrated embodiment.

[0114] For details of the above electronic equipment, please refer to Figures 1 to 3 The corresponding related descriptions and effects in the illustrated embodiments can be understood and will not be repeated here.

[0115] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A battery defect detection method, characterized in that: The method comprises: Obtaining a first feature extraction network and at least one battery image data set for training; The first feature extraction network is improved by using a multi-scale path aggregation structure to obtain a second feature extraction network; Build an object detection network using an adaptive feature pooling structure; Determine the target detection network and the preset 3D reconstruction network based on the second feature extraction network; Processing the battery image data set through the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model; Using the battery defect detection model to detect the battery image data set to be detected, to obtain a battery defect detection result; The battery image data set is processed by the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model, including: Processing the battery image data set through the preset three-dimensional reconstruction network to obtain a first depth map, the battery image data set including a battery reference depth image, at least one battery source image, and position information of a camera corresponding to the battery; determining a scale value of the first depth map; Obtaining a second depth map corresponding to the scale value; constructing a loss function based on the first depth map and the second depth map; Using the loss function to train the battery image data set to generate the battery defect detection model; The battery image data set is processed by the preset three-dimensional reconstruction network to obtain a first depth map, including: Based on the battery reference depth image and the at least one battery source image, obtaining feature information of at least one battery source image through the second feature extraction network; Based on the feature information of at least one of the battery source images and the pose information, the first depth map is obtained through homography transformation and regular network processing.

2. The method according to claim 1, characterized in that: After the battery image data set is processed by the target detection network and the preset three-dimensional reconstruction network to obtain a first depth map, the method further includes: Based on multi-scale photometric consistency, the first depth map is processed to obtain a three-dimensional point cloud map, and the three-dimensional point cloud map reflects the depth information of each point on the battery surface.

3. The method according to claim 2, characterized in that The detection network is used to perform leakage defect detection and corrosion defect detection on the battery.

4. The method according to claim 3, characterized in that The battery defect detection model is used to detect the battery image data set to be detected to obtain a battery defect detection result, including: The battery image data set to be detected is input into the battery defect detection model to obtain leakage defect detection results and corrosion defect detection results of the battery to be detected.

5. The method according to claim 4, characterized in that Using the battery defect detection model to detect the battery image data set to be detected to obtain a battery defect detection result, further comprising: Inputting the battery image data set to be detected into the battery defect detection model to obtain the depth information of each point on the surface of the battery to be detected; Calculate the surface concavity and convexity of the battery to be tested and the area of ​​the concave-convex region based on the depth information; The bulging degree and deformation degree of the battery to be inspected are determined based on the surface roughness and the area of ​​the roughness region.

6. A battery defect detection device, characterized in that: The device comprises: A first acquisition module, used to acquire a first feature extraction network and at least one battery image data set for training; An improvement module, used to improve the first feature extraction network by using a multi-scale path aggregation structure to obtain a second feature extraction network; A building module for building a target detection network using an adaptive feature pooling structure; A determination module, used to determine the target detection network and the preset 3D reconstruction network based on the second feature extraction network; A generation module, used for processing the battery image data set through the target detection network and the preset three-dimensional reconstruction network to generate a battery defect detection model; A detection module, used to detect the battery image data set to be detected using the battery defect detection model to obtain a battery defect detection result; Wherein, the generating module comprises: A first processing submodule, configured to process the battery image data set through the preset three-dimensional reconstruction network to obtain a first depth map, wherein the battery image data set includes a battery reference depth image, at least one battery source image, and position information of a camera corresponding to the battery; A first determination submodule, configured to determine a scale value of the first depth map; An acquisition submodule, used to acquire a second depth map corresponding to the scale value; A construction submodule, configured to construct a loss function based on the first depth map and the second depth map; A training submodule, used for training the battery image data set using the loss function to generate the battery defect detection model; Wherein, the first processing submodule includes: an extraction submodule, configured to obtain feature information of at least one of the battery source images through the second feature extraction network based on the battery reference depth image and the at least one battery source image; The second processing submodule is used to obtain the first depth map based on the feature information of at least one of the battery source images and the posture information through homography transformation and regular network processing.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the battery defect detection method according to any one of claims 1 to 5.

8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the battery defect detection method according to any one of claims 1 to 5 by executing the computer instructions.