A PCB board defect detection method based on re-verification detection

By introducing MobileNet structure into the SSD network, and combining primary and secondary detection, adaptively adjusting the detection threshold, the problem of PCB board defect detection under the complex background in the prior art is solved, and the effect of high accuracy and real-time detection is achieved.

CN114387230BActive Publication Date: 2025-04-29UNIV OF SCI & TECH BEIJING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111632258.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-28
Publication Date
2025-04-29
Estimated Expiration
2041-12-28

AI Technical Summary

Technical Problem

The prior art is difficult to complete PCB board defect detection within the allowable error range and under complex backgrounds, and cannot meet the requirements of industrial real-time detection.

Method used

Using a re-verification detection method, the SSD network is improved to a MobileNet structure, combining primary and secondary detection, the detection threshold is adaptively adjusted to form adaptively optimized closed-loop feedback to improve detection accuracy.

Benefits of technology

It realizes that the accuracy of PCB board defect detection reaches ≥92% at a single frame detection time of no more than 30ms, meeting the needs of industrial real-time detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114387230B_ABST
    Figure CN114387230B_ABST
Patent Text Reader

Abstract

The invention discloses a PCB board defect detection method based on re-verification detection, including: collecting PCB board images, constructing training sets and test sets; citing MobileNet in SSD, improving SSD, and using the training set to train the improved network to obtain a PCB board defect detection model; performing primary detection on the PCB board images in the test set; performing secondary detection on defective samples detected by the primary detection; adaptively adjusting the detection threshold according to the detection results of the primary detection and the secondary detection, in the cyclic training, using the error as negative feedback to form an adaptive optimization closed-loop feedback of the model training, increasing the training weight of the inconsistent results of the secondary detection and the primary detection, and finally obtaining the optimal detection model when the error converges, and using the optimal detection model to realize defect detection. The invention can accurately detect PCB board defects and prevent overfitting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of target detection and defect detection, and in particular to a PCB (printed circuit board) board defect detection method based on re-verification detection. Background Art

[0002] PCB (printed circuit board) is one of the important components of the electronics industry. Almost every electronic device, from electronic watches and calculators to computers, communication electronic equipment, and military weapon systems, as long as there are electronic components such as integrated circuits, must use printed circuit boards to make electrical interconnections between the components.

[0003] The printed circuit board consists of an insulating base plate, connecting wires and pads for assembling and welding electronic components, and has the dual functions of a conductive circuit and an insulating base plate. The welding quality of onboard components directly affects the performance and reliability of electronic products. At present, defect detection and analysis based on manual inspection are prone to missed detection and false detection due to subjective factors and labor intensity. The detection speed and quality are difficult to meet the needs, and cannot adapt to the needs of mass production and high-precision and high-speed defect detection in modern processes.

[0004] Therefore, proposing a new and effective PCB board defect detection method is the only way to improve detection efficiency, enhance detection accuracy, and ensure the reliability of PCB board use.

[0005] Existing PCB defect detection algorithms based on image processing can be summarized into three types: non-reference verification method, reference comparison method and hybrid defect detection algorithm:

[0006] (1) PCB defect detection algorithms based on non-reference verification methods detect PCB defects by detecting whether the PCB meets the design specifications, and regard anomalies that do not meet the design specifications as defects. The advantage of this type of algorithm is that it can accurately detect some common PCB defects without using reference images, such as short circuits, open circuits, and whether the line width and line spacing are in compliance with the rules, thereby greatly reducing storage space. The disadvantage is that the detection algorithm is relatively complex, the amount of calculation is large, and the rule mode must be designed in advance. Detection can only be performed according to the set design rules, which has certain limitations in practical applications.

[0007] (2) The reference comparison algorithm first creates a standard image, called a reference image, and then compares the PCB board to be inspected with the reference image to identify the defect type in the PCB board. This type of feature extraction method requires manual design, and the extracted features have limitations. For defects of many types, it is difficult to achieve accurate classification. The reference method is prone to miss some small errors, and the non-reference method also has some shortcomings in detecting global faults. In order to effectively solve this problem, the hybrid PCB defect detection algorithm combines the advantages of these two methods, comprehensively uses information from all aspects of the PCB image to perform defect inspection, and has strong anti-interference ability, but the algorithm is relatively complex. This method is applied in actual production, the detection speed is slow, and it cannot meet the requirements of industrial real-time detection and is insufficiently adaptable.

[0008] (3) Hybrid detection algorithm refers to the use of deep learning neural networks for feature learning to identify and classify chip defects. Since 2014, deep learning-based algorithms have made significant progress in target detection. R-CNN (Region-CNN) series, YOLO (You Only Look Once), SSD (Single Shot MultiBox Detector), R-FCN (Region-based Fully Convolutional Networks) and other excellent target detection methods have shown obvious advantages in defect detection.

[0009] But in general, the existing PCB board defect detection methods are difficult to complete image-based PCB board defect detection under complex backgrounds within the allowable error range. Therefore, it is urgent to develop a new detection method. Summary of the invention

[0010] The present invention provides a PCB board defect detection method based on re-verification detection to solve the problem in the prior art that it is difficult to complete PCB board defect detection under complex background within an allowable error range.

[0011] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0012] On the one hand, the present invention provides a PCB board defect detection method based on re-verification detection, comprising:

[0013] Collecting PCB board images, preprocessing the collected PCB board images, and annotating the preprocessed PCB board images with preset types of defects to construct an original image set; performing data augmentation on the original image set to obtain an augmented image set, and dividing the augmented image set into a training set and a test set;

[0014] The MobileNet network structure is referenced in the SSD network to improve the SSD network, and the improved network is trained using the training set to obtain a PCB board defect detection model;

[0015] Performing a primary inspection on the PCB board images in the test set based on the PCB board defect detection model;

[0016] Based on the PCB board defect detection model, the defective samples detected by the first-level detection are subjected to the second-level detection;

[0017] Adaptively adjust the detection threshold according to the detection results of the first-level detection and the second-level detection. In the cyclic training, the error is used as negative feedback to form an adaptive optimization closed-loop feedback for model training. The training weights of the inconsistent results of the second-level detection and the first-level detection are increased, and finally the optimal detection model is obtained when the error converges.

[0018] Based on the optimal detection model, defect detection is performed on the PCB board to be inspected according to the image of the PCB board to be inspected.

[0019] Further, the collecting of PCB board images, preprocessing of the collected PCB board images, and labeling of defects of preset types on the preprocessed PCB board images to construct an original image set include:

[0020] Use a visible light camera to capture images of the PCB board; when capturing images of the PCB board, the chip is required to occupy no less than 60% of the area of ​​the entire image, and the identification number and pins are clearly visible;

[0021] Adopting the straight line detection algorithm, using the detected and generated complete line segments, the collected PCB board images are rotated, scaled and aligned in a unified manner; the PCB board images are enhanced by using the binary filtering method; and then the images are binarized to generate black and white images corresponding to the PCB board images for easy detection;

[0022] The generated black-and-white images are annotated with preset types of defects to construct the original image set.

[0023] Furthermore, the straight line detection algorithm is a CannyLines straight line detection algorithm.

[0024] Furthermore, the tool used to label the generated black and white image with a preset type of defect is labelImg software.

[0025] Furthermore, data augmentation is performed on the original image set to obtain an augmented image set, including:

[0026] The defective images are cut into PNG images with alpha channels. The original image set is oversampled and expanded by randomly pasting maps on the background of the original image set. At the same time, the corresponding annotation files are regenerated according to the positions of the random maps to obtain the augmented image set.

[0027] Furthermore, the MobileNet network structure is referenced in the SSD network to improve the SSD network, including:

[0028] The backbone part of the original SSD300 basic network is replaced from VGG16 to MobileNet v1, 8 convolutional layers are added after the conv13 of Mobilenet, and then a total of 6 layers are extracted for detection.

[0029] Further, the improved network is trained using the training set, including:

[0030] On the CPU, the improved network is trained using the training set; and the NMS of the post-processing part of the improved network is replaced by soft-NMS; during detection, all boxes with IOU greater than the threshold are not directly deleted, but their confidence is reduced, and only no more than 10 detection boxes with higher confidence are retained.

[0031] Furthermore, before inputting the PCB board image in the image set into the PCB board defect detection model, the method further includes:

[0032] The original 1920×1080 sample images in the image set are cropped to 1500×900 size one by one.

[0033] Furthermore, the step of performing a secondary test on the defective samples detected by the primary test includes:

[0034] On the GPU, the PCB board defect detection model is used to perform secondary detection on the PCB board image with the detection frame in the primary detection, and the NMS is removed in the post-processing part of the detection algorithm.

[0035] Furthermore, the detection threshold is adaptively adjusted according to the detection results of the primary detection and the secondary detection, and in the cyclic training, the error is used as negative feedback to form an adaptive optimization closed-loop feedback of the model training, and the training weight of the inconsistent results of the secondary detection and the primary detection is increased, including:

[0036] The detection threshold is adaptively adjusted according to the accuracy of the first-level detection and the second-level detection on the test set. If the missed detection rate is high, the threshold is increased accordingly. If the false detection rate is high, the threshold is lowered accordingly. In the cyclic training, the error is used as negative feedback to form an adaptive optimization closed-loop feedback for model training, increasing the training weights of "false defect samples", "inconsistent defect types" and "non-defective samples" that appear after the second-level detection.

[0037] On the other hand, the present invention further provides an electronic device, comprising a processor and a memory; wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the above method.

[0038] In yet another aspect, the present invention further provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the instruction is loaded and executed by a processor to implement the above method.

[0039] The beneficial effects brought about by the technical solution provided by the present invention include at least:

[0040] 1. The PCB board defect detection method based on re-verification detection provided by the present invention can realize the detection of PCB board defects at a speed of no more than 30ms for a single frame detection time, and the accuracy rate is ≥92%.

[0041] 2. When the amount of positive sample data of PCB board defect images is too small, the new data augmentation method proposed in the present invention can effectively expand the data set, thereby preventing the occurrence of overfitting. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 It is a schematic diagram of the execution flow of the PCB board defect detection method based on re-verification detection provided by the first embodiment of the present invention;

[0044] Figure 2 It is a schematic diagram of the execution flow of a PCB board defect detection method based on re-verification detection provided by the second embodiment of the present invention;

[0045] Figure 3 is a network structure diagram of a PCB board defect detection model provided by a second embodiment of the present invention;

[0046] Figure 4 This is a schematic diagram of the difference between soft-NMS and NMS. DETAILED DESCRIPTION

[0047] To make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.

[0048] First embodiment

[0049] This embodiment provides a PCB board defect detection method based on re-verification detection, which can be implemented by an electronic device. The execution process of the method is as follows: Figure 1 As shown, the following steps are included:

[0050] S1, collecting PCB board images, preprocessing the collected PCB board images, and marking the defects of preset types on the preprocessed PCB board images to construct an original image set; performing data augmentation on the original image set to obtain an augmented image set, and dividing the augmented image set into a training set and a test set;

[0051] S2, reference the MobileNet network structure in the SSD network, improve the SSD network, and use the training set to train the improved network to obtain a PCB board defect detection model;

[0052] S3, performing primary inspection on the PCB images in the test set based on the PCB defect detection model;

[0053] S4, based on the PCB board defect detection model, the defective samples detected by the first-level detection are subjected to the second-level detection;

[0054] S5, adaptively adjust the detection threshold according to the detection results of the first-level detection and the second-level detection, use the error as negative feedback in the cyclic training, constitute an adaptive optimization closed-loop feedback of the model training, increase the training weight of the inconsistent results of the second-level detection and the first-level detection, and finally obtain the optimal detection model when the error converges;

[0055] S6, based on the optimal detection model, performing defect detection on the PCB board according to the image of the PCB board to be detected.

[0056] The PCB board defect detection method based on re-verification detection of this embodiment collects PCB board image data and organizes it into an original data set after data preprocessing and annotation. The training set image is input into the improved lightweight detection model Mobilenet-SSD300 to obtain a first-level detection model. By optimizing and correcting the first-level detection model, the final second-level detection model is obtained. After that, according to the verification of the detection model by the test set, a targeted detection model adaptive threshold intelligent target screening scheme is proposed, the threshold parameters are adjusted autonomously, and the trained detection model is optimized, thereby realizing accurate identification of PCB board defects.

[0057] Second embodiment

[0058] This embodiment provides a PCB board defect detection method based on re-verification detection, which can be implemented by an electronic device. The execution process of the method is as follows: Figure 2 As shown, the following steps are included:

[0059] S1, collecting PCB board images, preprocessing the collected PCB board images, and marking the defects of preset types on the preprocessed PCB board images to construct an original image set; performing data augmentation on the original image set to obtain an augmented image set, and dividing the augmented image set into a training set and a test set;

[0060] Specifically, in this embodiment, the above S1 includes the following steps:

[0061] S11, using a 1080P visible light camera to capture images of the PCB board; when capturing the PCB board image, the chip is required to occupy no less than 60% of the area of ​​the entire image, and details such as identification numbers and pins are clearly visible;

[0062] S12, using the CannyLines straight line detection algorithm, uses the detected and generated complete line segments to perform unified processing of rotation, scaling and alignment on the collected PCB board images; uses the binary filtering method to perform image enhancement processing on the PCB board image, while protecting the sharp contour edge features of each part of the PCB board image, filtering out the noise that may be generated during the shooting process; then the image is binarized to generate a black and white image corresponding to the PCB board image for easy detection;

[0063] S13, using labelImg software to annotate the generated black-and-white images, classify the defects into five categories: open, short, mousebite, spur, and pin-hole, and annotate them separately to construct the original image set;

[0064] S14, the five types of defect image modules with typical characteristics in the image sample set are cut into PNG images with alpha channels, and the sample set is expanded by oversampling by pasting (random size and position) in the background of the original image set, and the corresponding annotation files are regenerated according to the position of the random map; while increasing the number of samples, a large amount of annotation resources are saved, and the reliability of model training is improved. Finally, 80% of the augmented data set is randomly selected as the training set, and the rest is used as the test set for verifying the model;

[0065] S15, cropping the original 1920×1080 sample images in the image set to a size of 1500×900 one by one, that is, cropping 90 pixels from the top and bottom, and 210 pixels from the left and right.

[0066] S2, reference the MobileNet network structure in the SSD network, improve the SSD network, and use the training set to train the improved network to obtain a PCB board defect detection model;

[0067] Specifically, in this embodiment, the above S2 includes the following steps:

[0068] S21, replace the backbone part of the original SSD300 basic network from VGG16 to MobileNet v1, add 8 convolutional layers after Mobilenet's conv13, and then extract a total of 6 layers for detection, thereby reducing the model structure and model parameters. The network structure diagram is shown in the figure Figure 3 shown.

[0069] S22, the cropped 1500×900 image samples are input into the network instead of the original 1920×1080 image samples for detection. On the one hand, the defect is relatively small compared to the entire chip, and a small amount of cropping will not have a big impact; on the other hand, based on the characteristics of SSD300, the original image of 1500×900 size can be more directly predicted at multiple scales, highlighting the defect features, and improving the detection accuracy to a certain extent.

[0070] S23, replace the NMS (non-maximum suppression) in the post-processing part with soft-NMS, such as Figure 4 As shown. The threshold of NMS needs to be determined manually. If the threshold is set too low, it will result in missed detections, and if it is set too high, it will result in false detections. To address the above two problems, this embodiment introduces soft-NMS, which does not directly delete all boxes whose IOU (intersection over union) is greater than the threshold, but reduces their confidence, and only retains no more than 10 detection boxes with higher confidence.

[0071] S3, performing primary inspection on the PCB images in the test set based on the PCB defect detection model;

[0072] It should be noted that, for model training and first-level detection, this embodiment is implemented on the CPU.

[0073] S4, based on the PCB board defect detection model, the defective samples detected by the first-level detection are subjected to the second-level detection;

[0074] It should be noted that, in this embodiment, the above S4 specifically is: using Mobilenet-SSD300 on the GPU to correct the primary detection model. The specific process is: performing secondary detection on the image with the detection box in the primary detection and removing NMS in the post-processing part of the detection algorithm to improve the training efficiency.

[0075] S5, adaptively adjust the detection threshold according to the detection results of the first-level detection and the second-level detection, use the error as negative feedback in the cyclic training, constitute an adaptive optimization closed-loop feedback of the model training, increase the training weight of the inconsistent results of the second-level detection and the first-level detection, and finally obtain the optimal detection model when the error converges;

[0076] Specifically, in this embodiment, the implementation process of the above S5 is as follows:

[0077] According to the accuracy of the first-level detection model and the second-level detection model for the test set, the detection threshold is adaptively adjusted. If the missed detection rate is high, the threshold is appropriately increased; if the false detection rate is high, the threshold is lowered. In the cyclic training, the error is used as negative feedback to form an adaptive optimization closed-loop feedback for model training, and the training weights of "false defect samples", "inconsistent defect types" and "non-defective samples" that appear after the second verification are increased. Finally, the optimal model is obtained when the error converges, realizing the PCB board defect detection function based on re-verification detection.

[0078] S6, based on the optimal detection model, performing defect detection on the PCB board according to the image of the PCB board to be detected.

[0079] In summary, the PCB board defect detection method based on re-verification detection in this embodiment collects PCB board image data through a visible light camera, and organizes it into an original data set (divided into a training set and a test set) after data preprocessing and annotation. The five types of defect image modules with typical characteristics in the image sample set are intercepted into PNG pictures with alpha channels. The sample set is expanded by oversampling by randomly pasting in the background of the original image set, and the corresponding annotation file is regenerated according to the position of the random map. While increasing the number of samples, a large amount of annotation resources are saved, and the reliability of model training is improved.

[0080] In the CPU, the training set images are input into the improved lightweight detection model Mobilenet-SSD300 to obtain the first-level detection model. The first-level detection model is optimized and corrected by Mobilenet-SSD300 on the GPU to obtain the final second-level detection model. In this way, the same detection network can be customized according to the hardware characteristics of the CPU and GPU and the different detection focuses of the two detection stages. The internal weights of the model are adjusted using the detection results to achieve the optimization purpose of replica collaboration. After that, based on the verification of the detection model by the test set, a targeted detection model adaptive threshold intelligent target screening scheme is proposed, the threshold parameters are adjusted autonomously, and the trained detection model is optimized to achieve the identification of PCB board defects.

[0081] Third embodiment

[0082] This embodiment provides an electronic device, which includes a processor and a memory; wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the method of the above embodiment.

[0083] The electronic device may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) and one or more memories, wherein the memory stores at least one instruction, and the instruction is loaded by the processor to execute the above method.

[0084] Fourth embodiment

[0085] This embodiment provides a computer-readable storage medium, which stores at least one instruction, and the instruction is loaded and executed by a processor to implement the method of the above embodiment. The computer-readable storage medium can be a ROM, a random access memory, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The instructions stored therein can be loaded by a processor in a terminal to execute the above method.

[0086] In addition, it should be noted that the present invention can be provided as a method, an apparatus or a computer program product. Therefore, the embodiments of the present invention can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the embodiments of the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.

[0087] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0088] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0089] It should also be noted that, in this article, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.

[0090] Finally, it should be noted that the above is a preferred embodiment of the present invention. It should be pointed out that although the preferred embodiment of the present invention has been described, for those skilled in the art, once the basic creative concept of the present invention is known, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be regarded as the protection scope of the present invention. Therefore, the attached claims are intended to be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the embodiments of the present invention.

Claims

1. A PCB board defect detection method based on re-verification detection, characterized in that: include: Collect PCB board images, pre-process the collected PCB board images, and mark the pre-processed PCB board images with preset types of defects to construct an original image set; Performing data augmentation on the original image set to obtain an augmented image set, and dividing the augmented image set into a training set and a test set; The MobileNet network structure is referenced in the SSD network to improve the SSD network, and the improved network is trained using the training set to obtain a PCB board defect detection model; Performing a primary inspection on the PCB board images in the test set based on the PCB board defect detection model; Based on the PCB board defect detection model, the defective samples detected by the first-level detection are subjected to the second-level detection; Adaptively adjust the detection threshold according to the detection results of the first-level detection and the second-level detection. In the cyclic training, the error is used as negative feedback to form an adaptive optimization closed-loop feedback for model training. The training weights of the inconsistent results of the second-level detection and the first-level detection are increased, and finally the optimal detection model is obtained when the error converges. Based on the optimal detection model, defect detection is performed on the PCB board to be inspected according to the image of the PCB board to be inspected; The detection threshold is adaptively adjusted according to the detection results of the primary detection and the secondary detection, and in the cyclic training, the error is used as negative feedback to form an adaptive optimization closed-loop feedback of the model training, and the training weight of the inconsistent results of the secondary detection and the primary detection is increased, including: According to the accuracy of the first-level detection and the second-level detection on the test set, the detection threshold is adaptively adjusted. If the missed detection rate is high, the threshold is increased accordingly. If the false detection rate is high, the threshold is lowered accordingly. In the cyclic training, the error is used as negative feedback to form an adaptive optimization closed-loop feedback for model training, increasing the training weights of "false defect samples", "inconsistent defect types" and "no-defect samples" that appear after the second-level detection.

2. The PCB board defect detection method based on re-verification detection as claimed in claim 1, characterized in that: The collecting of PCB images, preprocessing of the collected PCB images, and labeling of defects of preset types on the preprocessed PCB images to construct an original image set include: Use a visible light camera to capture images of the PCB board; when capturing images of the PCB board, the chip is required to occupy no less than 60% of the area of ​​the entire image, and the identification number and pins are clearly visible; Adopting the straight line detection algorithm, using the detected and generated complete line segments, the collected PCB board images are rotated, scaled and aligned in a unified manner; the PCB board images are enhanced by using the binary filtering method; and then the images are binarized to generate black and white images corresponding to the PCB board images for easy detection; The generated black-and-white images are annotated with preset types of defects to construct the original image set.

3. The PCB board defect detection method based on re-verification detection as claimed in claim 2, characterized in that: The straight line detection algorithm is the CannyLines straight line detection algorithm.

4. The PCB board defect detection method based on re-verification detection as claimed in claim 2, characterized in that: The tool used to annotate the generated black and white images with preset types of defects is labelImg software.

5. The PCB board defect detection method based on re-verification detection as claimed in claim 2, characterized in that: Performing data augmentation on the original image set to obtain an augmented image set, including: The defective images are cut into PNG images with alpha channels. The original image set is oversampled and expanded by randomly pasting maps on the background of the original image set. At the same time, the corresponding annotation files are regenerated according to the positions of the random maps to obtain the augmented image set.

6. The PCB board defect detection method based on re-verification detection as claimed in claim 1, characterized in that: The MobileNet network structure is referenced in the SSD network to improve the SSD network, including: The backbone part of the original SSD300 basic network is replaced from VGG16 to MobileNet v1, 8 convolutional layers are added after the conv13 of Mobilenet, and then a total of 6 layers are extracted for detection.

7. The PCB board defect detection method based on re-verification detection as claimed in claim 6, characterized in that: The improved network is trained using the training set, including: On the CPU, the improved network is trained using the training set; and the NMS of the post-processing part of the improved network is replaced by soft-NMS; during detection, all boxes with IOU greater than the threshold are not directly deleted, but their confidence is reduced, and only no more than 10 detection boxes with higher confidence are retained.

8. The PCB board defect detection method based on re-verification detection as claimed in claim 7, characterized in that: Before inputting the PCB board image in the image set into the PCB board defect detection model, the method further includes: The original 1920×1080 sample images in the image set are cropped to 1500×900 size one by one.

9. The PCB board defect detection method based on re-verification detection as claimed in claim 8, characterized in that: The second-level test of the defective samples detected by the first-level test includes: On the GPU, the PCB board defect detection model is used to perform secondary detection on the PCB board image with the detection frame in the primary detection, and the NMS is removed in the post-processing part of the detection algorithm.

Citation Information

Patent Citations

  • Pcb defect detection method based on deep learning

    CN111103307A

  • Method and system for detecting defects of power transmission line equipment

    CN111797890A