A deep learning defect detection method and system for MLCCs

By constructing an ADS-YOLO model and designing an SSIL loss function, combined with an image detection system using a ring light source and a laser sensor, the contradiction between detection accuracy and speed in MLCC defect detection was resolved, achieving efficient and real-time defect detection.

CN119444692BActive Publication Date: 2025-11-04GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411490417.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-11-04
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

Existing deep learning-based MLCC defect detection methods suffer from a trade-off between detection accuracy and speed, failing to meet real-time detection requirements. Furthermore, lightweight models exhibit low accuracy in detecting complex defects, poor model generalization performance, and difficulties in collecting defect datasets.

Method used

An ADS-YOLO model was constructed, and the Backbone module was designed using the CSP-DSrknet53 architecture. An A2PAN structure and a bilateral residual structure were introduced, and the SSIL loss function was designed. An image defect detection system was constructed by combining a ring light source, a rotating platform, and a laser sensor. Image datasets were collected and screened for training and testing.

Benefits of technology

It improves the accuracy and speed of MLCC defect detection, simplifies the network structure, reduces the number of model parameters, and improves model inference efficiency and positioning accuracy, making it suitable for real-time industrial inspection scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444692B_ABST
    Figure CN119444692B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer vision image processing, more particularly, it relates to a kind of MLCC-oriented deep learning defect detection method and system, and its technical scheme main points are as follows: S1, construct image defect detection system, for collecting, screening image, generates defect data set;S2, build ADS-YOLO model, the defect data set is input to the ADS-YOLO model training, evaluation and save optimal weight;S3, utilize the ADS-YOLO model that has saved optimal weight, carries out target detection to test sample, outputs detection result.The present application designs MLCC-oriented deep learning defect detection network ADS-YOLO, has the advantages of improving the detection precision, detection speed of target detection algorithm and simplifying network structure.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of computer vision image processing, more particularly, it relates to a deep learning defect detection method and system for MLCC. BACKGROUND

[0002] As one of the common components in electronic circuits, multilayer ceramic capacitors (MLCCs) are responsible for energy storage and filtering and are widely used in various electronic devices. Due to the complexity of the process and the characteristics of the material, the surface of the product may have different defects in the later stage, which may directly affect the performance and reliability of the capacitor. Therefore, it is very important to realize accurate and efficient automatic detection of MLCC surface defects in the production process of multilayer ceramic capacitors, which is a crucial link to ensure the production quality.

[0003] In recent years, deep learning has gradually become a research hotspot due to its powerful feature learning and pattern recognition capabilities. Many scholars have conducted in-depth research on computer vision detection based on deep learning, especially in the application of target detection. These methods effectively reduce the subjectivity and human error related to traditional methods and improve detection efficiency. However, there are still certain limitations in target detection methods based on deep learning, which cannot meet the detection needs of MLCCs:

[0004] (1) The model structure with relatively high detection accuracy is too complex and requires high hardware requirements, and the real-time detection speed is not satisfied, which is not suitable for high-speed real-time detection in industrial quality control scenarios;

[0005] (2) Although the lightweight model with high portability meets the requirements in terms of detection speed, the detection accuracy for complex defects is low, and the model generalization performance is poor;

[0006] (3) The defect detection method based on the generation network needs to rely on a large number of high-quality data sets to ensure the stability of the model, so it is not suitable for industrial detection scenarios where defect samples are difficult to collect. SUMMARY

[0007] In view of the deficiencies in the prior art, the purpose of the present application is to provide a deep learning defect detection method and system for MLCC to solve the above problems.

[0008] The above technical purpose of the present application is realized by the following technical scheme, a deep learning defect detection method for MLCC, comprising the following steps:

[0009] S1, an image defect detection system is constructed to collect and screen images and generate a defect data set;

[0010] S2, construct an ADS-YOLO model, input the defect data set into the ADS-YOLO model for training, evaluate and save the optimal weight;

[0011] S3, using the ADS-YOLO model with the optimal weight saved, performing target detection on the test sample, and outputting the detection result.

[0012] In one of the embodiments, the S1 further comprises the following steps:

[0013] S11, fixing a clamp, setting a camera and a ring light source on the clamp, the camera being connected with a lens, a rotating platform being installed below the lens, a laser sensor being placed on one side of the rotating platform and being electrically connected with the camera, and being recorded as an image acquisition unit;

[0014] S12, installing a computer, a rotating platform controller and a light source controller, the computer being electrically connected with the camera, the rotating platform controller being electrically connected with the rotating platform, and the light source controller being electrically connected with the ring light source, and being recorded as a control imaging unit.

[0015] In one of the embodiments, the S2 further comprises the following steps:

[0016] S21, designing a Backbone module using a CSP-Dsrknet53 architecture to extract deep features;

[0017] S22, designing a Neck module using an A2PAN structure, introducing a self-attention mechanism and deep convolution for bidirectional multi-level fusion;

[0018] S23, introducing a bilateral residual structure to optimize a Head module;

[0019] S24, designing a loss function SSIL to optimize the ADS-YOLO model.

[0020] In one of the embodiments, the S21 further comprises the following steps: inputting an image into the Backbone module, sequentially performing layer-by-layer down-sampling by a CBS module composed of convolution, batch normalization and silu activation function, and performing feature fusion and arrangement by a C2f module after sampling.

[0021] In one of the embodiments, the S22 comprises the following steps:

[0022] S221, bottom-up fusion: introducing a CSP-SA module with a self-attention mechanism to optimize deep feature expression;

[0023] S222, top-down fusion: using deep convolution for down-sampling to reduce overfitting of the ADS-YOLO model.

[0024] In one embodiment, S221 is specifically:

[0025] Input X, first through the convolution module to obtain the feature map T, and then through the segmentation operation to segment into T' and Y0, Y0 is obtained through the recursive operation of i times Bottleneck module and output Y i , T' is spliced through the Concat operation and Y i , and then through the convolution module to obtain the output result Y of the CSP-SA module, represented as:

[0026] Y i =Bottleneck(Y i-1 )

[0027] Y=CBS 1×1 (Concat(T',Y0,Y1,...,Y n ))

[0028] Wherein, i=1,2,...,n.

[0029] In one embodiment, the running steps of the Bottleneck module are:

[0030] The multi-head self-attention module is connected by the convolution module;

[0031] In the multi-head self-attention module, 1x1 convolution is used to map to h groups of Q, K and V matrices, and h is the number of heads;

[0032] The dot product of Q and K is used to obtain the content attention score;

[0033] The relative position encoding is added, and the dot product with Q is used to obtain the position attention score;

[0034] The content attention score and the position attention score are added to obtain the total attention weight, represented as:

[0035]

[0036] Wherein, R w and R h are hyperparameters to be learned, representing the relative position relationship of the feature map in the height and width dimension positions respectively;

[0037] The total attention weight is obtained through the softmax operation to obtain the complete attention weight, and multiplied by V to obtain the output x out , represented as:

[0038] x out =Vsoftmax(score)

[0039] The output of the Bottleneck module is represented as:

[0040] Y i = MHSA(Conv 1×1 (Y i-1 ))).

[0041] In one embodiment, the S23 includes the following steps:

[0042] The input feature map X is sequentially operated by a 1x1 convolution module and a 3x3 convolution module in parallel to generate regression feature map F r (X) and classification feature map F c (X), respectively.

[0043] In the regression path, the feature map F r (X) passes through a residual module R r and a 1x1 independent convolution to obtain the regression output B, represented as:

[0044] B = Conv 1×1 (R r (F r (X))+F r (X))

[0045] The classification output C of the other branch is represented as:

[0046] C = Conv 1×1 (R r (F c (X))+F c (X))

[0047] The regression output B is converted into a bounding box by a regression function, and the classification output C is activated by a softmax function, and then spliced to obtain a detection result.

[0048] In one embodiment, the S24 includes the following steps:

[0049] The loss function SSIL includes a loss function SIOU and a loss function sDFL.

[0050] The loss function SIOU is used to optimize the measurement of the intersection over union of the real label box and the predicted target box, represented as:

[0051]

[0052] where IoU denotes the intersection over union of the real label box and the predicted target box, ρ denotes the distance between the center points of the two, c is the diagonal length of the minimum rectangle enclosing the predicted box and the target box, λ is a balance parameter for adjusting the penalty term v of the shape of the target box, Cost Distance and Cost shape measure the difference in position and shape of the predicted box and the target box, respectively, and are expressed as:

[0053] Cost Distance = 2-exp(γρ x )-exp(γρ y )

[0054] Cost shape = (1-exp(-ω w )) 4 + (1-exp(-ω h )) 4

[0055] where ρ x and ρ y denote the distance ratio of the predicted box and the target box in the horizontal direction and the vertical direction, respectively, and ω w and ω h denote the difference in width and height ratio;

[0056] The loss function sDFL is used to adjust the weight of the left and right boundaries to achieve a smoother loss distribution, and is expressed as:

[0057]

[0058] where CE(p, t) denotes the cross-entropy loss between the predicted distribution p and the target value t, ω l and ω r denote the target position weights on the left and right, respectively, which are adjusted by a scaling factor α, and are expressed as:

[0059] ω l = α·(r+1-t), ω r = (1-α)·(1-ω l )

[0060] where r is the left adjacent number of the target value t;

[0061] Finally, the loss function SILL is expressed as:

[0062] Loss SSIL = Loss SIOU + Loss sDFL .

[0063] A deep learning defect detection system for MLCCs, comprising a ring-shaped light source, a rotating platform, a laser sensor, a camera, a clamp, a rotating platform controller, a light source controller, a computer and a lens;

[0064] The camera is arranged on the clamp and electrically connected to the computer.

[0065] The lens is connected to the camera.

[0066] The rotating platform is arranged below the lens and electrically connected to the rotating platform controller.

[0067] The ring-shaped light source is arranged on the clamp and electrically connected to the light source controller.

[0068] The laser sensor is arranged corresponding to the rotating platform and electrically connected to the camera.

[0069] The above-mentioned deep learning defect detection method and system for MLCCs have the following beneficial effects:

[0070] Firstly, the ADS-YOLO detection network for MLCCs is designed, which has the advantages of improving the detection accuracy and speed of the target detection algorithm and simplifying the network structure.

[0071] Secondly, the A2PAN structure is designed to improve the attention of the model to complex defects and the relative position of the defects while simplifying the lightweight network structure, the residual detection head is designed to effectively reduce the model parameter amount without losing the model performance, improve the model inference efficiency, and the SSIL loss function is designed to improve the positioning accuracy of the model, so that the model can converge to the optimal solution more quickly.

[0072] Thirdly, the image defect detection system is designed, a large number of MLCC images are collected for training and testing, and the efficiency, scientificity and richness of the experimental data of the data collection are guaranteed. BRIEF DESCRIPTION OF DRAWINGS

[0073] Figure 1 is a step schematic diagram of the detection method in the embodiment;

[0074] Figure 2 is a structural schematic diagram of the detection system in the embodiment;

[0075] Figure 3 is a sample schematic diagram of the capacitor defect type in the embodiment;

[0076] Figure 4 is a structural schematic diagram of the ADS-YOLO network model in the embodiment;

[0077] Figure 5is a structural schematic diagram of CSP-SA in the embodiment;

[0078] Figure 6 is a structural schematic diagram of DRH in the embodiment;

[0079] Figure 7 is an effect comparison diagram of different target detection networks in the embodiment;

[0080] Figure 8 is a data comparison diagram of detection effects of different types of defects by different models in the embodiment.

[0081] In the figure: 1, clamp; 2, camera; 3, ring light source; 4, rotating platform; 5, laser sensor; 6, computer; 7, rotating platform controller; 8, light source controller; 9, lens. DETAILED DESCRIPTION

[0082] The application will be described in detail below with reference to the drawings and embodiments.

[0083] The hardware configuration of the experiment performed by the application includes an AMD Ryzen 7 5800X 8-core processor, an Nvidia GeForce RTX 4070Ti graphics card with 12g video memory. The software environment is a Windows 10 Professional 64-bit operating system, using the Pytorch framework, using Python 3.8.12 as the programming language, CUDA 11.1 as the GPU computing platform, and CUDNN 10.1 deep learning to realize GPU acceleration. When training the network model, the Adam optimizer is used, the learning rate is 0.001, the batch size is set to 4, and the training epoch is 500.

[0084] Based on the above configuration, the embodiment provides a deep learning defect detection method for MLCC, as shown in Figure 1 , including the following steps:

[0085] S1, constructing an image defect detection system to collect and screen images and generate a defect dataset;

[0086] As shown in Figure 2 , S1 further includes the following steps:

[0087] S11, fixing the clamp 1, setting the camera 2 and the ring light source 3 on the clamp 1, the camera 2 being connected with the lens 9, and the rotating platform 4 being installed below the lens 9, the laser sensor 5 being placed on one side of the rotating platform 4 and being electrically connected with the camera 2, denoted as an image acquisition unit (ISU);

[0088] S12, install the computer 6, the rotating platform controller 7 and the light source controller 8, make the computer 6 electrically connected with the camera 2, the rotating platform controller 7 electrically connected with the rotating platform 4, and the light source controller 8 electrically connected with the annular light source 3, and record as controlling the imaging unit (CMU).

[0089] In the image acquisition unit, the annular light source 3 is a 45° annular white light source; the camera 2 is a 1600-pixel CMOS camera with a resolution of 1440*1080, and is used in cooperation with a telecentric lens with a magnification of 1.5, an object distance of 110 mm and a depth of field of 1.8 mm; the visible red semiconductor laser wavelength of the laser sensor 5 is 660 nm;

[0090] In the control imaging unit, the light source controller 8 sets the intensity of the annular light source 3 to 255; the relevant parameters of the camera 2 are set to an acquisition frame rate of 250 fps, an exposure time of 5500us, a gamma correction rate of 0.7, and continuous shooting in a hard trigger mode; the rotating platform controller 7 sets the rotating speed of the rotating platform 4 to 30r / s;

[0091] The capacitor is placed at the edge of the rotating platform 4 to move with it, the position of the camera 2, the lens 9 and the annular light source 3 is adjusted by the clamp 1, and then fixed to ensure clear imaging, when the laser sensor 5 detects that the capacitor passes, the camera 2 is triggered to take a picture automatically, and the collected image is transmitted to the computer 6 for further processing. The control imaging unit can effectively control the acquisition effect of the image and further process the collected image data. Thus a deep learning defect detection system for MLCCs is constructed.

[0092] A large number of MLCC images are collected by this system, and the collected images are screened, and the capacitor data that can be used for training and testing are labeled and classified. In this embodiment, a total of 1789 valid defect images are collected, the resolution of the images is 1440*1080, and the images contain 5 defect types: end collapse, end copper exposure, deformation, ceramic body impurities and ceramic body pollution. Different types of chip defects have different types of color, shape, size and texture features, and the representative sample images are as shown in Figure 3 The data set is divided into a training set and a test set in a ratio of 9:1.

[0093] The distribution of the number of each type of sample (i.e. the MLCC defect sample data set) is shown in Table 1:

[0094] Defect type Cracked end Exposed end Misshapen Porcelain body inclusions Porcelain body contamination Training set 493 191 273 166 446 Test set 191 41 48 25 37 Sum 684 232 321 191 483

[0095] Table 1

[0096] S2, construct an ADS-YOLO model, input the defect data set into the ADS-YOLO model for training, evaluate and save the optimal weight;

[0097] wherein, as shown in Figure 4 S2 further comprises the following steps:

[0098] S21, adopting the CSP-Dsrknet53 architecture to design the Backbone module to extract deep features;

[0099] Specifically, S21 is: inputting an image into the Backbone module, sequentially performing layer-by-layer down-sampling by the CBS module composed of convolution, batch normalization and silu activation function, and fusing features with the C2f module.

[0100] S22, adopting the A2PAN structure to design the Neck module, introducing a self-attention mechanism and deep convolution for bidirectional multi-level fusion to improve the feature fusion strategy, helping the model maintain high-precision detection capability when facing complex multi-scale defects, and reducing the parameter quantity of the network.

[0101] Specifically, S221 is: bottom-up fusion, introducing a CSP-SA module with a self-attention mechanism to optimize deep feature expression;

[0102] wherein, the structure of the CSP-SA module is as shown in Figure 5 The input X is first mapped to a higher dimensional space by a 1x1 convolution module to obtain an intermediate feature map T, then divided into T' and Y0 by a segmentation operation, Y0 is recursively operated by i times of Bottleneck module and output Y i , T' is spliced with Y i by Concat operation, and then integrated by a 1x1 convolution module to obtain the output result Y of the CSP-SA module, represented as:

[0103] Y i =Bottleneck(Y i-1 )

[0104] Y=CBS 1×1 (Concat(T',Y0,Y1,...,Y n ))

[0105] wherein, i = 1, 2,..., n.

[0106] As shown in Figure 5 , in the Bottleneck module, the running steps are:

[0107] The residual structure of the multi-head self-attention (MHSA) is connected by a 1x1 convolution module, which calculates the similarity between different positions in the input feature map to capture the dependency relationship between long distances, which is very beneficial for the detection of defects associated with the position.

[0108] In the multi-head self-attention module, 1x1 convolution is used to map to h groups of Q, K and V matrices, h is the number of heads, in this embodiment, it is set to 4 here;

[0109] The content attention score is obtained by the dot product of Q and K;

[0110] At the same time, by adding relative position encoding, the position attention score of the spatial position relationship is obtained by the dot product with Q;

[0111] The total attention weight score is obtained by adding the content attention score and the position attention score, and is expressed as:

[0112]

[0113] Where, R w and R h are hyperparameters to be learned, representing the relative position relationship of the feature map in the height and width dimension positions respectively;

[0114] The total attention weight is obtained by the softmax operation, and multiplied by V to obtain the output x out , expressed as:

[0115] x out = Vsoftmax(score)

[0116] The output of the entire Bottleneck module is expressed as:

[0117] Y i = MHSA(Conv 1×1 (Y i-1 )).

[0118] Specifically, S222 is: top-down fusion, down-sampling is performed by using deep convolution (DCGS), and the convolution kernel of the deep convolution is only operated independently for each input channel, so that the model pays more attention to different types of local detail features. It is assumed that the size of the ordinary convolution kernel is C in ×C out ×k h ×k w , and the size of the deep convolution is C in ×1×k h ×k w , and the parameter amount is much smaller than that of the ordinary convolution. Fewer parameters mean that the complexity of the model is relatively low, thereby reducing the risk of overfitting.

[0119] S23, introduce a bilateral residual structure to optimize the Head module, add a bilateral residual structure to alleviate the gradient disappearance problem, reduce the model complexity, and thus improve the real-time monitoring speed of the model, and compared with the traditional decoupled detection head, the residual structure can retain more original information and reduce unnecessary parameter redundancy.

[0120] Specifically, as shown in Figure 6 S23 is: input the feature map X, and sequentially perform 1x1 convolution module and 3x3 convolution module in parallel to generate regression feature map F r (X) and classification feature map F c (X) respectively.

[0121] In the regression path, the feature map F r (X) passes through a residual module R r and a 1x1 independent convolution to obtain the bounding box regression output B, which is expressed as:

[0122] B = Conv 1×1 (R r (F r (X))+F r (X))

[0123] Similarly, the classification output C of the other branch is expressed as:

[0124] C = Conv 1×1 (R r (F c (X))+F c (X))

[0125] The regression output B converts the anchor point into a bounding box through a regression function, and the classification output C is activated through softmax, and then spliced to obtain the detection result.

[0126] S24, design a loss function SSIL to optimize the ADS-YOLO model, and in the training process, the predicted value obtained by DRH is used to calculate the loss function with the data true value to guide the model to optimize in a better direction.

[0127] Specifically, S24 is: the loss function SSIL includes the loss function SIOU and the loss function sDFL, and SSIL can significantly improve the positioning and detection ability of the model in complex defect scenarios.

[0128] The loss function SIOU adds an adjustment to the detection frame angle based on the traditional CIOU to optimize the measurement of IOU, so that the model can more accurately align the non-symmetrical and complex-shaped target, and optimize the measurement of the intersection over union between the real label frame and the predicted target frame, which is expressed as:

[0129]

[0130] where IoU represents the intersection over union of the real label box and the predicted target box, ρ represents the distance between the center points of the two, c is the diagonal length of the smallest rectangle enclosing the predicted box and the target box, λ is a balance parameter for adjusting the penalty term v of the shape of the target box, and Cost Distance and Cost shape measure the difference between the predicted box and the target box in position and shape, respectively, and are represented as:

[0131] Cost Distance = 2-exp(γρ x )-exp(γρ y )

[0132] Cost shape = (1-exp(-ω w )) 4 +(1-exp(-ω h )) 4

[0133] where ρ x and ρ y represent the distance ratio of the predicted box and the target box in the horizontal direction and the vertical direction, respectively, and ω w and ω h represent the difference in width and height ratio.

[0134] The main role of DFL is to improve the regression accuracy of the model for the target bounding box by fine-grained weight distribution for adjacent positions during target positioning. Especially in the task of multi-scale target detection, it can better cope with the challenge of target size change, but in the small sample dataset and blurred edge defect scene of industrial scene, the original DFL may pay excessive attention to specific details in the training sample and even the background, leading to training overfitting. A scaling factor is introduced to obtain the loss function sDFL based on DFL to adjust the weight of the left and right boundaries, so as to realize a smoother loss distribution, which is represented as:

[0135]

[0136] where CE(p,t) represents the cross-entropy loss between the predicted distribution p and the target value t, ω l and ω r represent the target position weights on the left and right, respectively, which are adjusted by the scaling factor α, and in this embodiment, α is set to 0.8, which is represented as:

[0137] ω l = α·(r+1-t),ω r = (1-α)·(1-ω l)

[0138] wherein r is a left adjacent number of the target value t;

[0139] Finally, the loss function SILL can be represented as:

[0140] Loss SSIL =Loss SIOU +Loss sDFL .

[0141] S3, using the ADS-YOLO model with the optimal weight saved, target detection is performed on the test sample, and a detection result is output.

[0142] The application selects several representative target detection models for comparative experiments on the MLCCs dataset, and the results are shown in Figure 7 As the multi-head self-attention mechanism is added, the ADS-YOLO proposed in the application can focus more on the defect position, and the positioning ability for complex multi-scale defects (such as end copper exposure and deformation) is improved. As can be seen from the test results, the ADS-YOLO proposed in the application effectively suppresses the situations of missed detection, false detection and repeated detection of a single defect.

[0143] The evaluation indexes of the comparative network are shown in Table 2:

[0144] Model Backbone P% R% mAP % Paras (M) GFLOPS FPS FasterR-CNN ResNet-50 83.5 75.0 80.2 41.6 355.3 16.3 SSD VGG-16 80.0 74.0 80.6 13.6 30.6 35.2 RetinaNet ResNet-50 80.1 74.0 79.6 32.3 348.9 15.2 EfficientDet EfficientDet-D3 67.5 61.0 66.6 11.9 24.1 11.6 YOLOv5s CSPDarkNet-53 81.5 78.0 81.8 7.0 15.8 42.4 YOLOv8s CSPDarkNet-53 79.5 79.2 82.4 11.1 28.4 57.8 ADS-YOLO CSPDarkNet-53 84.4 83.8 86.5 8.7 22.8 62.1

[0145] Table 2

[0146] As shown in Table 2. As can be seen, although the performances of SSD, Faster R-CNN and RetinaNet in terms of precision and recall rate are similar, they either show a higher number of parameters and computational requirements, or have a lower detection speed while maintaining the precision. In contrast, the ADS-YOLO model of the application is superior to the comparative model in terms of precision, recall rate, mAP% and inference time, proving the effectiveness of the application in balancing precision and efficiency. Although, compared with YOLOv5s, the parameters of the ADS-YOLO model of the application increase by 24.3%, and GFLOPS (Giga Floating Point Operations Per Second, an index for measuring computational complexity) increases by 44.3%, but in most evaluation standards, its performance is still higher than the benchmark model YOLOv8s. The trade-off between slightly increased computational load and improved detection performance makes the ADS-YOLO model an effective solution in practical applications. In terms of detection speed, it is still superior to other advanced detectors, meeting the requirements of real-time detection.

[0147] Figure 8Further highlighting the robustness of the ADS-YOLO model across different defect categories. Due to the small number of instances and large scale variations of deformity, end copper exposure, and porcelain body impurity defects, the detection of such defects poses a significant challenge. The detection performance of these defect types, especially in low-contrast edges and irregular shapes, significantly impacts the overall performance of the model. Despite this, the ADS-YOLO model consistently improves the average precision in these challenging categories, outperforming other models in terms of precision and stability.

[0148] The above-described embodiments only express several embodiments of the present application, which are described in detail and specifically, but should not be understood as a limitation on the scope of the patent of the present application. It should be noted that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application should be subject to the appended claims.

Claims

1. A deep learning-based defect detection method for MLCCs, characterized in that, Includes the following steps: S1. Construct an image defect detection system to acquire and filter images and generate a defect dataset; S2. Construct an ADS-YOLO model, input the defect dataset into the ADS-YOLO model for training, evaluate and save the optimal weights; S3. Using the ADS-YOLO model with stored optimal weights, perform target detection on the test samples and output the detection results; S2 further includes the following steps: S21. The Backbone module is designed using the CSP-Dsrknet53 architecture to extract deep features; S22. The Neck module is designed with an A2PAN structure, and bidirectional multi-level fusion is performed by introducing a self-attention mechanism and deep convolution. S23. Introduce a bilateral residual structure optimization Head module; S24. Design the loss function SSIL to optimize the ADS-YOLO model; S21 further includes the following steps: inputting the image into the Backbone module, performing layer-by-layer downsampling by the CBS module consisting of convolution, batch normalization and silu activation function, and then performing feature fusion and processing by the C2f module after sampling; S22 includes the following steps: S221, Bottom-up fusion: Introducing a CSP-SA module with self-attention mechanism to optimize deep feature representation; S222, Top-down fusion: Depth convolution is used for downsampling to reduce overfitting of the ADS-YOLO model; S23 includes the following steps: Given a feature map X, perform 1×1 convolutional modules and 3×3 convolutional modules in parallel to generate regression feature maps F. r (X) and classification feature map F c (X); In the regression path, the feature map F r (X) passes through a residual module R r A 1×1 independent convolution is used to obtain the regression output B, which is represented as: B=Conv 1×1 (R r (F r (X))+F r (X)) The classification output C of the other branch is represented as: C=Conv 1×1 (R r (F c (X))+F c (X)) The regression output B converts the anchor points into bounding boxes through a regression function, and the classification output C is activated by softmax. The two are then concatenated to obtain the detection result. S24 includes the following steps: The loss function SSIL includes the loss function SIOU and the loss function sDFL; The loss function SIOU is used to optimize the intersection-union ratio (IoU) between the ground truth label boxes and the predicted target boxes, and is expressed as: Where IoU represents the intersection-union ratio of the ground truth bounding box and the predicted bounding box, ρ represents the distance between their center points, c is the diagonal length of the smallest rectangle enclosing the predicted and predicted bounding boxes, λ is a balancing parameter used to adjust the penalty ν for the shape of the bounding box, and Cost... Distance and Cost shape The differences in position and shape between the predicted bounding box and the target bounding box were measured separately and represented as follows: Cost Distance =2-exp(g x )-exp(g y ) Cost shape =(1-exp(-ω w )) 4 +(1-exp(-ω h )) 4 Where, ρ x and ρ y ω represents the distance ratio between the predicted bounding box and the target bounding box in the horizontal and vertical directions, respectively. w and ω h This indicates the difference in the ratio of width to height. The loss function sDFL is used to adjust the weights on the left and right boundaries to achieve a smoother loss distribution, and is expressed as: Where CE(p,t) represents the cross-entropy loss between the prediction distribution p and the target value t, ω l and ω r These represent the weights of the target positions on the left and right sides, respectively, adjusted by a scaling factor α, and are expressed as follows: oh l =α·(r+1-t),ω r =(1-a)·(1-ω) l ) Where r is the number of left neighbors of the target value t; Finally, the loss function SILL is expressed as: Loss SSIL =Loss SIOU +Loss sDFL 。 2. The deep learning defect detection method for MLCCs according to claim 1, wherein step S1 further includes the following step: S11. Fixture: A camera and a ring light source are mounted on the fixture. The camera is connected to a lens, and a rotating platform is installed below the lens. A laser sensor is placed on one side of the rotating platform and electrically connected to the camera. This is referred to as an image acquisition unit. S12. Install a computer, a rotating platform controller, and a light source controller, so that the computer is electrically connected to the camera, the rotating platform controller is electrically connected to the rotating platform, and the light source controller is electrically connected to the ring light source, denoted as the control imaging unit.

3. The deep learning-based defect detection method for MLCCs according to claim 1, characterized in that, Specifically, S221 is: Input X is first processed by a convolutional module to obtain a feature map T, which is then segmented into T' and Y0 by a segmentation operation. Y0 is then processed by i recursive operations of the Bottleneck module and output Y. i T' is connected to Y via the Concat operation. i The concatenation is then passed through a convolutional module to obtain the output Y of the CSP-SA module, which is represented as: Y i =Bottleneck(Y i-1 ) Y=CBS 1×1 (Concat(T',Y0,Y1,...,Y n )) Where i = 1, 2, ..., n.

4. The deep learning-based defect detection method for MLCCs according to claim 3, characterized in that, The operation steps of the Bottleneck module are as follows: A convolutional module is used to connect a multi-head self-attention module; In the multi-head self-attention module, 1×1 convolution is used to map to h groups of Q, K and V matrices, where h is the number of heads; The content attention score is then obtained by the dot product of Q and K; By incorporating relative position encoding, the positional attention score is obtained through the dot product with Q; The total attention weight is obtained by adding the content attention score and the position attention score, and is expressed as follows: Among them, R w and R h These are the hyperparameters to be learned, representing the relative positional relationships of the feature maps in the height and width dimensions, respectively; The total attention weights are processed through a softmax operation to obtain the complete attention weights, which are then multiplied by V to obtain the output x. out , is represented as: x out =Vsoftmax(score) The output of the Bottleneck module is represented as follows: AND i =MHSA(Conv 1×1 (AND i-1 ))。 5. A deep learning defect detection system for MLCCs, used to implement the deep learning defect detection method for MLCCs as described in any one of claims 1-4, characterized in that: Includes a ring light source, a rotating platform, a laser sensor, a camera, a fixture, a rotating platform controller, a light source controller, a computer, and a lens; The camera is mounted on the fixture and is electrically connected to the computer. The lens is connected to the camera; The rotating platform is located below the lens and is electrically connected to the rotating platform controller; The ring light source is mounted on the fixture and is electrically connected to the light source controller; The laser sensor is configured correspondingly to the rotating platform and is electrically connected to the camera.

Citation Information

Patent Citations

  • Micro LED chip defect detection method based on MLTT-YOLO

    CN115908344A

  • MLCC multi-type defect rapid detection method based on machine vision

    CN118096659A