Welding defect detection method

Through the improved UNet network and 2D imaging technology, the problem of insufficient pinhole defect detection in existing welding defect detection is solved, accurate identification and high-precision detection of 0.02mm pinhole defects are achieved, and production efficiency is improved.

CN118781084APending Publication Date: 2024-10-15HEFEI GUOXUAN HIGH TECH POWER ENERGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410925601.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-11
Publication Date
2024-10-15

AI Technical Summary

Technical Problem

Existing welding defect detection technology is difficult to effectively detect pinhole defects below 0.2mm, which affects battery performance.

Method used

2D imaging is used to crop the sealing nail weld bead image, the UNet network is improved, the vgg network is used for feature extraction, and the skip connection and feature fusion network are combined to build a pinhole defect recognition model and improve the pinhole defect detection capability.

Benefits of technology

It achieves accurate identification of 0.02mm pinhole defects, improves detection accuracy and speed, has real-time production capabilities, and can detect smaller-sized pinhole defects while ensuring production rhythm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118781084A_ABST
    Figure CN118781084A_ABST
Patent Text Reader

Abstract

The invention discloses a welding defect detection method which comprises the following steps: acquiring a battery sealing nail image by adopting a 2D imaging mode, and cutting to obtain a sealing nail welding bead image; a UNet network is improved, a feature extraction network of the UNet network is changed into a feature extraction network of a vgg network, a defect recognition model is constructed and obtained, the defect recognition model is adopted to recognize an input sealing nail weld bead image, and whether pinhole defects exist or not is judged; the defect identification model comprises a feature extraction network, jump connection, a feature fusion network and a prediction network. According to the invention, under the condition that the production takt is ensured, the pinhole defect of less than 0.2 mm in the welding process of the battery sealing nail can be effectively detected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of machine vision, and in particular relates to a welding defect detection method. Background Art

[0002] In the production process of new energy batteries, the liquid injection port is sealed by welding with sealing pins. However, due to welding process problems, the welding quality may have defects such as pinholes, explosion points, steps, cracks, cold welding, and welding explosions. The production process requires the detection and removal of these defective batteries, and the batteries need to be put into production again after manual repair. Although machine vision detection technology has been introduced into the production line, the current detection capability of the pinhole defect size is still insufficient. Usually, the pinhole size is detected to be above 0.2mm. Pinhole defects below 0.2mm will be missed and still cause leakage, affecting the performance of the battery. Therefore, a welding defect detection method is proposed.

[0003] The invention with the publication number CN117745679A discloses a small-diameter pipe welding defect detection method based on strip shape perception and feature adjustment. The defect detection model adopted by the method mainly includes three parts: a CSPDarknet-HVR backbone network based on hybrid visual adjustment, a feature pyramid network based on strip shape perception, and three detection heads; the backbone network extracts global feature information and local key feature information, branches and fuses to adjust small target features, and obtains the location information of features, thereby improving the detection ability of defects with smaller areas. The feature image pyramid module based on strip shape perception mainly includes a dynamic strip convolution module, which improves the perception ability of the feature pyramid for pathological aspect ratio defects by dynamically learning the X-axis and Y-axis shape perception convolution modules, thereby improving the detection accuracy of strip defects; the regression loss of the detection head uses Focal-EIoU loss to further improve the detection accuracy. However, the invention is more applied to the detection of strip defects, and the detection effect of pinhole defects below 0.2mm in the welding process of sealing nails is not good. Summary of the invention

[0004] Technical problem solved: The present invention proposes a welding defect detection method for battery sealing pin welding, while optimizing the image cropping and image recognition processes, enhancing the network's ability to extract pinhole defect features, and effectively solving the problem of sealing pin pinhole defect detection micropores (below 0.2 mm). At the same time, it also improves the image recognition speed and has real-time production performance.

[0005] Technical solution:

[0006] s

[0007] Furthermore, a 2D imaging method is used to collect the battery sealing nail image, and the sealing nail weld image is cropped.

[0008] Furthermore, the process of cutting out the sealing pin weld bead image includes the following steps:

[0009] A rectangular frame is drawn to segment the welding image containing the sealing pin welding part separately, and the edge of the welding image is extracted to obtain the contour information in the welding image. The weld contour is obtained by screening the contour area and contour roundness, and a circle is fitted to the screened weld contour. A rectangular frame is drawn with the center coordinates of the fitted circle as the center, and the drawn rectangular frame is used as the circumscribed rectangle of the sealing pin welding to segment the sealing pin welding area. For the segmented sealing pin welding area, a ring area is again drawn with the center coordinates of the fitted circle as the center to crop out the sealing pin weld image.

[0010] Furthermore, the UNet network is improved by changing the feature extraction network of the UNet network to the feature extraction network of the VGG network, and a defect recognition model is constructed. The defect recognition model is used to recognize the input sealing nail weld image to determine whether there is a pinhole defect.

[0011] The defect recognition model includes a feature extraction network, a jump connection, a feature fusion network and a prediction network; the feature extraction network uses 6 feature layers connected in sequence to extract features of the input sealing nail weld image in sequence, and extracts 6 feature images of different sizes; the feature fusion network performs convolution and upsampling processing on the output image of the last feature layer and the fused image output by each layer of jump connection; the jump connection fuses the output image after the last convolution activation calculation in each feature layer in the feature extraction network with the image after upsampling calculation in the feature fusion network; the prediction network is a convolution layer, and the background and pinhole defect category recognition is performed on the final fusion result output by the feature fusion network.

[0012] Further, the feature extraction network includes a first feature layer, a second feature layer, a third feature layer, a fourth feature layer, a fifth feature layer and a sixth feature layer;

[0013] The first feature layer and the second feature layer each include two convolutional layers, an activation layer and a maximum pooling layer connected in sequence; the third feature layer, the fourth feature layer and the fifth feature layer each include three convolutional layers, an activation layer and a maximum pooling layer connected in sequence; the sixth feature layer includes three convolutional layers and an activation layer connected in sequence.

[0014] Furthermore, the feature fusion network sequentially performs two convolutions, one activation and one upsampling operations on each fused image, and outputs a final fusion result.

[0015] Furthermore, the convolution layers in the defect recognition model all use 3×3 convolution, the activation function uses the relu function, the maximum pooling layer uses a 2×2 window, and the upsampling layer uses a 2×2 window.

[0016] Beneficial effects:

[0017] The welding defect detection method of the present invention uses an improved UNet network to increase the number of convolution calculations while deepening the structure of the overall effective feature layer, further enhancing the network's ability to extract pinhole defect features, and can accurately identify pinhole defects, and has the ability to prevent interference from defects such as welding smoke / weld spots; at the same time, 2D imaging is used for detection, and the recognition accuracy is higher (tested in the production process, 0.02mm pinholes can be effectively identified); only the cropped sealing nail weld bead images are identified, effectively improving the speed of image recognition. In short, while ensuring the production rhythm, the detection method of the present invention can detect pinhole defects with smaller sizes and better effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a schematic diagram of a welding defect detection method according to an embodiment of the present invention;

[0019] Figure 2 This is a flow chart of cutting the sealing pin weld in an embodiment of the present invention;

[0020] Figure 3 : is a network structure diagram of pinhole defect recognition in a sealing nail weld in an embodiment of the present invention;

[0021] Figure 4 This is a cutting effect diagram of the sealing pin weld in an embodiment of the present invention;

[0022] Figure 5 This is a diagram showing the effect of identifying pinhole defects in the sealing pin weld in an embodiment of the present invention. DETAILED DESCRIPTION

[0023] The following examples will enable those skilled in the art to more fully understand the present invention, but are not intended to limit the present invention in any way.

[0024] like Figure 1 As shown, this embodiment is a welding defect detection method, which only uses 2D imaging, and the single pixel accuracy of the image is ≤5um. The detection algorithm includes two parts: cropping and recognition.

[0025] like Figure 2As shown, the cropping part includes region segmentation, edge extraction, feature screening, feature fitting, and sealing nail region segmentation. The original image size is 4096×3000. The region segmentation is to draw a rectangular frame to separate the area containing the sealing nail welding, and then perform edge extraction to obtain the weld bead contour and other contours after the sealing nail welding. The contour is screened by contour area (threshold is 48000-300000) and contour roundness (threshold is 0.17-1). The screened contour is fitted with a circle. If there is only one fitted circle (if there are many fitted circles, take one of them), directly draw a rectangular frame with the center coordinates of the fitted circle as the center. The rectangular frame is the circumscribed rectangle of the sealing nail welding, and then segment it out. The segmentation size is 1024×1024. The segmented area is again drawn with the center coordinates of the fitted circle as the center to cut out the sealing nail weld.

[0026] like Figure 3As shown, the recognition part uses an improved UNet segmentation algorithm. The UNet segmentation algorithm includes four parts: feature extraction network, skip connection, feature fusion network and prediction network. The present invention first scales the cropped image size 1024×1024 to 512×512 as the input size of the network. Since it is a color image, the initial number of channels is 3. Then the feature extraction network of the UNet network is changed to a feature extraction network of a vgg-like network, including two convolutions and activations (image size is 512×512×64) and one maximum pooling (image size is 256×256×64), two convolutions and activations (image size is 256×256×128) and one maximum pooling (image size is 128×128×128), three convolutions and activations (image size is 128×128×256) and one maximum pooling (image size is 64×64×256), three convolutions and activations. The image size is 64×64×512), one maximum pooling (image size is 32×32×512), three convolutions and activation (image size is 32×32×1024), one maximum pooling (image size is 16×16×1024), three convolutions and activation (image size is 16×16×1024), etc. The whole process uses 3×3 convolution, and a total of 6 effective feature layers are constructed. The size of the input image is 512×512×3. After calculation by the feature extraction network, the size of the image is 16×16×1024. The feature fusion network includes upsampling the image after three convolution activations by 2 times, changing the image size to 32×32×1024, and then performing the first fusion (image size is 32×32×2048) and two convolutions and activations (image size is 32×32×1024) and upsampling (image size is 64×64×1024), the second fusion (image size is 64×64×1536) and two convolutions and activations (image size is 64×64×512) and upsampling (image size is 128×128×512), the third fusion (image size is 128×128×768) and two convolutions and activations (image size is 128×128×256) and upsampling (image size is 25 6×256×256), the fourth fusion (image size is 256×256×384) and two convolutions and activation (image size is 256×256×128) and upsampling (image size is 512×512×128), the fifth fusion (image size is 512×512×192) and two convolutions. The output image size is 512×512×64. The jump connection is to fuse the output image after the last convolution activation calculation in each layer of the feature extraction network with the image after upsampling calculation in the feature fusion network. The prediction network is a 1×1 convolution to judge the background and pinhole defect categories. The number of background and pinhole identification types is 2, so the final output size is 512×512×2.The entire process of improving UNet uses 3×3 convolution, and activation function processing is performed after each convolution calculation (. Figure 3 The activation function is not shown in the network structure), the activation function is relu, the pooling uses a 2×2 window, and the upsampling uses a 2×2 window.

[0027] like Figure 4 As shown, what is described is the effect diagram of the sealing nail weld being cropped by the traditional image processing algorithm.

[0028] like Figure 5 As shown, what is described is the recognition effect diagram of the pinhole defect of the sealing nail weld after the improved UNet network, and the color of the pixel at the recognized pinhole is dark red.

[0029] In summary, the welding defect detection method of the above embodiment uses an improved UNet network to increase the number of convolution calculations while deepening the number of effective feature layers, further enhancing the network's ability to extract pinhole defect features, and can accurately identify pinhole defects, and has the ability to prevent interference from defects such as welding smoke / weld spots; at the same time, only 2D imaging is used for detection, and the recognition accuracy is higher (0.02mm pinholes can be recognized); at the same time, the original image is cropped by an image processing algorithm to increase the speed of image recognition; in short, while ensuring the production rhythm, the detection method can detect pinhole defects with smaller sizes and better effects.

[0030] The above are only preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.

Claims

1. A welding defect detection method, characterized in that: The defect detection method comprises the following steps: Collect battery sealing nail images; A defect recognition model is constructed to identify the sealing pin weld image and determine whether there is a pinhole defect.

2. The welding defect detection method according to claim 1, characterized in that: The battery sealing nail image is collected by 2D imaging, and the sealing nail weld image is cropped.

3. The welding defect detection method according to claim 2, characterized in that: The process of cropping the sealing pin weld image includes the following steps: A rectangular frame is drawn to segment the welding image containing the sealing pin welding part separately, and the edge of the welding image is extracted to obtain the contour information in the welding image. The weld contour is obtained by screening the contour area and contour roundness, and a circle is fitted to the screened weld contour. A rectangular frame is drawn with the center coordinates of the fitted circle as the center, and the drawn rectangular frame is used as the circumscribed rectangle of the sealing pin welding to segment the sealing pin welding area. For the segmented sealing pin welding area, a ring area is again drawn with the center coordinates of the fitted circle as the center to crop out the sealing pin weld image.

4. The welding defect detection method according to claim 1, characterized in that: The UNet network is improved by changing the feature extraction network of the UNet network to the feature extraction network of the VGG network, and a defect recognition model is constructed. The defect recognition model is used to recognize the input sealing pin weld image to determine whether there is a pinhole defect. The defect recognition model includes a feature extraction network, a jump connection, a feature fusion network and a prediction network; the feature extraction network uses 6 feature layers connected in sequence to extract features of the input sealing nail weld image in sequence, and extracts 6 feature images of different sizes; the feature fusion network performs convolution and upsampling processing on the output image of the last feature layer and the fused image output by each layer of jump connection; the jump connection fuses the output image after the last convolution activation calculation in each feature layer in the feature extraction network with the image after upsampling calculation in the feature fusion network; the prediction network is a convolution layer, and the background and pinhole defect category recognition is performed on the final fusion result output by the feature fusion network.

5. The welding defect detection method according to claim 4, characterized in that: The feature extraction network includes a first feature layer, a second feature layer, a third feature layer, a fourth feature layer, a fifth feature layer and a sixth feature layer; The first feature layer and the second feature layer each include two convolutional layers, an activation layer and a maximum pooling layer connected in sequence; the third feature layer, the fourth feature layer and the fifth feature layer each include three convolutional layers, an activation layer and a maximum pooling layer connected in sequence; the sixth feature layer includes three convolutional layers and an activation layer connected in sequence.

6. The welding defect detection method according to claim 4, characterized in that: The feature fusion network performs two convolutions, one activation, and one upsampling operations on each fused image in sequence, and outputs the final fusion result.

7. The welding defect detection method according to claim 4, characterized in that: The convolution layers in the defect recognition model all use 3×3 convolution, the activation function uses the relu function, the maximum pooling layer uses a 2×2 window, and the upsampling layer uses a 2×2 window.