PCB Defect Detection Algorithm Based on YOLOv5_HM
摘要
To address the issues of low detection accuracy and the high number of model parameters in current printed circuit board (PCB) surface defect detection algorithms, a YOLOv5-based algorithm model, namely, YOLOv5_HM is proposed in this paper. Firstly, a lightweight neck network, High-level Screening-feature Fusion Pyramid (HS_FPN), is designed to improve the model's feature representation capabilities. Secondly, a lightweight attention mechanism, the Mixed Local Channel Attention (MLCA) module, is introduced. Thirdly, by removing the large target detection layers, the model's detection head is optimized, thereby increasing the model's ability to recognize small objects. Experiments results show that the YOLOv5_HM model achieves a 2.6% improvement in mean average precision (mAP), a 32.3% reduction in model parameters, and a 3.9 reduction in GFLOPs compared to the YOLOv5 model, demonstrating the effectiveness of the proposed method.