MLCC end electrode defect detection method

By constructing a detection model based on YOLOv8, the problem of low efficiency and inconsistent results in defect detection at the MLCC chip inlet end is solved, and high accuracy and high efficiency automated detection is achieved, which is suitable for fast and reliable defect detection in modern manufacturing processes.

CN119559138APending Publication Date: 2025-03-04FUJIAN TORCH ELECTRON TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411620266.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

Traditional artificial naked-eye identification detection methods have problems such as time-consuming and labor-intensive, susceptible to subjective factors, inconsistency in detection of defects at the outsourcing end of MLCC chips. Especially in the modern manufacturing process, the production scale and speed of MLCC are increasing continuously, and manual testing is difficult to meet the needs.

Method used

Using a detection model based on YOLOv8, an automated detection system for detecting defects of MLCC terminal electrodes is constructed through stacked multiple shallow fusion modules, multiple deep fusion modules and multi-scale pyramid modules. The model captures features through deformable convolutional layers and local attention mechanism layers, and the multi-scale pyramid module expands the receptive field and improves detection accuracy.

Benefits of technology

It realizes high accuracy and efficiency of MLCC terminal electrode defect detection, reduces manual intervention, improves the reliability and consistency of detection results, can adapt to object detection at different scales, and reduces the computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559138A_ABST
    Figure CN119559138A_ABST
Patent Text Reader

Abstract

The invention provides an MLCC end electrode defect detection method, and belongs to the technical field of target detection, and the method comprises the steps: obtaining an MLCC end electrode picture, and carrying out the preprocessing of the MLCC end electrode picture, so as to form a data set; constructing a detection model based on YOLOv8, wherein the detection model comprises a plurality of stacked shallow fusion modules, a plurality of deep fusion modules and a multi-scale pyramid module connected with the last deep fusion module; and inputting the data set into the detection model for training so as to adjust parameters of the detection model. Manual detection is replaced, and the detection accuracy and the detection efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target detection, and in particular relates to a method for detecting defects in MLCC terminal electrodes. Background Art

[0002] The structure of the lead-out terminal of the MLCC chip usually consists of a base (end) metallization layer, a metal barrier layer, and a solderable layer. Common structural types include Ag / Ni / Sn(Pb) or Cu / Ni / Sn(Pb) three-layer terminal electrode structure, and Ni / Cu / Ni / Sn(Pb) four-layer terminal electrode structure. In the three-layer terminal electrode structure, the silver or copper electrode slurry is first evenly applied to both ends of the capacitor through a slurry dipping process, and then sintered at high temperature to form a base metallization layer-terminal electrode. Next, a layer of nickel is plated on the terminal electrode through an electroplating process as a thermal barrier layer, and finally a layer of tin or tin-lead layer is plated on the nickel layer to ensure that the capacitor has good solderability.

[0003] In the process of manufacturing the MLCC chip leads, due to factors such as complex processes and material characteristics, some defects are inevitable, such as gaps, floating or looseness in the end metallization layer, discontinuity or interruption of the barrier layer, and missing or uneven solderability. In response to these possible defects, the national military standard GJB 4027A-2006 has made clear provisions for the quality standards of MLCC, requiring strict control of these defects during production and testing to ensure the reliability and performance of the final product.

[0004] With the widespread application of MLCC in various high-end electronic devices, the requirements for its quality and reliability are also increasing. However, the traditional manual naked eye recognition detection method is not only time-consuming and labor-intensive, but also easily affected by subjective factors, resulting in inconsistency and reliability problems in the detection results. Especially in modern manufacturing processes, the production scale and speed of MLCC are constantly increasing, and the efficiency and accuracy of manual detection can no longer meet the growing demand. In addition, as the size of MLCC continues to shrink, the defects of the lead terminals become smaller and more difficult to detect, further increasing the difficulty of manual detection. Therefore, there is an urgent need for a new method to solve the problem of lead terminal defect detection, thereby improving the reliability of the product. Summary of the invention

[0005] The purpose of the present invention is to propose a method for detecting defects in MLCC terminal electrodes to replace manual detection and improve detection accuracy and efficiency.

[0006] The present invention is achieved through the following technical solutions: A method for detecting defects in MLCC terminal electrodes comprises the following steps: Step S1, obtaining an MLCC terminal electrode image, and preprocessing the MLCC terminal electrode image to form a data set; Step S2, constructing a detection model based on YOLOv8, the detection model includes multiple stacked shallow fusion modules, multiple deep fusion modules and a multi-scale pyramid module connected to the last deep fusion module, the shallow fusion module includes a high-resolution bottleneck layer to capture low-level features, the deep fusion module includes a low-resolution bottleneck layer to capture high-level features, the high-resolution bottleneck layer includes a deformable convolution layer and a local attention mechanism layer connected in sequence, the low-resolution bottleneck layer includes a local attention mechanism layer and a deformable convolution layer connected in sequence, and the multi-scale pyramid module uses multiple convolutions with different sizes of convolution kernels to perform parallel operations; Step S3: input the data set into the detection model for training to adjust the detection model parameters. During the training process, a loss function is used to calculate the difference between the predicted results and the real data.

[0007] Furthermore, the step S1 specifically includes the following steps: Step S11, taking pictures of the MLCC terminal electrodes through a metallographic microscope, and dividing the MLCC terminal electrode pictures into a training set, a validation set, and a test set according to a set ratio; Step S12: For MLCC terminal electrode defects, use a frame label to mark their coordinate positions, use a classification label to mark the defect categories, and divide the labels into training sets, verification sets, and test sets corresponding to the MLCC terminal electrode images according to the proportions of the MLCC terminal electrode images. The data set includes training sets, verification sets, and test sets of MLCC terminal electrode images, and training sets, verification sets, and test sets of labels, wherein the labels include rectangular frame labels and classification labels.

[0008] Furthermore, the shallow fusion module includes a first input convolutional layer, a first slicing layer, a high-resolution bottleneck layer, a resolution bottleneck layer, a high-resolution bottleneck layer, a first splicing layer and a first output convolutional layer connected in sequence; the first input convolutional layer, the first slicing layer, two high-resolution bottleneck layers, the resolution bottleneck layer and the first splicing layer are jump-connected; the high-resolution bottleneck layer includes two first deformable convolutional layers and a first local attention mechanism layer connected in sequence; and the resolution bottleneck layer includes two first convolutional layers connected in sequence.

[0009] Furthermore, the deep fusion module includes a second input convolution layer, a second slicing layer, a low-resolution bottleneck layer, a resolution bottleneck layer, a low-resolution bottleneck layer, a second splicing layer and a second output convolution layer connected in sequence, the second input convolution layer, the second slicing layer, two low-resolution bottleneck layers, the resolution bottleneck layer and the second splicing layer are jump-connected, and the low-resolution bottleneck layer includes a second local attention mechanism layer and two second deformable convolution layers.

[0010] Furthermore, the multi-scale pyramid module uses three convolutional kernels of 7×7, 5×5 and 3×3 to perform parallel operations.

[0011] Furthermore, the detection model includes a backbone network and a detection head network, the backbone network includes two second convolutional layers, a first fusion module, a third convolutional layer, a second fusion module, a fourth convolutional layer, a third fusion module, a fifth convolutional layer, a fourth fusion module and a multi-scale pyramid module connected in sequence, and the detection head network includes a first upsampling layer connected to the output end of the multi-scale pyramid module, a third splicing layer connected to the output end of the first upsampling layer and the output end of the third fusion module, a fifth fusion module connected to the output end of the third splicing layer, a second upsampling layer connected to the output end of the fifth fusion module, a fourth splicing layer connected to the output end of the second upsampling layer and the output end of the second fusion module, and a sixth fusion module connected to the output end of the fourth splicing layer , the sixth convolutional layer, the fifth splicing layer connected to the output end of the fourth splicing layer and the output end of the sixth convolutional layer, the seventh fusion module connected to the output end of the fifth splicing layer, the seventh convolutional layer connected to the output end of the seventh fusion module, the sixth splicing layer connected to the output end of the seventh convolutional layer and the output end of the multi-scale feature pyramid, the eighth fusion module connected to the output end of the sixth splicing layer, the output end of the sixth fusion module is used as the first detection head, the output end of the seventh fusion module is used as the second detection head, the output end of the eighth fusion module is used as the third detection head, the first fusion module, the second fusion module, the fifth fusion module and the sixth fusion module are shallow fusion modules, and the third fusion module, the fourth fusion module, the seventh fusion module and the eighth fusion module are deep fusion modules.

[0012] Furthermore, in step S2, the first deformable convolution layer and the second deformable convolution layer are both based on the formula To achieve, Indicates the output p The value of the point, represents the convolution sampling position, p 0 indicates the initial sampling position, p n Indicates the reference position, Δ p represents the offset obtained by offset convolution, G ( p , q ) represents the bilinear interpolation coefficient, N ( p )express p The set of nearby integer positions, x ( q ) represents the input volume of the deformable convolutional layer. p The value of the point.

[0013] Furthermore, in step S3, the loss function includes a focal loss function for calculating the difference between the predicted classification label and the true classification label, and a mean square error function for calculating the difference in position and size between the predicted box and the true box.

[0014] The present invention has the following beneficial effects: 1. The detection model based on YOLOv8 constructed by the present invention includes multiple stacked shallow fusion modules, multiple deep fusion modules and a multi-scale pyramid module. The shallow fusion module includes a high-resolution bottleneck layer, which specifically includes a deformable convolution layer and a local attention mechanism layer connected in sequence. That is, in the high-resolution stage, the deformable convolution is first used to flexibly adjust the sampling position to capture richer local features, and then the local attention mechanism layer is used to enhance the attention to key details, so as to obtain more accurate feature expression in small target detection. The deep fusion module includes a low-resolution bottleneck layer, which includes a local attention mechanism layer and a variable The multi-scale pyramid module adopts multiple convolution operations with different sizes of convolution kernels in parallel, which effectively expands the receptive field, so that the detection model can capture features more accurately at different scales. While maintaining the effectiveness of the receptive field, it avoids information loss and improves the detection model's ability to retain details. While improving the expression ability of target detection, it reduces the computational complexity, bringing higher performance to defect detection in MLCC terminal electrodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The present invention is further described in detail below with reference to the accompanying drawings.

[0016] Figure 1 It is a flow chart of the present invention.

[0017] Figure 2 It is a structural schematic diagram of the detection model of the present invention.

[0018] Figure 3 It is a structural schematic diagram of the shallow fusion module of the present invention.

[0019] Figure 4 It is a schematic structural diagram of the high-resolution bottleneck layer of the present invention.

[0020] Figure 5 It is a structural schematic diagram of the resolution bottleneck layer of the present invention.

[0021] Figure 6 It is a structural schematic diagram of the deep fusion module of the present invention.

[0022] Figure 7 It is a schematic structural diagram of the low-resolution bottleneck layer of the present invention.

[0023] Figure 8 It is a schematic diagram of the structure of the first deformable convolution of the present invention.

[0024] Fig. 9 Schematic diagram of the structure of the multi-scale feature pyramid of the present invention.

[0025] Fig.10 It is the detection result of the present invention. DETAILED DESCRIPTION

[0026] like Figure 1 As shown, the MLCC terminal electrode defect detection method includes the following steps: Step S1, obtaining an MLCC terminal electrode image, and preprocessing the MLCC terminal electrode image to form a data set; Specifically, the steps include: Step S11, taking pictures of the MLCC terminal electrodes through a metallographic microscope, and dividing the MLCC terminal electrode pictures into a training set, a validation set, and a test set according to a set ratio; Step S12: For MLCC terminal electrode defects, use a frame label to mark their coordinate positions, use a classification label to mark the defect categories, and divide the labels into training sets, verification sets, and test sets corresponding to the MLCC terminal electrode images according to the proportions of the MLCC terminal electrode images. The data set includes training sets, verification sets, and test sets of MLCC terminal electrode images, and training sets, verification sets, and test sets of labels, wherein the labels include rectangular frame labels and classification labels.

[0027] The set division ratio is 7:2:1.

[0028] Step S2, constructing a detection model based on YOLOv8, the detection model includes multiple stacked shallow fusion modules, multiple deep fusion modules and a multi-scale pyramid module connected to the last deep fusion module, the shallow fusion module includes a high-resolution bottleneck layer to capture low-level features, the deep fusion module includes a low-resolution bottleneck layer to capture high-level features, the high-resolution bottleneck layer includes a deformable convolution layer and a local attention mechanism layer connected in sequence, the low-resolution bottleneck layer includes a local attention mechanism layer and a deformable convolution layer connected in sequence, and the multi-scale pyramid module uses multiple convolutions with different sizes of convolution kernels to perform parallel operations; Specifically, Figure 2As shown, the detection model includes a backbone network and a detection head network, the backbone network includes two second convolutional layers, a first fusion module, a third convolutional layer, a second fusion module, a fourth convolutional layer, a third fusion module, a fifth convolutional layer, a fourth fusion module and a multi-scale pyramid module connected in sequence, and the detection head network includes a first upsampling layer connected to the output end of the multi-scale pyramid module, a third splicing layer connected to the output end of the first upsampling layer and the output end of the third fusion module, a fifth fusion module connected to the output end of the third splicing layer, a second upsampling layer connected to the output end of the fifth fusion module, a fourth splicing layer connected to the output end of the second upsampling layer and the output end of the second fusion module, a sixth fusion module connected to the output end of the fourth splicing layer, and a Six convolutional layers, a fifth splicing layer connected to the output end of the fourth splicing layer and the output end of the sixth convolutional layer, a seventh fusion module connected to the output end of the fifth splicing layer, a seventh convolutional layer connected to the output end of the seventh fusion module, a sixth splicing layer connected to the output end of the seventh convolutional layer and the output end of the multi-scale feature pyramid, an eighth fusion module connected to the output end of the sixth splicing layer, the output end of the sixth fusion module is used as the first detection head, the output end of the seventh fusion module is used as the second detection head, the output end of the eighth fusion module is used as the third detection head, the first fusion module, the second fusion module, the fifth fusion module and the sixth fusion module are shallow fusion modules, and the third fusion module, the fourth fusion module, the seventh fusion module and the eighth fusion module are deep fusion modules.

[0029] like Figure 3 As shown, the shallow fusion module includes a first input convolutional layer, a first slicing layer, a high-resolution bottleneck layer, a resolution bottleneck layer, a high-resolution bottleneck layer, a first splicing layer and a first output convolutional layer connected in sequence. The first input convolutional layer, the first slicing layer, two high-resolution bottleneck layers, the resolution bottleneck layer and the first splicing layer are jump-connected, as shown in FIG. Figure 4 As shown in , the high-resolution bottleneck layer includes two first deformable convolutional layers and a first local attention mechanism layer connected in sequence, as shown in Figure 5 As shown, the resolution bottleneck layer includes two first convolutional layers connected in sequence.

[0030] like Figure 6 As shown, the deep fusion module includes a second input convolutional layer, a second slicing layer, a low-resolution bottleneck layer, a resolution bottleneck layer, a low-resolution bottleneck layer, a second splicing layer, and a second output convolutional layer connected in sequence. The second input convolutional layer, the second slicing layer, two low-resolution bottleneck layers, the resolution bottleneck layer, and the second splicing layer are jump-connected, as shown in FIG. Figure 7 As shown, the low-resolution bottleneck layer includes a second local attention mechanism layer and two second deformable convolutional layers.

[0031] In the shallow layer (i.e., the network depth is shallow), the image data resolution is high, so the shallow fusion module is used to process the image data, that is, first enter the first deformable convolution layer and then enter the first local attention mechanism layer. In the deep layer (i.e., the network depth is deep), the image data resolution is low, so the deep fusion module is used to process the image data, that is, first enter the second local attention mechanism layer and then enter the second deformable convolution layer. The first and second deformable convolution layers have the same structure. The structure of the first deformable convolution layer is as follows: Figure 8 As shown, the first and second local attention mechanisms have the same structure.

[0032] The first deformable convolution layer and the second deformable convolution layer are based on the formula To achieve, Indicates the output of the first deformable convolution layer or the second deformable convolution layer in p The value of the point, represents the convolution sampling position, p 0 indicates the initial sampling position, p n Indicates the reference position, Δ p represents the offset obtained by offset convolution, G ( p , q ) represents the bilinear interpolation coefficient, N ( p )express p The set of nearby integer positions, x ( q ) represents the input amount of the deformable convolutional layer in p The value of the point, where Δ p The acquisition process is prior art.

[0033] The implementation methods of the first local attention mechanism and the second local attention mechanism are as follows: The local attention mechanism calculates the attention weights in the feature map and performs a weighted summation on the feature map: , in, Q , K , V Represents query, key and value vectors respectively. x attention is the weighted feature map, so the final output is the feature map processed by the local attention mechanism x attention .

[0034] like Fig. 9As shown in the figure, the multi-scale pyramid module uses three convolution kernels of 7×7, 5×5 and 3×3 to perform parallel operations to enhance the perception of targets of different feature sizes. The formula is as follows: , These convolution kernels have different receptive fields, which can capture different scales of input feature maps and retain rich spatial details. The 7×7 convolution is responsible for capturing larger context information and obtaining a wider spatial receptive field. The 5×5 convolution captures medium-scale spatial features and balances local and global feature representations. The 3×3 convolution mainly captures local details and enhances information capture of small defects.

[0035] Step S3: input the data set into the detection model for training to adjust the detection model parameters, and use the loss function to calculate the difference between the prediction result and the real data during the training process; The gradient of the loss function to the parameters of each layer in the model is calculated through the back-propagation algorithm. This step is to calculate the gradient through the chain rule so that each parameter knows to what extent it affects the loss. Use the optimization algorithm SGD to update the model's weights and biases using the calculated gradients. This process adjusts the model parameters to gradually optimize them in a direction that can better predict the location and category of defects. The loss function includes a focal loss function for calculating the difference between the predicted classification label and the true classification label, and a mean square error function for calculating the position and size difference between the predicted box and the true box. The focal loss function is expressed as ,in, C represents the number of defect categories, γ represents the adjustment factor, y c is the true classification label, Represents the predicted classification label.

[0036] like Fig.10 The test results of the present invention are marked with blue boundary boxes, indicating the location of the barrier interruption defect at the end of the MLCC. The corresponding defect category name is marked above each test box, and the confidence score of the model for the prediction result is displayed, which intuitively reflects the reliability of the test.

[0037] The above description is only a preferred embodiment of the present invention, and therefore cannot be used to limit the scope of implementation of the present invention. That is, equivalent changes and modifications made according to the scope of the patent application of the present invention and the contents of the specification should still fall within the scope covered by the patent of the present invention.

Claims

1. A method for detecting defects in MLCC terminal electrodes, characterized in that: The steps include: Step S1, obtaining an MLCC terminal electrode image, and preprocessing the MLCC terminal electrode image to form a data set; Step S2, constructing a detection model based on YOLOv8, the detection model includes multiple stacked shallow fusion modules, multiple deep fusion modules and a multi-scale pyramid module connected to the last deep fusion module, the shallow fusion module includes a high-resolution bottleneck layer to capture low-level features, the deep fusion module includes a low-resolution bottleneck layer to capture high-level features, the high-resolution bottleneck layer includes a deformable convolution layer and a local attention mechanism layer connected in sequence, the low-resolution bottleneck layer includes a local attention mechanism layer and a deformable convolution layer connected in sequence, and the multi-scale pyramid module uses multiple convolutions with different sizes of convolution kernels to perform parallel operations; Step S3: input the data set into the detection model for training to adjust the detection model parameters. During the training process, a loss function is used to calculate the difference between the predicted results and the real data.

2. The MLCC terminal electrode defect detection method according to claim 1, characterized in that: The step S1 specifically includes the following steps: Step S11, taking pictures of the MLCC terminal electrodes through a metallographic microscope, and dividing the MLCC terminal electrode pictures into a training set, a validation set, and a test set according to a set ratio; Step S12: For MLCC terminal electrode defects, use a frame label to mark their coordinate positions, use a classification label to mark the defect categories, and divide the labels into training sets, verification sets, and test sets corresponding to the MLCC terminal electrode images according to the proportions of the MLCC terminal electrode images. The data set includes training sets, verification sets, and test sets of MLCC terminal electrode images, and training sets, verification sets, and test sets of labels, wherein the labels include rectangular frame labels and classification labels.

3. The MLCC terminal electrode defect detection method according to claim 1, characterized in that: In step S2: the shallow fusion module includes a first input convolutional layer, a first slicing layer, a high-resolution bottleneck layer, a resolution bottleneck layer, a high-resolution bottleneck layer, a first splicing layer and a first output convolutional layer connected in sequence; the first input convolutional layer, the first slicing layer, two high-resolution bottleneck layers, the resolution bottleneck layer and the first splicing layer are jump-connected; the high-resolution bottleneck layer includes two first deformable convolutional layers and a first local attention mechanism layer connected in sequence; and the resolution bottleneck layer includes two first convolutional layers connected in sequence.

4. A method for detecting MLCC terminal electrode defects according to claim 2, characterized in that: In step S2: the deep fusion module includes a second input convolution layer, a second slicing layer, a low-resolution bottleneck layer, a resolution bottleneck layer, a low-resolution bottleneck layer, a second splicing layer and a second output convolution layer connected in sequence, the second input convolution layer, the second slicing layer, two low-resolution bottleneck layers, the resolution bottleneck layer and the second splicing layer are jump-connected, and the low-resolution bottleneck layer includes a second local attention mechanism layer and two second deformable convolution layers.

5. A method for detecting MLCC terminal electrode defects according to claim 1, 2, 3 or 4, characterized in that: The multi-scale pyramid module uses three convolutional kernels of 7×7, 5×5 and 3×3 to perform parallel operations.

6. A method for detecting MLCC terminal electrode defects according to claim 1, 2, 3 or 4, characterized in that: The detection model includes a backbone network and a detection head network, the backbone network includes two second convolutional layers, a first fusion module, a third convolutional layer, a second fusion module, a fourth convolutional layer, a third fusion module, a fifth convolutional layer, a fourth fusion module and a multi-scale pyramid module connected in sequence, the detection head network includes a first upsampling layer connected to the output end of the multi-scale pyramid module, a third splicing layer connected to the output end of the first upsampling layer and the output end of the third fusion module, a fifth fusion module connected to the output end of the third splicing layer, a second upsampling layer connected to the output end of the fifth fusion module, a fourth splicing layer connected to the output end of the second upsampling layer and the output end of the second fusion module, a sixth fusion module connected to the output end of the fourth splicing layer, and a sixth fusion module connected to the output end of the sixth splicing layer. A convolution layer, a fifth splicing layer connected to the output end of the fourth splicing layer and the output end of the sixth convolution layer, a seventh fusion module connected to the output end of the fifth splicing layer, a seventh convolution layer connected to the output end of the seventh fusion module, a sixth splicing layer connected to the output end of the seventh convolution layer and the output end of the multi-scale feature pyramid, an eighth fusion module connected to the output end of the sixth splicing layer, the output end of the sixth fusion module is used as the first detection head, the output end of the seventh fusion module is used as the second detection head, the output end of the eighth fusion module is used as the third detection head, the first fusion module, the second fusion module, the fifth fusion module and the sixth fusion module are shallow fusion modules, and the third fusion module, the fourth fusion module, the seventh fusion module and the eighth fusion module are deep fusion modules.

7. A method for detecting MLCC terminal electrode defects according to claim 1, 2, 3 or 4, characterized in that: In step S2, the first deformable convolutional layer and the second deformable convolutional layer are both based on the formula To achieve, Indicates the output p The value of the point, represents the convolution sampling position, p 0 indicates the initial sampling position, p n Indicates the reference position, Δ p represents the offset obtained by offset convolution, G ( p , q ) represents the bilinear interpolation coefficient, N ( p )express p The set of nearby integer positions, x ( q ) represents the input volume of the deformable convolutional layer. p The value of the point.

8. A method for detecting MLCC terminal electrode defects according to claim 2, 3 or 4, characterized in that: In step S3, the loss function includes a focal loss function for calculating the difference between the predicted classification label and the true classification label, and a mean square error function for calculating the difference in position and size between the predicted box and the true box.