Defect detection for PCB by combining shallow features and attention mechanism
Defect detection is an important part of quality control in the production of Printed Circuit Board(PCB).Due to the tiny size of PCB surface defects and the complex of traverse layout,the existing detection algorithms can-not make full use of the characteristics of small defects,and its detection accuracy cannot meet the production re-quirements.To solve these problems,a You Only Look Once Version 5—Tiny Defect Detection(YOLOv5-TDD)algorithm for PCB minimal defect detection was presented.Based on YOLOv5,the shallow feature fusion branch in the neck network was added to improve the information flow efficiency of tiny defect features.The Squeeze and Ex-citation—SiLU(SE-SiLU)attention mechanism module was introduced to improve the network's attention to the ti-ny defect information of shallow features by assigning weights to the feature information.The experimental results showed that YOLOv5-TDD had 99.12%mAP in PCB_DATASET defect dataset test,3.54%higher than YOLOv5,and better detection accuracy than other algorithms.