Printed circuit board defect detection method and device based on cross-scale multiple polymerization

By using YOLOv8 network and CDA-net/RGS-FPN in printed circuit board defect detection for feature extraction and fusion, the problems of slow manual detection speed and low accuracy are solved, and efficient and accurate defect detection is achieved to adapt to large-scale Production demand, reduces costs and improves inspection consistency.

CN119006456AActive Publication Date: 2024-11-22HUAQIAO UNIVERSITY

Patent Information

Application Number
CN202411480225.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2024-11-22
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

The prior art relies on manual detection in printed circuit board defect detection, which is slow, low accuracy, high cost, and difficult to meet the needs of large-scale production. Human factors have a great influence, resulting in inconsistent detection results.

Method used

Feature extraction and fusion are performed using the cross-stage partial dual aggregation network CDA-net and the residual gated separation feature pyramid network RGS-FPN based on YOLOv8 network. Combined with a single-stage object detection algorithm, a printed circuit board defect detection model is constructed and image pre-pre-image Process and model training to improve detection accuracy and speed.

Benefits of technology

Significantly improves the accuracy and speed of printed circuit board defect detection, enhances the robustness of the model, can better handle complex patterns and tiny defects, adapt to large-scale production needs, reduce labor costs, and improves inspection consistency and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006456A_ABST
    Figure CN119006456A_ABST
Patent Text Reader

Abstract

The invention relates to a printed circuit board defect detection method and device based on cross-scale multiple aggregation, and relates to the field of target detection.The method comprises the steps that a printed circuit board defect image is obtained and preprocessed; an improved YOLOv8 network is used for feature extraction and fusion, a CDA-net is adopted in the feature extraction network, the network comprises an embedded layer module, four layers of CDA modules and an SPPF module, and multi-scale features can be effectively extracted; the feature fusion network adopts RGS-FPN to perform efficient multi-scale feature fusion; performing target detection by using an anchor-free YOLOv8 detection head, and training the model at a learning rate of 0.001 by using an Adam optimizer; and inputting the preprocessed image into the trained model to obtain a defect detection result of the printed circuit board. The accuracy and efficiency of defect detection of the printed circuit board are improved through the deep learning technology, and the method is suitable for quality control in the manufacturing process of the printed circuit board.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of target detection, and in particular to a printed circuit board defect detection method based on cross-scale multiple aggregation. Background Art

[0002] Printed circuit boards (PCBs) are core components of electronic products, and their quality directly affects device performance and reliability. Various defects may occur during the production process, such as poor soldering, open circuits, short circuits, and component misalignment, which can lead to product failures and reduce user experience. Defect detection can not only improve product qualification rates and reduce rework and scrap rates, but also save production costs, improve production efficiency, meet strict industry standards, prevent potential safety risks, and promote technological progress.

[0003] Manual inspection relies on the operator's experience and judgment, which is slow and difficult to meet the needs of modern large-scale production. Human factors have a great impact, and long-term work can easily lead to fatigue, resulting in high rates of missed inspections and false inspections. A large number of well-trained personnel are required for inspection, which increases labor costs. The judgment standards of different operators may be inconsistent, resulting in volatility in the inspection results. Faced with complex PCB patterns and tiny defects, manual visual inspection capabilities are limited and it is difficult to ensure high accuracy.

[0004] By training a large amount of labeled data, the deep learning model can automatically extract features and classify them, significantly improving the accuracy of detection. The automated detection system can quickly process a large number of images, significantly improve the detection speed, and adapt to the needs of large-scale production. The detection results of the deep learning model are consistent and are not affected by human factors, ensuring the consistency and reliability of the detection. Although hardware and model training costs are required in the early stage, in the long run, the automated detection system reduces labor costs and improves production efficiency. The deep learning model can handle complex patterns and tiny defects, has strong adaptability, and can be applied to various PCB detection scenarios. The model can also continuously optimize the detection performance and adapt to new defect types through continuous learning and updating. Summary of the invention

[0005] In order to solve the above problems, the present invention proposes a printed circuit board defect detection method and device based on cross-scale multiple aggregation.

[0006] The specific plan is as follows:

[0007] On the one hand, a printed circuit board defect detection method based on cross-scale multi-aggregation includes the following steps:

[0008] S101, acquiring a printed circuit board defect image, and preprocessing the printed circuit board defect image to obtain a preprocessed printed circuit board defect image;

[0009] S102, using the YOLOv8 network to build a printed circuit board defect detection model; using the cross-stage partial dual aggregation network CDA-net as the feature extraction network of the YOLOv8 network; extracting feature information from the printed circuit board defect image through the CDA module in CDA-net, and outputting a feature map processed by the CDA module;

[0010] S103, using the residual gated separation feature pyramid network RGS-FPN as the feature fusion network of the YOLOv8 network, and performing multi-scale feature fusion on the feature map processed by the CDA module through the RGS module in the RGS-FPN to obtain a feature map processed by the RGS module;

[0011] S104, inputting the feature map processed by the RGS module into the anchor-free YOLOv8 detection head, and using a single-stage target detection algorithm to train the printed circuit board defect detection model to obtain a trained printed circuit board defect detection model;

[0012] S105, inputting the preprocessed printed circuit board image to be inspected into a trained printing defect detection model to obtain a defect detection result.

[0013] Furthermore, in S101 and S105, the preprocessing specifically includes:

[0014] The image is subjected to at least one of mosaic enhancement processing, mixed enhancement processing, random disturbance processing and color disturbance processing.

[0015] Further, in S102, the CDA-net includes an embedding layer module, a first layer CDA module, a second layer CDA module, a third layer CDA module, a fourth layer CDA module and an SPPF module connected in sequence;

[0016] The embedding layer module converts the size of the input PCB defect image into Adjust to ;

[0017] The first-level CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0018] The second layer CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0019] The third layer CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0020] The fourth layer CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0021] in, is the height of the input PCB defect image, is the width of the printed circuit board defect image input as input image, is the number of channels of the input printed circuit board defect image;

[0022] The SPPF module uses spatial pyramid pooling on the 16 outputs of the fourth layer CDA module. Features are extracted from channels to capture detailed information of the target object at different scales.

[0023] Further, the CDA module includes a feature extraction part and a downsampling part;

[0024] The feature extraction part, the calculation process is as follows:

[0025] ;

[0026] ;

[0027] ;

[0028] ;

[0029] ;

[0030] ;

[0031] in, Represents a dimension concatenation operation; represents the addition operation, Indicates Pointwise convolution operation; Indicates group convolution operation; Indicates that the feature map is divided in the channel dimension; Indicates convolution operation, batch normalization operation and silu activation function operation; A feature map representing the input; , , , and Represents the intermediate feature map; Represents the feature map of the final output;

[0032] The downsampling part is calculated as follows:

[0033] ;

[0034] ;

[0035] ;

[0036] ;

[0037] ;

[0038] in, Represents batch normal batch normalization operation, represents the activation function operation, Indicates a depth-wise separable convolution operation , batch normalization operation and silu activation function operation, represents a full connection operation, represents the average pooling operation, represents the input feature map, , , , , represents the intermediate feature map, Represents the feature map of the final output.

[0039] Furthermore, in S103, the calculation process of multi-scale feature fusion by the RGS module in RGS-FPN is as follows:

[0040] ;

[0041] ;

[0042] ;

[0043] ;

[0044] ;

[0045] ;

[0046] ;

[0047] ;

[0048] ;

[0049] ;

[0050] in, , , , is the input feature map, , , , is the output feature map, , , , , , is the intermediate feature map, Indicates multi-scale feature fusion through the RGS module. Indicates that the feature information of the feature map is extracted through the CDA module.

[0051] Furthermore, the RGS module divides the input feature map into multiple regions, each of which is set as a token. Each token generates a unique gating signal based on the features of its nearest neighbors, and achieves more efficient signal flow through residual separation. The formula is as follows:

[0052] ;

[0053] ;

[0054] ;

[0055] ;

[0056] ;

[0057] in, Indicates linear operation (linear activation), Indicates a partial convolution operation. It means dividing the feature map in the channel dimension. represents the input feature map, , , , represents the intermediate feature map, Represents the feature map of the final output.

[0058] Furthermore, in S104, during the training of the printed circuit board defect detection model, the Adam optimizer is used and the learning rate is set to 0.001.

[0059] On the other hand, printed circuit board defect detection based on cross-scale multi-aggregation includes:

[0060] An image preprocessing module is used to obtain a printed circuit board defect image, preprocess the printed circuit board defect image, and obtain a preprocessed printed circuit board defect image;

[0061] A feature extraction module is used to build a printed circuit board defect detection model using the YOLOv8 network; the cross-stage partial dual aggregation network CDA-net is used as the feature extraction network of the YOLOv8 network; the feature information in the printed circuit board defect image is extracted through the CDA module in CDA-net, and the feature map processed by the CDA module is output;

[0062] The feature fusion module is used to use the residual gated separation feature pyramid network RGS-FPN as the feature fusion network of the YOLOv8 network, and perform multi-scale feature fusion on the feature map processed by the CDA module through the RGS module in RGS-FPN to obtain the feature map processed by the RGS module;

[0063] The model training module is used to input the feature map processed by the RGS module into the anchor-free YOLOv8 detection head, and use the single-stage target detection algorithm to train the printed circuit board defect detection model to obtain a trained printed circuit board defect detection model;

[0064] The defect detection module is used to input the preprocessed printed circuit board image to be detected into the trained printing defect detection model to obtain the defect detection result.

[0065] The present invention adopts the above technical solution and has the following beneficial effects:

[0066] (1) Improved detection accuracy: By introducing the feature extraction network CDA-net based on the YOLOv8 network and the feature fusion network RGS-FPN for feature extraction and fusion, the accuracy of printed circuit board defect image detection was significantly improved;

[0067] (2) Enhanced model robustness: By using the cross-stage partial dual aggregation network (CDA-net) and the residual gated segregated feature pyramid network (RGS-FPN), the model can better handle features of different scales and improve the detection ability of complex patterns and tiny defects, especially for defects such as open circuits, short circuits, mouse bites, and stray defects;

[0068] (3) Improved detection speed: By using a single-stage target detection network for training, the model can process a large number of images more quickly and meet the needs of large-scale production. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 A printed circuit board defect detection method based on cross-scale multi-aggregation according to an example of the present invention;

[0070] Figure 2 The CDA-net structure diagram of the present invention is an example;

[0071] Figure 3 It is a CDA structure diagram of an example of the present invention;

[0072] Figure 4 It is a structural diagram of RGS-FPN of an example of the present invention;

[0073] Figure 5 The RGS structure diagram of the present invention example;

[0074] Figure 6 It is a diagram showing the detection effect of six defect types of printed circuit boards according to an example of the present invention;

[0075] Figure 7 This is a structural block diagram of a printed circuit board defect detection device based on deep learning according to an embodiment of the present invention. DETAILED DESCRIPTION

[0076] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0077] like Figure 1 As shown, the present invention provides a printed circuit board defect detection method based on cross-scale multiple aggregation, which includes the following steps.

[0078] S101, acquiring a printed circuit board defect image, and preprocessing the printed circuit board defect image to obtain a preprocessed printed circuit board defect image.

[0079] Specifically, the preprocessing includes mosaic enhancement (Mosaic), mixed enhancement (Mixup), random perspective and color perturbation (HSV augment) on the defective image.

[0080] S102, using the YOLOv8 network to build a printed circuit board defect detection model; using the cross-stage partial dual aggregation network CDA-net as the feature extraction network of the YOLOv8 network; extracting feature information from the printed circuit board defect image through the CDA module in CDA-net, and outputting a feature map processed by the CDA module.

[0081] Specifically, Figure 2 As shown, the CDA-net includes an embedding layer module, a first layer CDA module, a second layer CDA module, a third layer CDA module, a fourth layer CDA module and an SPPF module which are connected in sequence;

[0082] The embedding layer module converts the size of the input PCB defect image into Adjust to ;

[0083] The first-level CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0084] The second layer CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0085] The third layer CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0086] The fourth layer CDA module extracts The features of the image are downsampled to obtain the feature map ;

[0087] in, is the height of the input PCB defect image, is the width of the input PCB defect image, is the number of channels of the input printed circuit board defect image;

[0088] The SPPF module uses spatial pyramid pooling on the 16 outputs of the fourth layer CDA module. Extract features on the channels to capture the details of the target object at different scales. Figure 3 As shown, the CDA module includes a feature extraction part and a downsampling part;

[0089] The feature extraction part, the calculation process is as follows:

[0090] ;

[0091] ;

[0092] ;

[0093] ;

[0094] ;

[0095] ;

[0096] in, Represents a dimension concatenation operation; represents the addition operation, Indicates Pointwise convolution operation; Indicates group convolution operation; Indicates that the feature map is divided in the channel dimension; Indicates convolution operation, batch normalization operation and silu activation function operation; A feature map representing the input; , , , and Represents the intermediate feature map; Represents the feature map of the final output;

[0097] Feature Map From the input feature map go through The module is obtained, then Divide it into half according to the number of channels, and one part passes through Module Get , and the other part passed After the module, group convolution and pointwise convolution are performed in parallel to extract the features and then added together to obtain ,Will and Combining on the channel dimension , and finally go through The module obtains the feature map ;

[0098] The downsampling part is calculated as follows:

[0099] ;

[0100] ;

[0101] ;

[0102] ;

[0103] ;

[0104] in, Represents batch normal batch normalization operation, represents the activation function operation, Indicates a depth-wise separable convolution operation , batch normalization operation and silu activation function operation, represents a full connection operation, represents the average pooling operation, represents the input feature map, , , , , represents the intermediate feature map, Represents the feature map of the final output.

[0105] Feature Map From the input feature map go through The module gets Parallel Pass 3 3 Module and 3 3 Modules are combined in the channel dimension to obtain feature maps , feature map After batch normalization and The activation function is obtained , feature map After average pooling and two fully connected layers, we get , and finally and Multiply them to get the final output feature map z.

[0106] S103, using the residual gated separation feature pyramid network RGS-FPN as the feature fusion network of the YOLOv8 network, and performing multi-scale feature fusion on the feature map processed by the CDA module through the RGS module in the RGS-FPN to obtain the feature map processed by the RGS module.

[0107] like Figure 4 As shown, the calculation process of multi-scale feature fusion through the RGS module in RGS-FPN is as follows:

[0108] ;

[0109] ;

[0110] ;

[0111] ;

[0112] ;

[0113] ;

[0114] ;

[0115] ;

[0116] ;

[0117] ;

[0118] in, , , , is the input feature map, , , , is the output feature map, , , , , , is the intermediate feature map, Indicates multi-scale feature fusion through the RGS module. Indicates that the feature information of the feature map is extracted through the CDA module.

[0119] Said Is , , After the dimension splicing operation and then through the RGS module;

[0120] Said Is , , After the dimension splicing operation and then through the RGS module;

[0121] Said Is , , Obtained through the CDA module;

[0122] Said Is , After the dimension splicing operation and then through the CDA module;

[0123] Said Is , and Added, dimensionally spliced and and Added and then obtained by the CDA module;

[0124] Said It is spliced ​​by dimensions and and Added and then obtained by the CDA module;

[0125] Said Depend on and Added together;

[0126] Said Is and Added together;

[0127] Said Is and After the dimension splicing operation and then through the RGS module;

[0128] Said Is and It is obtained after the dimension splicing operation and then the RGS module.

[0129] Specifically, Figure 5 As shown, the RGS module divides the input feature map into multiple regions, each of which is set as a token. Each token generates a unique gating signal based on the features of its nearest neighbors, and achieves more efficient signal flow through residual separation. The formula is as follows:

[0130] ;

[0131] ;

[0132] ;

[0133] ;

[0134] ;

[0135] in, Indicates linear operation (linear activation), Indicates a partial convolution operation. It means dividing the feature map in the channel dimension. represents the input feature map, , , , represents the intermediate feature map, Represents the feature map of the final output.

[0136] The RGS module first converts the shallow feature map Dividing on the channel dimension , After partial convolution, feature extraction is completed efficiently, generating ; Processing is done in two parallel paths: In the first path, First it passes through the linear layer, then through the depthwise separable convolutional layer and the silu activation function; in the second path, Directly pass through the linear layer; multiply the results of the two paths and pass through the linear layer with Add; this process will be repeated N times, and the output is finally ; Finally, and After adding, and Perform dimension splicing operation to obtain the final output feature map .

[0137] S104, inputting the feature map processed by the RGS module into the anchor-free YOLOv8 detection head, and using the single-stage target detection algorithm to train the printed circuit board defect detection model to obtain a trained printed circuit board defect detection model;

[0138] Specifically, during the training of the printed circuit board defect detection model, the Adam optimizer was used and the learning rate was set to 0.001.

[0139] S105, inputting the preprocessed printed circuit board defect image into a trained printing defect detection model to obtain a defect detection result.

[0140] The following is an ablation experiment on the printed circuit board defect detection model, and the printed circuit board detection effect is analyzed and counted to understand the performance advantages of the printed circuit board defect detection method. The results are shown in Table 1. All data in Table 1 are in percentage (%). CSPdarknet53 is the feature extraction network of YOLOv8, PAN-FPN is the feature fusion network of YOLOv8, CDA-net is a cross-stage partial dual aggregation network, and RGS-FPN is a residual gated separation feature pyramid network. Part of the printed circuit board defect map is input into the printed circuit board defect detection model for ablation experiments, as shown in Figure 6 As shown, including: Missing hole, Mouse bite, Open circuit, Short circuit, Spur, Spurious copper. Each colored box in the reasoning effect diagram indicates that the printed circuit board defect detection model (CSMA-detector) has identified a specific defect type.

[0141] Table 1 Comparison of module ablation experiment results

[0142]

[0143] As shown in Table 1, when CDA-net is added to the YOLOv8 baseline network alone, the mAP50 reaches 94.5% and the precision reaches 96.3%, which is 1.9% higher than before CDA-net is added and the precision is 1.2% higher.

[0144] As shown in Table 1, when CDA-net and RGS-FPN and their RGS modules are added to the YOLOv8 baseline network, the mAP50 reaches 95.6% and the precision reaches 97.1%. Compared with only CDA-net added to the YOLOv8 baseline network, the mAP50 is improved by 1.1% and the precision is improved by 0.8%. The above ablation experiments verify that the performance of the printed circuit board defect detection method proposed in the embodiment of the present application is superior.

[0145] like Figure 7 As shown, this embodiment also discloses a printed circuit board defect detection device based on cross-scale multi-aggregation, including:

[0146] An image preprocessing module 701 is used to obtain a printed circuit board defect image, and preprocess the printed circuit board defect image to obtain a preprocessed printed circuit board defect image;

[0147] The feature extraction module 702 is used to construct a printed circuit board defect detection model using the YOLOv8 network; use the cross-stage partial dual aggregation network CDA-net as the feature extraction network of the YOLOv8 network; extract feature information from the printed circuit board defect image through the CDA module in the CDA-net, and output a feature map processed by the CDA module;

[0148] A feature fusion module 703 is used to use the residual gated separation feature pyramid network RGS-FPN as a feature fusion network of the YOLOv8 network, and perform multi-scale feature fusion on the feature map processed by the CDA module through the RGS module in the RGS-FPN to obtain a feature map processed by the RGS module;

[0149] The model training module 704 is used to input the feature map processed by the RGS module into the anchor-free YOLOv8 detection head, and use the single-stage target detection algorithm to train the printed circuit board defect detection model to obtain a trained printed circuit board defect detection model;

[0150] The defect detection module 705 is used to input the pre-processed printed circuit board image to be detected into the trained printing defect detection model to obtain the defect detection result.

[0151] The specific implementation of printed circuit board defect detection based on cross-scale multiple aggregation is the same as the printed circuit board defect detection method based on cross-scale multiple aggregation, and will not be repeated in this embodiment.

[0152] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.

Claims

1. A printed circuit board defect detection method based on cross-scale multi-aggregation, characterized in that: The following steps are involved: S101, acquiring a printed circuit board defect image, and preprocessing the printed circuit board defect image to obtain a preprocessed printed circuit board defect image; S102, using the YOLOv8 network to build a printed circuit board defect detection model; using the cross-stage partial dual aggregation network CDA-net as the feature extraction network of the YOLOv8 network; extracting feature information from the printed circuit board defect image through the CDA module in CDA-net, and outputting a feature map processed by the CDA module; S103, using the residual gated separation feature pyramid network RGS-FPN as the feature fusion network of the YOLOv8 network, and performing multi-scale feature fusion on the feature map processed by the CDA module through the RGS module in the RGS-FPN to obtain a feature map processed by the RGS module; S104, inputting the feature map processed by the RGS module into the anchor-free YOLOv8 detection head, and using a single-stage target detection algorithm to train the printed circuit board defect detection model to obtain a trained printed circuit board defect detection model; S105, inputting the preprocessed printed circuit board image to be inspected into a trained printing defect detection model to obtain a defect detection result.

2. The printed circuit board defect detection method based on cross-scale multi-aggregation according to claim 1 is characterized in that: In S101 and S105, the preprocessing specifically includes: The image is subjected to at least one of mosaic enhancement processing, mixed enhancement processing, random disturbance processing and color disturbance processing.

3. The printed circuit board defect detection method based on cross-scale multi-aggregation according to claim 1 is characterized in that: In S102, the CDA-net includes an embedded layer module, a first layer CDA module, a second layer CDA module, a third layer CDA module, a fourth layer CDA module and an SPPF module connected in sequence; The embedding layer module converts the size of the input PCB defect image into Adjust to ; The first-level CDA module extracts The features of the image are downsampled to obtain the feature map ; The second layer CDA module extracts The features of the image are downsampled to obtain the feature map ; The third layer CDA module extracts The features of the image are downsampled to obtain the feature map ; The fourth layer CDA module extracts The features of the image are downsampled to obtain the feature map ; in, is the height of the input PCB defect image, is the width of the printed circuit board defect image input as input image, is the number of channels of the input printed circuit board defect image; The SPPF module uses spatial pyramid pooling on the 16 outputs of the fourth layer CDA module. Features are extracted from channels to capture detailed information of the target object at different scales.

4. The printed circuit board defect detection method based on cross-scale multi-aggregation according to claim 3 is characterized in that: The CDA module includes a feature extraction part and a downsampling part; The feature extraction part, the calculation process is as follows: ; ; ; ; ; ; in, Represents a dimension concatenation operation; represents the addition operation, Indicates Pointwise convolution operation; Indicates group convolution operation; Indicates that the feature map is divided in the channel dimension; Indicates convolution operation, batch normalization operation and silu activation function operation; A feature map representing the input; , , , and Represents the intermediate feature map; Represents the feature map of the final output; The downsampling part is calculated as follows: ; ; ; ; ; in, Represents batch normalization operation, represents the activation function operation, Indicates a depth-wise separable convolution operation , batch normalization operation and silu activation function operation, represents a full connection operation, represents the average pooling operation, represents the input feature map, , , , , represents the intermediate feature map, Represents the feature map of the final output.

5. The printed circuit board defect detection method based on cross-scale multi-aggregation according to claim 4 is characterized in that: In S103, the calculation process of multi-scale feature fusion by the RGS module in RGS-FPN is as follows: ; ; ; ; ; ; ; ; ; ; in, , , , is the input feature map, , , , is the output feature map, , , , , , is the intermediate feature map, Indicates multi-scale feature fusion through the RGS module. Indicates that the feature information of the feature map is extracted through the CDA module.

6. The printed circuit board defect detection method based on cross-scale multi-aggregation according to claim 5 is characterized in that: The RGS module divides the input feature map into multiple regions, each of which is set as a token. Each token generates a unique gating signal based on the features of its nearest neighbors and achieves more efficient signal flow through residual separation. The formula is as follows: ; ; ; ; ; in, Indicates linear operation. Indicates a partial convolution operation. It means dividing the feature map in the channel dimension. represents the input feature map, , , , represents the intermediate feature map, Represents the feature map of the final output.

7. The printed circuit board defect detection method based on cross-scale multi-aggregation according to claim 1 is characterized in that: In S104, during the training of the printed circuit board defect detection model, the Adam optimizer is used and the learning rate is set to 0.

001.

8. A printed circuit board defect detection device based on cross-scale multi-aggregation, comprising the following: An image preprocessing module is used to obtain a printed circuit board defect image, preprocess the printed circuit board defect image, and obtain a preprocessed printed circuit board defect image; A feature extraction module is used to build a printed circuit board defect detection model using the YOLOv8 network; the cross-stage partial dual aggregation network CDA-net is used as the feature extraction network of the YOLOv8 network; the feature information in the printed circuit board defect image is extracted through the CDA module in CDA-net, and the feature map processed by the CDA module is output; The feature fusion module is used to use the residual gated separation feature pyramid network RGS-FPN as the feature fusion network of the YOLOv8 network, and perform multi-scale feature fusion on the feature map processed by the CDA module through the RGS module in RGS-FPN to obtain the feature map processed by the RGS module; The model training module is used to input the feature map processed by the RGS module into the anchor-free YOLOv8 detection head, and use the single-stage target detection algorithm to train the printed circuit board defect detection model to obtain a trained printed circuit board defect detection model; The defect detection module is used to input the preprocessed printed circuit board image to be detected into the trained printing defect detection model to obtain the defect detection result.

Citation Information

Patent Citations

  • Neural network for surface defect detection of printed circuit board and training method

    CN117350966A

  • Rainy day insulator defect detection method based on improved MS-PReNet and GAM-YOLOv7

    CN117422689A

  • Optical substrate surface defect detection method based on improved YOLOv8n model

    CN118297924A

  • Wafer defect detection method and device based on lightweight target detection model

    CN118334032A

  • Cross-scale defect detection method based on deep learning

    US20230306577A1

Cited By

  • Lightweight small target defect detection method for precision electronic product

    CN119672439A

  • Motor casing die casting surface quality detection method and system

    CN119715525A

  • Defect detection method, device and equipment for printed circuit board and storage medium

    CN119941622A