YOLO-HLT: improved lightweight printed circuit board surface defect detection algorithm based on YOLOv5
印刷电路板
算法
计算机科学
工程类
电气工程
作者
Bohao Yang,Wei Liu,Zhenzhen Wang
出处
期刊:Insight [British Institute of Non-Destructive Testing] 日期:2024-10-01卷期号:66 (10): 628-638被引量:1
标识
DOI:10.1784/insi.2024.66.10.628
摘要
Printed circuit boards (PCBs) are extensively utilised in assembling electronic devices. During mass production, various surface defects may occur, necessitating effective defect detection. Traditional manual inspection, relying on personal experience, is subjective. With the advancement of artificial intelligence, considerable research has been conducted on automating PCB defect detection. However, addressing the low accuracy and poor real-time performance of existing methods remains a challenge, particularly in identifying small defects against the complex background of PCB substrates. In this paper, an enhanced you only look once-hybrid lightweight transformer (YOLO-HLT) model based on YOLOv5 for PCB surface defect detection is proposed. The three convolutions hybrid lightweight transformer (C3HLT) module replaces the cross-stage partial networks bottleneck with C3 module in the backbone (feature extraction network), enhancing feature extraction and obtaining global information. Additionally, the three convolutions hybrid lightweight attention (C3HLA) module is introduced to the neck (feature fusion network) part for more effective feature fusion and contextual information aggregation. Furthermore, to improve small target detection accuracy, a novel feature fusion layer is introduced in YOLO-HLT. Anchor box clustering using the K-means++ algorithm is also optimised. Experiments are conducted on a dataset from Peking University, demonstrating that YOLO-HLT achieves an mAP50 of 98.3% and a recall of 96.4%, which are 3.7% and 3.0% higher, respectively, than YOLOv5s. Moreover, YOLO-HLT achieves 144.93 frames per second (fps), surpassing the 112.36 fps of YOLOv5s.