YOLO-HLT: improved lightweight printed circuit board surface defect detection algorithm based on YOLOv5
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.
Authors
- Bohao Yang (ORCID: https://orcid.org/0000-0003-0413-4818)
- Wei Liu (ORCID: https://orcid.org/0000-0003-0548-6997)
- Zhenzhen Wang (ORCID: https://orcid.org/0000-0003-3586-9008)
Institutions
- Shandong Institute of Business and Technology (CN)
Publication Details
- Journal
- Insight - Non-Destructive Testing and Condition Monitoring
- Published
- 2024-10-01
- DOI
- https://doi.org/10.1784/insi.2024.66.10.628
- Citations
- 1
- Primary Topic
- Industrial Vision Systems and Defect Detection
- Type
- article
- Field-Weighted Citation Impact
- 0.35