Defect detection method and system for multilayer ceramic capacitor

Through the training and optimization of the DFSF-YOLO model, the efficiency and accuracy issues of MLCC surface defect detection were solved, fast and accurate defect detection was achieved, and detection efficiency and product quality were improved.

CN120765544APending Publication Date: 2025-10-10GUANGDONG FENGHUA ADVANCED TECHNOLOGY (HOLDING) CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510800038.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-10-10

AI Technical Summary

Technical Problem

In existing technologies, surface defect detection of multilayer ceramic capacitors (MLCCs) relies on manual visual inspection, which is easily affected by subjective factors and has low efficiency. Traditional non-destructive testing methods are costly, complex to operate, and lack the ability to detect tiny defects.

Method used

The DFSF-YOLO model is used for defect detection. By obtaining a set of defect photos, dividing the set into training and validation sets, and building and training the DFSF-YOLO initial model, the Backbone module is used to extract deep features, the FastPAN module is used for multi-scale feature fusion, and the DetectHead module is used for defect detection. The MPDIoU bounding box loss function is combined to optimize the model to achieve fast and accurate detection.

Benefits of technology

It achieves fast and accurate detection of MLCC surface defects, avoids subjective errors in manual inspection, and improves inspection efficiency and product quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765544A_ABST
    Figure CN120765544A_ABST
Patent Text Reader

Abstract

The invention provides a defect detection method and system for a multilayer ceramic capacitor, and the method comprises the following steps: obtaining a defect photo set of the multilayer ceramic capacitor; dividing the defect photo set into training set images and verification set images according to a preset proportion; constructing a DFSF-YOLO initial model, and training the initial model based on the training set image to obtain a DFSF-YOLO training model; evaluating the model performance of the DFSF-YOLO training model based on the verification set image until a preset convergence condition is reached, and obtaining a DFSF-YOLO model; and importing a defect picture of the multilayer ceramic capacitor to be detected into the DFSF-YOLO model to obtain a defect detection result. According to the defect detection method and system for the multi-layer ceramic capacitor, subjective errors caused by manual detection are avoided, rapid and accurate detection of the surface defects of the MLCC is achieved, and therefore the detection efficiency and the product quality are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic component detection, and in particular to a defect detection method and system for multilayer ceramic capacitors. Background Art

[0002] Multilayer ceramic capacitors (MLCCs) are essential components in the electronics industry, and their performance stability and reliability directly impact the operational quality of electronic devices. However, during production and use, various surface defects may develop on MLCCs, such as impurities, collapse, skewness, electrode end extension, or contaminant particles. These defects not only affect the capacitor's electrical performance but can also cause failures such as short circuits and open circuits, thereby damaging the entire circuit system.

[0003] Under current technology, detection of MLCC surface defects primarily relies on manual visual inspection and traditional nondestructive testing techniques. While intuitive, manual visual inspection is susceptible to subjective factors and exhibits low efficiency, making it difficult to meet the needs of large-scale production. Traditional nondestructive testing techniques, such as infrared thermal imaging and ultrasonic testing, while improving accuracy and efficiency to a certain extent, still suffer from high costs, complex procedures, and insufficient detection capabilities for minor defects. Summary of the Invention

[0004] The present invention aims to provide a defect detection method and system for multilayer ceramic capacitors to solve the above-mentioned technical problems, avoid subjective errors caused by manual inspection, and realize rapid and accurate detection of MLCC surface defects, thereby improving inspection efficiency and product quality.

[0005] In order to solve the above technical problems, the present invention provides a defect detection method for multilayer ceramic capacitors, comprising the following steps:

[0006] Obtain a collection of defect photographs of multilayer ceramic capacitors;

[0007] The defect photo set is divided into training set images and validation set images according to a preset ratio;

[0008] Build the DFSF-YOLO initial model and train the DFSF-YOLO initial model based on the training set images to obtain the DFSF-YOLO training model;

[0009] Evaluate the performance of the DFSF-YOLO training model based on the validation set images until the preset convergence conditions are reached and the DFSF-YOLO model is obtained;

[0010] Import defect photos of the multilayer ceramic capacitor to be inspected into the DFSF-YOLO model to obtain defect detection results.

[0011] In the above scheme, a set of defect photos of multilayer ceramic capacitors is obtained to provide raw data for subsequent model training and construction. The defect photo set is then divided into training set images and validation set images to ensure the scientific nature of model training. The DFSF-YOLO initial model is then trained based on the training set images, and the model performance of the DFSF-YOLO training model is evaluated using the validation set images until the preset convergence conditions are reached. The model preset weights are obtained to ensure that the model achieves a balance between accuracy and efficiency. Finally, the DFSF-YOLO model is formed based on the model preset weights to realize defect detection of multilayer ceramic capacitors, avoid subjective errors caused by manual inspection, and achieve rapid and accurate detection of MLCC surface defects, thereby improving inspection efficiency and product quality.

[0012] Furthermore, the step of obtaining a defect photo set of a multilayer ceramic capacitor includes:

[0013] There are several multilayer ceramic capacitors;

[0014] The multilayer ceramic capacitors are inspected in sequence to obtain position information of the multilayer ceramic capacitors, and the position information is stored; defect photos corresponding to the multilayer ceramic capacitors are collected based on the position information to form a defect photo set.

[0015] In this approach, multiple multilayer ceramic capacitors are sequentially inspected to avoid overlap or collision, ensuring accuracy in subsequent inspections. The positions of the multilayer ceramic capacitors are then detected, and corresponding defect photos are captured for each individual multilayer ceramic capacitor based on this location information. These defect photos of each multilayer ceramic capacitor are then combined into a defect photo set, providing training samples for the subsequent DFSF-YOLO model training.

[0016] Furthermore, the method of constructing a DFSF-YOLO initial model and training the DFSF-YOLO initial model based on the training set to obtain a DFSF-YOLO training model includes:

[0017] Constructing a DFSF-YOLO initial model, wherein the DFSF-YOLO initial model includes a Backbone module, a FastPAN module, and a DetectHead module;

[0018] Extract features from the training set based on the Backbone module to obtain deep feature images;

[0019] Based on the FastPAN module, multi-scale feature fusion is performed on the deep feature image to obtain a multi-scale fused feature image;

[0020] Perform defect detection on multi-scale fusion feature images based on the DetectHead module to obtain training results;

[0021] Update the DFSF-YOLO initial model based on the training results and obtain the DFSF-YOLO training model.

[0022] In this solution, the Backbone module is used to extract deep features from the input training set images. The FastPAN module then performs multi-scale feature fusion on these deep feature images, resolving the redundant computation issues of traditional PAN and generating a multi-scale fused feature image. The DetectHead module is then used to perform defect detection on this multi-scale fused feature image. The detection results are used to update the DFSF-YOLO initial model and generate the DFSF-YOLO training model.

[0023] Furthermore, the feature extraction of the training set images based on the Backbone module to obtain deep feature images includes:

[0024] The Backbone module includes a first CBS submodule, a second CBS submodule, a first D-ELAN submodule, a third CBS submodule, a first FasterNet submodule, a first SCDown submodule, a second FasterNet submodule, a second SCDown submodule, a third FasterNet submodule and a first spatial pyramid SPPF pooling submodule;

[0025] Initialize the features of the training set image based on the first CBS submodule and the second CBS submodule to obtain an initial feature image;

[0026] Perform feature fusion on the initial feature image based on the first D-ELAN submodule, the third CBS submodule, and the first FasterNet submodule to obtain a first original feature image;

[0027] Down-sample the first original feature image based on the first SCDown submodule, and perform feature extraction based on the second FasterNet submodule to obtain a second original feature image;

[0028] Perform deep feature extraction on the second original feature image based on the second SCDown submodule, the third FasterNet submodule, and the first spatial pyramid SPPF pooling submodule to obtain a third original feature image;

[0029] The first original feature image, the second original feature image and the third original feature image together constitute a deep feature image.

[0030] In the above scheme, the first CBS submodule and the second CBS submodule are used to extract basic features from the input training set image to obtain an initial feature image. Then, the first D-ELAN submodule, the third CBS submodule, and the first FasterNet submodule are used to perform feature fusion on the initial feature image to extract a more diverse feature image and obtain the first original feature image. The first SCDown submodule and the second FasterNet submodule are then used to further extract features from the first original feature image and output the second original feature image. The second original feature image is then jointly processed again by the second SCDown submodule, the third FasterNet submodule, and the first spatial pyramid SPPF pooling submodule to further extract deeper features and obtain the third original feature image. Finally, the first original feature image, the second original feature image, and the third original feature image together constitute a deep feature image, which provides deep features of unified dimension for the cross-layer splicing of the subsequent FastPAN module.

[0031] Furthermore, the multi-scale feature fusion of the deep feature image based on the FastPAN module to obtain the multi-scale fused feature image includes:

[0032] The FastPAN module includes a first Upsample submodule, a first Concat submodule, a second D-ELAN submodule, a second Upsample submodule, a second Concat submodule, a third D-ELAN submodule, a third SCDown submodule, a third Concat submodule, a fourth D-ELAN submodule, a fourth SCDown submodule, a fourth Concat submodule and a fifth D-ELAN submodule;

[0033] The third original feature image is upsampled based on the first Upsample submodule, and is spliced ​​with the second original feature image based on the first Concat submodule to obtain a first spliced ​​feature image; the first spliced ​​feature image is feature fused based on the second D-ELAN submodule to obtain a first feature image;

[0034] The first feature image is upsampled based on the second Upsample submodule, and is spliced ​​with the first original feature image based on the second Concat submodule to obtain a second spliced ​​feature image; the second spliced ​​feature image is feature fused based on the third D-ELAN submodule to obtain a second feature image;

[0035] Down-sample the second feature image based on the third SCDown submodule, and concatenate it with the first feature image based on the third Concat submodule to obtain a third concatenated feature image; perform feature fusion on the third concatenated feature image based on the fourth D-ELAN submodule to obtain a third feature image;

[0036] Down-sampling the third feature image based on the fourth SCDown submodule, and concatenating it with the third original feature image based on the fourth Concat submodule to obtain a fourth concatenated feature image; performing feature fusion on the fourth concatenated feature image based on the fifth D-ELAN submodule to obtain a fourth feature image;

[0037] The second feature image, the third feature image, and the fourth feature image together constitute a multi-scale fusion feature image.

[0038] In the above scheme, the FastPAN module is used to perform cross-layer fusion of the first original feature image, the second original feature image and the third original feature image output by the Backbone module through the cyclic operations of upsampling, splicing, feature fusion and downsampling, and obtain the second feature image, the third feature image and the fourth feature image to form a multi-scale fused feature image, thereby solving the redundant calculation problem of traditional PAN and improving the detection accuracy and efficiency of multi-scale defects.

[0039] Furthermore, the updating of the DFSF-YOLO initial model based on the training results to obtain the DFSF-YOLO training model includes:

[0040] Calculating model parameter adjustments based on the MPDIoU bounding box loss function and the training results;

[0041] The DFSF-YOLO initial model is updated based on the model parameter adjustment amount to obtain a DFSF-YOLO training model.

[0042] In this approach, the MPDIoU bounding box loss function is used to quantify the prediction error between the training results and the real data, thereby calculating the model parameter adjustment. This adjustment is then used to indicate the update direction for the DFSF-YOLO initial model parameters. This adjustment is then applied to the DFSF-YOLO initial model to obtain the DFSF-YOLO training model.

[0043] Furthermore, the method of evaluating the model performance of the DFSF-YOLO training model based on the validation set images until a preset convergence condition is reached to obtain the DFSF-YOLO model includes:

[0044] Based on the validation set images and the DFSF-YOLO training model, the average model precision is calculated as follows:

[0045]

[0046] Where mAP represents the mean average precision, AP represents the average precision, and N represents the number of categories detected by the model.

[0047] The model performance of the DFSF-YOLO training model is evaluated based on the mean average model precision until the preset convergence condition is reached to obtain the DFSF-YOLO model.

[0048] In the above scheme, the model performance of the DFSF-YOLO training model is evaluated by calculating the model average precision and the mean average precision until the preset convergence condition is reached to obtain the DFSF-YOLO model.

[0049] The present invention provides a multilayer ceramic capacitor defect detection system, comprising an image acquisition unit, a data set construction unit, a model training unit, a model optimization unit, and a defect detection unit; including:

[0050] The image acquisition unit is used to obtain a set of defect photos of the multilayer ceramic capacitor;

[0051] The data set construction unit is used to divide the defect photo set into training set images and verification set images according to a preset ratio;

[0052] The model training unit is used to build a DFSF-YOLO initial model and train the DFSF-YOLO initial model based on the training set images to obtain a DFSF-YOLO training model;

[0053] The model optimization unit is used to evaluate the model performance of the DFSF-YOLO training model based on the validation set images until a preset convergence condition is reached, thereby obtaining the DFSF-YOLO model;

[0054] The defect detection unit is used to import the defect photo of the multilayer ceramic capacitor to be detected into the DFSF-YOLO model to obtain the defect detection result.

[0055] The multilayer ceramic capacitor defect detection system provided by the above solution has a simple structure. The image acquisition unit obtains a set of defect photos of the multilayer ceramic capacitor to provide raw data for subsequent model training and construction. Then, the defect photo set is divided into training set images and validation set images through the data set construction unit to ensure the scientific nature of the model training. The model training unit is then used to train the DFSF-YOLO initial model based on the training set images, and the model optimization unit is used to evaluate the model performance of the DFSF-YOLO training model based on the validation set images until the preset convergence conditions are reached. The model preset weights are obtained to ensure that the model achieves a balance between accuracy and efficiency. Finally, the defect detection unit forms a DFSF-YOLO model based on the model preset weights to realize defect detection of multilayer ceramic capacitors, avoid subjective errors caused by manual inspection, and realize fast and accurate detection of MLCC surface defects, thereby improving inspection efficiency and product quality.

[0056] Further, the image acquisition unit is configured to acquire a defect photo set of the multilayer ceramic capacitor; and the image acquisition unit comprises:

[0057] The multilayer ceramic capacitor has a plurality of layers.

[0058] The image acquisition unit is configured to sequentially detect the multilayer ceramic capacitor to acquire position information of the multilayer ceramic capacitor, acquire a defect photo corresponding to the multilayer ceramic capacitor based on the position information, and form the defect photo set.

[0059] In the above scheme, the image acquisition unit sequentially enters the detection process by the plurality of multilayer ceramic capacitors to avoid overlapping or collision of the plurality of devices and ensure the accuracy of subsequent detection. Then, the sensor is used to detect the position of the multilayer ceramic capacitor in real time and feed back to the PC end. The PC end controls the CMOS camera to shoot the corresponding defect photo of the single multilayer ceramic capacitor according to the position information. Then, the corresponding defect photo of the single multilayer ceramic capacitor is stored to form the defect photo set and provide training samples for subsequent training of the DFSF-YOLO model.

[0060] Further, the model training unit is configured to construct a DFSF-YOLO initial model, train the DFSF-YOLO initial model based on the training set image, and acquire a DFSF-YOLO training model; and the model training unit comprises:

[0061] The DFSF-YOLO initial model comprises a Backbone module, a FastPAN module, and a DetectHead module.

[0062] The Backbone module is configured to perform feature extraction on the training set image to acquire a deep feature image.

[0063] The FastPAN module is configured to perform multi-scale feature fusion on the deep feature image to acquire a multi-scale fusion feature image.

[0064] The DetectHead module is configured to perform defect detection on the multi-scale fusion feature image to acquire a training result.

[0065] The DFSF-YOLO initial model is updated based on the training result to acquire the DFSF-YOLO training model.

[0066] In the above scheme, the deep layer features are extracted from the input image of the training set by the model training unit using the Backbone module, and then the multi-scale feature fusion is performed on the deep layer feature image by the FastPAN module, which can solve the redundant calculation problem of the traditional PAN and obtain the multi-scale fusion feature image. Then, the DetectHead module is used to realize the defect detection on the multi-scale fusion feature image, and the detection result is obtained to update the DFSF-YOLO initial model, and the DFSF-YOLO training model is generated. BRIEF DESCRIPTION OF DRAWINGS

[0067] Figure 1 A flowchart of a defect detection method of a multilayer ceramic capacitor according to an embodiment of the present application is provided.

[0068] Figure 2 An architecture diagram of a defect detection system of a multilayer ceramic capacitor according to an embodiment of the present application is provided.

[0069] Figure 3 A comparison diagram of inference delay and mAP95 precision of DFSF-YOLO model and other models according to an embodiment of the present application is provided.

[0070] Figure 4 A detection result diagram of DFSF-YOLO model and other models on four selected MLCC defect images according to an embodiment of the present application is provided. DETAILED DESCRIPTION

[0071] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0072] In this embodiment, the defect inspection equipment for multilayer ceramic capacitors (MLCCs) consists of four major components: a feeding device, an optical imaging system, a motion control and inspection device, and a sorting device. The specific inspection steps are as follows: The feeding device is further divided into a hopper, a vibrating plate, and a linear feeder. MLCCs first fall through a funnel-shaped hopper onto the vibrating plate. The vibrating plate uses its vibration mechanism to transport the MLCCs in an orderly manner to the linear feeder. The linear feeder then transports the MLCCs to the next stage of the inspection process in a stable and continuous manner. The MLCCs then leave the linear feeder and arrive at a transparent glass disc. This disc is driven by a PC in the motion control and inspection device, which controls the DD motor. As the transparent glass disc rotates the MLCCs into the inspection area of ​​the optical imaging system, a photoelectric sensor detects the MLCC's position and feeds this information back to the PC. The PC then controls a CMOS camera in conjunction with a ring light source, with the CMOS camera capturing high-definition images of the MLCCs. After the inspection process is complete, the system classifies the MLCCs based on the inspection results. The air jet valves located at different positions spray air at the MLCCs, sorting out the identified defective MLCCs and non-defective MLCCs and blowing them into the corresponding sorting boxes, and placing them in the corresponding sorting boxes.

[0073] This embodiment provides a defect detection method for multilayer ceramic capacitors. For specific steps, please refer to Figure 1 ,include:

[0074] Step S1: obtaining a defect photo set of a multilayer ceramic capacitor;

[0075] Step S2: Divide the defect photo set into training set images and verification set images according to a preset ratio;

[0076] Step S3: constructing a DFSF-YOLO initial model, and training the DFSF-YOLO initial model based on the training set images to obtain a DFSF-YOLO training model;

[0077] Step S4: Evaluate the model performance of the DFSF-YOLO training model based on the validation set images until the preset convergence condition is reached, and obtain the DFSF-YOLO model;

[0078] Step S5: Import the defect photo of the multilayer ceramic capacitor to be inspected into the DFSF-YOLO model to obtain the defect detection results.

[0079] In this embodiment, a total of 476 defect photo sets of multilayer ceramic capacitors are screened and obtained by the above-mentioned defect detection equipment. The image resolution is 640×640, providing raw data for subsequent model training and construction. Before division, the defect photo set is first labeled and classified into four types. Since a single MLCC may exhibit multiple types of surface defects, the defect photo set contains a total of 71 impurity defect instances, 177 collapse defect instances, 133 skew defect instances, and 122 extension defect instances. Then, in order to ensure the reliability of the experimental data, the defect photo set is classified according to the defect type and divided into training set images and verification set images according to a preset ratio. The preset ratio here can be 8:2 to ensure the scientific nature of the model training. The distribution of the number of samples of each type (i.e., the MLCC defect photo set) is shown in Table 1 below:

[0080] Table 1. MLCC defect photo collection

[0081] Defect Type impurities collapse skew extend training set 57 142 107 98 Validation set 14 35 26 24 sum 71 177 133 122

[0082] The initial DFSF-YOLO model is then trained based on the training set images, and the performance of the trained DFSF-YOLO model is evaluated using the validation set images until the preset convergence conditions are reached. The model's preset weights are then obtained to ensure a balance between accuracy and efficiency. Finally, the DFSF-YOLO model is formed based on the preset model weights to enable defect detection for multilayer ceramic capacitors, avoiding subjective errors caused by manual inspection and enabling rapid and accurate detection of MLCC surface defects, thereby improving inspection efficiency and product quality.

[0083] Furthermore, the step of obtaining a defect photo set of a multilayer ceramic capacitor includes:

[0084] There are several multilayer ceramic capacitors;

[0085] The multilayer ceramic capacitors are inspected in sequence to obtain position information of the multilayer ceramic capacitors, and the position information is stored; defect photos corresponding to the multilayer ceramic capacitors are collected based on the position information to form a defect photo set.

[0086] In this embodiment, multiple multilayer ceramic capacitors are sequentially inspected to avoid overlap or collision, ensuring accuracy in subsequent inspections. The positions of the multilayer ceramic capacitors are then detected, and corresponding defect photos of each multilayer ceramic capacitor are captured based on this location information. The defect photos corresponding to each multilayer ceramic capacitor are then combined into a defect photo set, providing training samples for the subsequent DFSF-YOLO model training.

[0087] Furthermore, the method of constructing a DFSF-YOLO initial model and training the DFSF-YOLO initial model based on the training set to obtain a DFSF-YOLO training model includes:

[0088] Constructing a DFSF-YOLO initial model, wherein the DFSF-YOLO initial model includes a Backbone module, a FastPAN module, and a DetectHead module;

[0089] Extract features from the training set based on the Backbone module to obtain deep feature images;

[0090] Based on the FastPAN module, multi-scale feature fusion is performed on the deep feature image to obtain a multi-scale fused feature image;

[0091] Perform defect detection on multi-scale fusion feature images based on the DetectHead module to obtain training results;

[0092] Update the DFSF-YOLO initial model based on the training results and obtain the DFSF-YOLO training model.

[0093] In this embodiment, the Backbone module is used to extract deep features from the input training set images. The FastPAN module then performs multi-scale feature fusion on the deep feature images, resolving the redundant computation issues of traditional PAN and generating a multi-scale fused feature image. The DetectHead module then accurately identifies the location and category of detection targets from the extracted feature maps, enabling defect detection within the multi-scale fused feature image. Bounding boxes for the defect targets are generated, classified, and regression processing is performed on each bounding box to output the final detection results. Finally, the detection results are used to update the DFSF-YOLO initial model, generating the DFSF-YOLO training model.

[0094] Furthermore, the feature extraction of the training set images based on the Backbone module to obtain deep feature images includes:

[0095] The Backbone module includes a first CBS submodule, a second CBS submodule, a first D-ELAN submodule, a third CBS submodule, a first FasterNet submodule, a first SCDown submodule, a second FasterNet submodule, a second SCDown submodule, a third FasterNet submodule and a first spatial pyramid SPPF pooling submodule;

[0096] Initialize the features of the training set image based on the first CBS submodule and the second CBS submodule to obtain an initial feature image;

[0097] Perform feature fusion on the initial feature image based on the first D-ELAN submodule, the third CBS submodule, and the first FasterNet submodule to obtain a first original feature image;

[0098] Down-sample the first original feature image based on the first SCDown submodule, and perform feature extraction based on the second FasterNet submodule to obtain a second original feature image;

[0099] Perform deep feature extraction on the second original feature image based on the second SCDown submodule, the third FasterNet submodule, and the first spatial pyramid SPPF pooling submodule to obtain a third original feature image;

[0100] The first original feature image, the second original feature image and the third original feature image together constitute a deep feature image.

[0101] In this embodiment, the first CBS submodule and the second CBS submodule are used to initialize the input training set image, extract basic features, and obtain the initial feature image. The CBS submodule used in this embodiment is a structure composed of three components: Conv2d, BN, and SiLU connected in series. Among them, the Conv2d convolution layer uses separable convolution technology, which can effectively adjust the dimension of the feature map while reducing computational complexity. The BN (batch normalization) layer can standardize the feature map, making the feature distribution more stable, which is conducive to accelerating model convergence and improving training stability. The SiLU activation function is applied to the feature map to introduce nonlinear mapping, thereby enhancing the expressive power of the model. The initial feature image is then subjected to feature fusion by the first D-ELAN submodule, the third CBS submodule, and the first FasterNet submodule to extract a more diverse feature image and obtain the first original feature image. The D-ELAN submodule used in this embodiment is composed of a CBS layer, a DWConv layer, and a Concat layer, which can be used to extract features at different levels and achieve effective feature fusion. In the D-ELAN module, the convolutional layers within the CBS layer linearly combine features from different channels, ensuring that each channel's features not only contain its own information but also incorporate information from other channels. By appropriately setting the convolution kernel parameters, information interaction between channels can be promoted to a certain extent. The batch normalization layer within the CBS layer also normalizes the features of each channel, ensuring that features from different channels have similar distributions. This helps reduce inter-channel variations and provides a better foundation for subsequent information interaction. The SiLU activation function within the CBS layer introduces a nonlinear transformation to the features of each channel, enhancing their expressiveness. Furthermore, the nonlinear nature of the activation function also promotes information interaction between channels. The DWConv layer in the D-ELAN module replaces the 3×3 CBS convolution in the traditional ELAN module and adjusts the number of channels in the DWConv layer to improve feature extraction efficiency. Furthermore, the DWConv layer performs a separate convolution operation on each input channel, ensuring channel independence. This feature not only significantly reduces the number of model parameters but also significantly improves computational speed, thereby enhancing model efficiency. The DWConv layer is often used in conjunction with other layers, such as pointwise convolution. Point convolution linearly combines the features output by the DWConv module across channels, enabling information exchange between different channels. The convolution process of the DWConv layer is as follows: Assume that the input feature map has dimensions H × W × C, where H is the height, W is the width, and C is the number of channels. The output feature map also has dimensions H × W × C, meaning that convolution is performed independently on each channel without changing the number of channels. Convolution kernel characteristics: A separate convolution kernel is used for each input channel. The convolution kernel has dimensions K × K × 1, where K is the kernel size.Operation method: For each channel of the input feature map, use the corresponding convolution kernel to perform a convolution operation on the channel to obtain the output result of the channel. The convolution operations of all channels are independent of each other, and finally the output results of each channel are combined into an output feature map. The D-ELAN submodule used in this embodiment enhances the DFSF-YOLO model's ability to capture channel dependencies at different scales by promoting information interaction between different channels, thereby improving the model's ability to extract multi-scale feature maps. In addition, the D-ELAN module also has multiple advantages such as reducing computational costs, reducing the number of parameters, alleviating memory burden, and accelerating model reasoning speed. The FasterNet module used in this embodiment consists of three main parts: PConv2d, CBS, and Conv2d. The feature map of the input module passes through the PConv2d module in the first step, and the input feature map is divided into two parts according to the channel, of which 0.25 (i.e., 1 / 4) of the channels undergo Conv2d convolution operations, and then the two parts are spliced ​​in the second step. The concatenated feature maps enter the CBS module, which includes convolution (Conv2d), batch normalization (BatchNorm), and activation functions (ReLU) on the feature maps. In the third step, the feature maps enter another Conv2d layer for further processing. In the fourth step, the input feature maps are also directly processed by the PConv2d module, which performs the same operations as the first step. Finally, the feature maps processed in the third and fourth steps are fused (e.g., added) to obtain the final output. The FasterNet module uses an operation based on partial convolution (PConv), which only performs convolution on a subset of channels. This improves feature extraction efficiency and can extract more diverse feature maps, maximizing feature extraction performance while reducing memory access and effectively reducing unnecessary computational costs. The FasterNet module combines PConv with pointwise convolution (PWConv) to selectively apply filters to a subset of input channels. This accelerates feature extraction and reduces the model's parameter count and computational load: PConv requires only 10 floating-point operations. For a typical part ratio PConv uses only 1 / 6 of the floating-point operations of regular convolution. In addition, PConv requires less memory access: When r = 1 / 4, the memory access amount of PConv is only 1 / 4 of that of the conventional convolution. Then the first original feature image is further subjected to feature extraction through the first SCDown submodule and the second FasterNet submodule, and a second original feature image is output. The SCDown module used in this embodiment can enhance the cross-channel functional interaction while minimizing the functional loss. Since the FasterNet module outputs feature residuals, directly applying the CBS module for down-sampling will result in significant feature loss and insufficient cross-channel interaction, therefore the SCDown module is introduced in this embodiment to alleviate the deficiency by decoupling the spatial and channel dimensions. The SCDown module used first uses a 1x1 point-wise convolution to adjust the number of channels, and the size of the input feature map is HxWxCin, where H and W are the height and width of the feature map respectively, and Cin is the number of input channels. After the 1x1 point-wise convolution, the number of channels of the output feature map becomes Cout, while the spatial size (height and width) remains unchanged. Then a 3x3 deep convolution is used to spatially down-sample the feature map, and the convolution operation is performed independently for each input channel, and the size of the convolution kernel is set to 3x3, the step s and the padding parameters are set to control the degree of spatial down-sampling. Usually the step s is set to be greater than 1 to achieve the effect of down-sampling. The size of the sampled feature map becomes H / kxW / sxCout, where k is the size of the convolution kernel, thereby maximizing the preservation of information while reducing the computational cost. Then the second SCDown submodule, the third FasterNet submodule and the first spatial pyramid SPPF pooling submodule are used to jointly process the second original feature image, further extracting deeper level features, aggregating and extracting the final features, and forming a third original feature image for subsequent processing. Finally, the first original feature image, the second original feature image and the third original feature image jointly constitute a deep feature image, providing a unified dimension of deep features for the cross-layer splicing of the subsequent FastPAN module.

[0102] Further, the FastPAN module is used to perform multi-scale feature fusion on the deep feature image to obtain a multi-scale fusion feature image; including:

[0103] The FastPAN module includes a first Upsample submodule, a first Concat submodule, a second D-ELAN submodule, a second Upsample submodule, a second Concat submodule, a third D-ELAN submodule, a third SCDown submodule, a third Concat submodule, a fourth D-ELAN submodule, a fourth SCDown submodule, a fourth Concat submodule and a fifth D-ELAN submodule.

[0104] The third original feature image is upsampled based on the first Upsample submodule, and is spliced ​​with the second original feature image based on the first Concat submodule to obtain a first spliced ​​feature image; the first spliced ​​feature image is feature fused based on the second D-ELAN submodule to obtain a first feature image;

[0105] The first feature image is upsampled based on the second Upsample submodule, and is spliced ​​with the first original feature image based on the second Concat submodule to obtain a second spliced ​​feature image; the second spliced ​​feature image is feature fused based on the third D-ELAN submodule to obtain a second feature image;

[0106] Down-sample the second feature image based on the third SCDown submodule, and concatenate it with the first feature image based on the third Concat submodule to obtain a third concatenated feature image; perform feature fusion on the third concatenated feature image based on the fourth D-ELAN submodule to obtain a third feature image;

[0107] Down-sampling the third feature image based on the fourth SCDown submodule, and concatenating it with the third original feature image based on the fourth Concat submodule to obtain a fourth concatenated feature image; performing feature fusion on the fourth concatenated feature image based on the fifth D-ELAN submodule to obtain a fourth feature image;

[0108] The second feature image, the third feature image, and the fourth feature image together constitute a multi-scale fusion feature image.

[0109] Compared to existing technologies, this embodiment improves the FastPAN module by removing the additional 1×1 convolutional layer to reduce unnecessary computation; optimizing the channel count in the D-ELAN submodule for more efficient information flow; and improving the input and output flows of the neck layer to enhance information transmission efficiency. The FastPAN module utilizes the D-ELAN module, enabling more efficient multi-scale feature extraction compared to existing technologies. Furthermore, the SCDown module is introduced to the FastPAN module for more efficient feature filtering and accelerated information flow. By employing the improved FastPAN module through a cycle of upsampling, concatenation, feature fusion, and downsampling, the FastPAN module is able to perform cross-layer fusion of the first, second, and third original feature images output by the Backbone module while maintaining high performance. This optimizes the model's computational efficiency, resulting in a multi-scale fused feature image composed of the second, third, and fourth feature images. This reduces the model's computational complexity and redundancy, improving the accuracy and efficiency of multi-scale defect detection. The FastPAN module streamlines the initial dot multiplication operation in the PAN structure and reasonably adjusts the number of output channels, which not only speeds up feature extraction but also improves overall efficiency. It also simplifies the model complexity by reasonably reducing the depth of the model, thereby further enhancing the feature extraction capability.

[0110] Furthermore, the updating of the DFSF-YOLO initial model based on the training results to obtain the DFSF-YOLO training model includes:

[0111] Calculating model parameter adjustments based on the MPDIoU bounding box loss function and the training results;

[0112] The DFSF-YOLO initial model is updated based on the model parameter adjustment amount to obtain a DFSF-YOLO training model.

[0113] In this embodiment, the MPDIoU bounding box loss function is used to quantify the prediction error between the training results and the real data. The MPDIoU metric method is used to directly minimize the distance between the predicted bounding box and the upper left and lower right corners of the real bounding box, and then compare it with the real data to calculate the model parameter adjustment amount, thereby significantly improving the accuracy and robustness in high-precision detection scenarios. Then, based on the model parameter adjustment amount, the update direction of the DFSF-YOLO initial model parameters can be indicated, and the model parameter adjustment amount is applied to the DFSF-YOLO initial model to obtain the DFSF-YOLO training model. The pseudo code for the specific implementation process of the MPDIoU loss function in this embodiment is as follows:

[0114] Input predicted bounding box coordinates Β prdand the ground-truth bounding box coordinates Β gt , For the predicted bounding box coordinates Β prd ,make sure Where, Indicates the x-coordinate of the upper left corner of the prediction box; Indicates the y coordinate of the upper left corner of the prediction box; Indicates the x-coordinate of the lower right corner of the prediction box; Indicates the y coordinate of the lower right corner of the prediction box.

[0115] The input corresponding image width is w and height is h;

[0116] Output Where, Represents the upper left corner of the predicted box and the real box, represents the square of the Euclidean distance between the lower right corner points; represents the intersection-over-union loss function;

[0117] Calculate β gt Area: Where A gt Indicates the area of ​​the actual box;

[0118] Calculate β prd Area: Where A prd Represents the area of ​​the prediction box;

[0119] Calculate β prd and Β gt Intersection I:

[0120] where U=A prd +A gt -I; where I represents the intersection area of ​​the predicted box and the true box, and U represents the union area of ​​the predicted box and the true box; IoU is used to measure the degree of overlap between the predicted box and the true box. The closer the value is to 1, the higher the degree of overlap.

[0121] d=w 2 +h 2 ;

[0122]

[0123] Where, It is the complement of IoU, which is used to measure the degree of non-overlap between the predicted box and the real box. The smaller the value, the higher the degree of overlap. The smaller the value, the closer the predicted box is to the true box.

[0124] Furthermore, the method of evaluating the model performance of the DFSF-YOLO training model based on the validation set images until a preset convergence condition is reached to obtain the DFSF-YOLO model includes:

[0125] Based on the validation set images and the DFSF-YOLO training model, the average model precision is calculated as follows:

[0126]

[0127] Where mAP represents the mean average precision, AP represents the average precision, and N represents the number of categories detected by the model.

[0128] The model performance of the DFSF-YOLO training model is evaluated based on the mean average model precision until the preset convergence condition is reached to obtain the DFSF-YOLO model.

[0129] In this embodiment, the model performance of the DFSF-YOLO training model is evaluated by calculating the model average precision and the mean of the average precision until the preset convergence condition is reached, and the DFSF-YOLO model is obtained. The average precision can be calculated by the model precision and the model recall rate, specifically: In the formula, P represents the model precision and R represents the model recall. The model precision P can be obtained by In the formula, TP represents the number of correctly identified positive samples, and FP represents the number of positive samples that are incorrectly identified as negative samples; the model recall rate R can be obtained by =( ...

[0130] This embodiment provides a multilayer ceramic capacitor defect detection system, including an image acquisition unit, a data set construction unit, a model training unit, a model optimization unit, and a defect detection unit; including:

[0131] The image acquisition unit is used to obtain a set of defect photos of the multilayer ceramic capacitor;

[0132] The data set construction unit is used to divide the defect photo set into training set images and verification set images according to a preset ratio;

[0133] The model training unit is used to build a DFSF-YOLO initial model and train the DFSF-YOLO initial model based on the training set images to obtain a DFSF-YOLO training model;

[0134] The model optimization unit is used to evaluate the model performance of the DFSF-YOLO training model based on the validation set images until a preset convergence condition is reached, thereby obtaining the DFSF-YOLO model;

[0135] The defect detection unit is used to import the defect photo of the multilayer ceramic capacitor to be detected into the DFSF-YOLO model to obtain the defect detection result.

[0136] The multilayer ceramic capacitor defect detection system provided in this embodiment has a simple structure, and the hardware configuration of the algorithm performed includes a 2.10GHz 13th generation Intel(R) Core(TM) i7-13700F processor, an NvidiaGeForce RTX 4070Ti graphics card with a single GPU, and 44GB RAM. The software environment consists of a Windows 10Professional 64-bit operating system. The detection model is built using the PyTorch framework, with Python3.10.9 as the programming language, CUDA 12.1 as the GPU computing platform, and cuDNN8.8.4 as the GPU accelerated deep learning library. The defect photo set of the multilayer ceramic capacitor is obtained through the image acquisition unit to provide raw data for subsequent model training and construction. The defect photo set is then divided into training set images and verification set images through the data set construction unit to ensure the scientific nature of the model training. The model training unit then trained the DFSF-YOLO initial model based on the training set images. The input image resolution was adjusted to 640×640 pixels, and the model was trained for 800 epochs using the AdamW optimizer with a learning rate of 0.005. The model optimization unit evaluated the performance of the trained DFSF-YOLO model based on the validation set images until the preset convergence conditions were reached. The model's preset weights were then obtained to ensure a balance between accuracy and efficiency. Finally, the defect detection unit formed the DFSF-YOLO model based on the preset model weights to enable defect detection of multilayer ceramic capacitors. This avoids subjective errors caused by manual inspection and enables rapid and accurate detection of MLCC surface defects, thereby improving inspection efficiency and product quality.

[0137] Furthermore, the image acquisition unit is used to obtain a set of defect photos of the multilayer ceramic capacitor; comprising:

[0138] There are several multilayer ceramic capacitors;

[0139] The image acquisition unit is configured to sequentially detect the multilayer ceramic capacitors, acquire position information of the multilayer ceramic capacitors, and acquire defect photos corresponding to the multilayer ceramic capacitors based on the position information to form a defect photo set.

[0140] In this embodiment, the image acquisition unit sequentially puts a plurality of multilayer ceramic capacitors into the detection process to avoid overlapping or collision of the multidevices and ensure the accuracy of subsequent detection. Then, the sensor is used to detect the position of the multilayer ceramic capacitors in real time and feed back to the PC end. The PC end controls the CMOS camera to shoot the corresponding defect photos of the single multilayer ceramic capacitor according to the position information. Then, the corresponding defect photos of the single multilayer ceramic capacitor are stored to form a defect photo set and provide training samples for subsequent training of the DFSF-YOLO model.

[0141] Further, the model training unit is configured to construct a DFSF-YOLO initial model, train the DFSF-YOLO initial model based on the training set images, and acquire a DFSF-YOLO training model; and the DFSF-YOLO initial model comprises a Backbone module, a FastPAN module, and a DetectHead module.

[0142] The DFSF-YOLO initial model comprises a Backbone module, a FastPAN module, and a DetectHead module.

[0143] The Backbone module is configured to extract deep feature images from the training set images.

[0144] The FastPAN module is configured to perform multi-scale feature fusion on the deep feature images to acquire multi-scale fusion feature images.

[0145] The DetectHead module is configured to perform defect detection on the multi-scale fusion feature images to acquire a training result.

[0146] The DFSF-YOLO initial model is updated based on the training result to acquire the DFSF-YOLO training model.

[0147] In this embodiment, the Backbone module is used to extract deep features from the input training set images, the FastPAN module is used to perform multi-scale feature fusion on the deep feature images to solve the redundant calculation problem of the traditional PAN and acquire multi-scale fusion feature images, the DetectHead module is used to perform defect detection on the multi-scale fusion feature images to acquire a detection result, the DFSF-YOLO initial model is updated based on the detection result, and the DFSF-YOLO training model is generated.

[0148] To evaluate the performance of the DFSF-YOLO model, the following three embodiments are used for illustration:

[0149] The VOC2012 dataset was used to conduct experiments, testing YOLOv3-tiny, YOLOv5s, YOLOv5n, YOLOv7-tiny, YOLOv8n, and the DFSF-YOLO model of this embodiment. Each model was trained for 200 cycles. The DFSF-YOLO model was trained and tested using the VOC2012 dataset to verify the generalization ability of the DFSF-YOLO model. The comparative experimental results are shown in Table 2:

[0150] Table 2. Comparative experimental results based on the VOC2012 dataset

[0151]

[0152] In this example, the DFSF-YOLO model demonstrated relatively few parameters (4.4M), extremely low inference latency (2.5 milliseconds), and high detection accuracy (mAP50 of 0.601) in experiments on the VOC2012 dataset. Compared to the YOLOv3-tiny, YOLOv5s, YOLOv5n, YOLOv7-tiny, and YOLOv8n models, the DFSF-YOLO model demonstrated robustness and superior generalization capabilities on the VOC2012 dataset.

[0153] The multilayer ceramic capacitor surface defect dataset was used for experiments to further verify the ability of the DFSF-YOLO model in processing MLCC surface defect detection. YOLOv3, YOLOv5, YOLOv7, YOLOv8, YOLOv9, YOLOv10, RT-DETR, RetinaNet, EfficientNet, SSD, Faster R-CNN and the DFSF-YOLO model of this embodiment were tested. The results are shown in the figure below. Figure 3 As shown in Table 3:

[0154] Table 3. Comparative experimental results of MLCC surface defect dataset

[0155]

[0156]

[0157] See Figure 3The DFSF-YOLO model achieved the lowest inference latency among all models, at only 2.5 milliseconds, significantly faster than other models such as RT-DETR (7.5 milliseconds) and YOLOv5m (4.3 milliseconds). Secondly, the DFSF-YOLO model in Table 3 has only 4.4M parameters, outperforming other models such as EfficientNet (20.0M) and Faster R-CNN (41.8M). Furthermore, the DFSF-YOLO model in Table 3 achieved an average mAP50 precision of 0.922, significantly higher than other models such as SSD (0.736), RetinaNet (0.753), and Faster R-CNN (0.806).

[0158] In summary, the DFSF-YOLO model of this embodiment demonstrates advantages in complexity, processing speed, and detection accuracy, making it an ideal choice for applications requiring fast and accurate target detection. For further comparison, four MLCC defect images were selected to test the above model. Figure 4 , the first column is the original image (original), and the MLCC defects are impurities, collapse, skew, and extension from top to bottom. The second to seventh columns are the detection results of FasterRCNN, SSD, YOLOv5s, YOLOv8n, YOLOv9s, and DFSF-YOLO. In samples where the MLCC defect is impurities, all models successfully detected the defects. However, the DFSF-YOLO model proposed in this embodiment can achieve the highest detection accuracy and the fastest detection speed when two MLCCs appear in the same frame. In samples where the MLCC defect is collapse, FasterRCNN and SSD failed to detect the central defect. In samples where the MLCC defect is skew, YOLOv8n missed the defect on the right, and YOLOv9s produced two false detections. In samples where the MLCC defect is extension, only YOLOv9s and DFSF-YOLO models correctly identified the irregular defects, while other models such as YOLOv5s produced false positives. These results highlight the advantages of the DFSF-YOLO model for detecting surface defects in MLCCs and emphasize its potential for industrial-scale applications.

[0159] In order to evaluate the effectiveness of the module role in the DFSF-YOLO model, the following examples are used to illustrate:

[0160] Ablation experiments were conducted on the DFSF-YOLO model, as shown in Table 4:

[0161] Table 4. Ablation experiment results

[0162]

[0163]

[0164] The results show that replacing the corresponding structures in the baseline model with the FasterNet module, D-ELAN module, SCDown module, and FastPAN module can improve the detection performance of the DFSF-YOLO model, verifying the feasibility of this embodiment. In addition, the performance of each module in different combinations is tested, and the feature extraction capability of the FasterNet module at different scales is evaluated. The results show that the collaboration of each module can further improve the performance of the model. Specifically, the D-ELAN module is responsible for extracting multi-scale and multi-level feature information; the FasterNet module achieves efficient feature extraction through hierarchical partial convolution and reduces redundant calculations; the SCDown module retains information to the maximum extent; and the FastPAN structure further reduces redundant calculations and improves the inference speed of the model. The four modules play their own roles while complementing each other, jointly enhancing the detection capability of the model.

[0165] In order to evaluate the superiority and rationality of MPDIoU, the following examples are used to illustrate:

[0166] A series of ablation experiments were conducted on the DFSF-YOLO model, as shown in Table 5:

[0167] Table 5. Loss function comparison experimental results

[0168]

[0169] Results show that MPDIoU is the most suitable loss function for the DFSF-YOLO model. Compared to the CIOU loss function used in YOLOv5, MPDIoU improves mAP50, mAP75, and mAP95 by 0.9%, 0.3%, and 0.8%, respectively. While GIOU slightly outperforms MPDIoU on mAP50, it significantly underperforms MPDIoU on mAP75.

[0170] In order to evaluate the rationality of FasterNet, the following examples are used to illustrate:

[0171] A series of ablation experiments were conducted on the DFSF-YOLO model, as shown in Table 6:

[0172] Table 6. Impact of ablation experiments on FasterNet partial ratio

[0173] r mAP50 mAP75 mAP95 GFLOPs Latency 1 0.925 0.622 0.550 23.6 2.8ms 2 0.901 0.637 0.536 15.2 2.6ms 4 0.922 0.678 0.562 13.0 2.5ms

[0174] The results show that when r = 4, FasterNet performs best, achieving more efficient feature extraction while reducing the number of parameters, thereby improving overall model performance. In addition, when r = 1, the PConv in FasterNet degenerates into a regular convolution, further verifying the existence of redundant calculations in the YOLOv5 backbone network.

[0175] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A defect detection method for a multilayer ceramic capacitor, characterized in that: The following steps are involved: Obtain a collection of defect photographs of multilayer ceramic capacitors; The defect photo set is divided into training set images and validation set images according to a preset ratio; Build the DFSF-YOLO initial model and train the DFSF-YOLO initial model based on the training set images to obtain the DFSF-YOLO training model; Evaluate the performance of the DFSF-YOLO training model based on the validation set images until the preset convergence conditions are reached and the DFSF-YOLO model is obtained; Import defect photos of the multilayer ceramic capacitor to be inspected into the DFSF-YOLO model to obtain defect detection results.

2. The defect detection method for a multilayer ceramic capacitor according to claim 1, wherein: The method of obtaining a defect photo set of a multilayer ceramic capacitor comprises: There are several multilayer ceramic capacitors; The multilayer ceramic capacitors are inspected in sequence to obtain position information of the multilayer ceramic capacitors, and the position information is stored; defect photos corresponding to the multilayer ceramic capacitors are collected based on the position information to form a defect photo set.

3. The defect detection method for a multilayer ceramic capacitor according to claim 1, wherein: The method of constructing a DFSF-YOLO initial model and training the DFSF-YOLO initial model based on the training set images to obtain a DFSF-YOLO training model includes: Constructing a DFSF-YOLO initial model, wherein the DFSF-YOLO initial model includes a Backbone module, a FastPAN module, and a DetectHead module; Based on the Backbone module, feature extraction is performed on the training set images to obtain deep feature images; Based on the FastPAN module, multi-scale feature fusion is performed on the deep feature image to obtain a multi-scale fused feature image; Perform defect detection on multi-scale fusion feature images based on the DetectHead module to obtain training results; Update the DFSF-YOLO initial model based on the training results and obtain the DFSF-YOLO training model.

4. The defect detection method for a multilayer ceramic capacitor according to claim 3, wherein: The method extracts features from the training set images based on the Backbone module to obtain deep feature images; including: The Backbone module includes a first CBS submodule, a second CBS submodule, a first D-ELAN submodule, a third CBS submodule, a first FasterNet submodule, a first SCDown submodule, a second FasterNet submodule, a second SCDown submodule, a third FasterNet submodule and a first spatial pyramid SPPF pooling submodule; Initialize the features of the training set image based on the first CBS submodule and the second CBS submodule to obtain an initial feature image; Perform feature fusion on the initial feature image based on the first D-ELAN submodule, the third CBS submodule, and the first FasterNet submodule to obtain a first original feature image; Down-sample the first original feature image based on the first SCDown submodule, and perform feature extraction based on the second FasterNet submodule to obtain a second original feature image; Perform deep feature extraction on the second original feature image based on the second SCDown submodule, the third FasterNet submodule, and the first spatial pyramid SPPF pooling submodule to obtain a third original feature image; The first original feature image, the second original feature image and the third original feature image together constitute a deep feature image.

5. The defect detection method for a multilayer ceramic capacitor according to claim 4, wherein: The method performs multi-scale feature fusion on the deep feature image based on the FastPAN module to obtain a multi-scale fused feature image; comprising: The FastPAN module includes a first Upsample submodule, a first Concat submodule, a second D-ELAN submodule, a second Upsample submodule, a second Concat submodule, a third D-ELAN submodule, a third SCDown submodule, a third Concat submodule, a fourth D-ELAN submodule, a fourth SCDown submodule, a fourth Concat submodule and a fifth D-ELAN submodule; The third original feature image is upsampled based on the first Upsample submodule, and is spliced ​​with the second original feature image based on the first Concat submodule to obtain a first spliced ​​feature image; the first spliced ​​feature image is feature fused based on the second D-ELAN submodule to obtain a first feature image; The first feature image is upsampled based on the second Upsample submodule, and is spliced ​​with the first original feature image based on the second Concat submodule to obtain a second spliced ​​feature image; the second spliced ​​feature image is feature fused based on the third D-ELAN submodule to obtain a second feature image; Down-sample the second feature image based on the third SCDown submodule, and concatenate it with the first feature image based on the third Concat submodule to obtain a third concatenated feature image; perform feature fusion on the third concatenated feature image based on the fourth D-ELAN submodule to obtain a third feature image; Down-sampling the third feature image based on the fourth SCDown submodule, and concatenating it with the third original feature image based on the fourth Concat submodule to obtain a fourth concatenated feature image; performing feature fusion on the fourth concatenated feature image based on the fifth D-ELAN submodule to obtain a fourth feature image; The second feature image, the third feature image, and the fourth feature image together constitute a multi-scale fusion feature image.

6. The defect detection method for a multilayer ceramic capacitor according to claim 3, wherein: The method updates the DFSF-YOLO initial model based on the training results to obtain the DFSF-YOLO training model; including: Calculating model parameter adjustments based on the MPDIoU bounding box loss function and the training results; The DFSF-YOLO initial model is updated based on the model parameter adjustment amount to obtain a DFSF-YOLO training model.

7. The defect detection method for a multilayer ceramic capacitor according to claim 1, wherein: The model performance of the DFSF-YOLO training model is evaluated based on the validation set images until a preset convergence condition is reached to obtain the DFSF-YOLO model; including: Based on the validation set images and the DFSF-YOLO training model, the average model precision is calculated as follows: Where mAP represents the mean average precision, AP represents the average precision, and N represents the number of categories detected by the model. The model performance of the DFSF-YOLO training model is evaluated based on the mean average model precision until the preset convergence condition is reached to obtain the DFSF-YOLO model.

8. A defect detection system for multilayer ceramic capacitors, characterized in that: It includes image acquisition unit, data set construction unit, model training unit, model optimization unit and defect detection unit; including: The image acquisition unit is used to obtain a set of defect photos of the multilayer ceramic capacitor; The data set construction unit is used to divide the defect photo set into training set images and verification set images according to a preset ratio; The model training unit is used to build a DFSF-YOLO initial model and train the DFSF-YOLO initial model based on the training set images to obtain a DFSF-YOLO training model; The model optimization unit is used to evaluate the model performance of the DFSF-YOLO training model based on the validation set images until a preset convergence condition is reached, thereby obtaining the DFSF-YOLO model; The defect detection unit is used to import the defect photo of the multilayer ceramic capacitor to be detected into the DFSF-YOLO model to obtain the defect detection result.

9. The defect detection system for multilayer ceramic capacitors according to claim 8, characterized in that: The image acquisition unit is used to obtain a set of defect photos of the multilayer ceramic capacitor; it includes: There are several multilayer ceramic capacitors; The image acquisition unit is used to sequentially detect the multilayer ceramic capacitors and obtain position information of the multilayer ceramic capacitors; based on the position information, defect photos corresponding to the multilayer ceramic capacitors are collected to form a defect photo set.

10. The defect detection system for multilayer ceramic capacitors according to claim 8, characterized in that: The model training unit is used to construct a DFSF-YOLO initial model and train the DFSF-YOLO initial model based on the training set images to obtain the DFSF-YOLO training model; including: Constructing a DFSF-YOLO initial model, wherein the DFSF-YOLO initial model includes a Backbone module, a FastPAN module, and a DetectHead module; Based on the Backbone module, feature extraction is performed on the training set images to obtain deep feature images; Based on the FastPAN module, multi-scale feature fusion is performed on the deep feature image to obtain a multi-scale fused feature image; Perform defect detection on multi-scale fusion feature images based on the DetectHead module to obtain training results; Update the DFSF-YOLO initial model based on the training results and obtain the DFSF-YOLO training model.