Printed circuit boards (PCB) are defective in industrial manufacturing. To address the current problem of low accuracy of small target defect detection, a YOLOv5 improvement algorithm for more accurate small target detection is proposed to improve the accuracy. Firstly, the k-means clustering algorithm is used at the input side to cluster the dataset and analyze the anchor frames that match this dataset to improve the localization accuracy of the model. Second, a dual-attention mechanism is added to the backbone network to improve the feature extraction capability of the target. Then, a small target detection layer is added to the network at the output end to improve the efficiency of small target detection. Finally, the loss function at the output side is improved to reduce the loss value of the bounding box and speed up the rate of bounding box regression. The experimental results show that the accuracy rate of the improved YOLOv5 algorithm is improved from 84.2% to 95.2%, which can meet the require.
Zewei ZhaoXiaotie MaXiaotong YangFengling Wang
J. C. ZengYiming ZhengXinping JinLin Jin-hongY. T. Feng
Shuaishuai LvChuanzhen TaoZhuangzhuang HaoHongjun NiZhengjie HouXiaoyuan LiGu HaiWeidong ShiLinfei Chen
Li FengKang XiaoZhenpeng HuGuozheng Zhang