基于ECA和BiFPN改进YOLOv5s的PCB缺陷检测

Improving YOLOv5s PCB defect detection based on ECA and BiFPN

  • 摘要: 针对常规的PCB缺陷检测算法存在精度不高、缺陷定位不准确等问题,提出一种基于ECA和BiFPN改进YOLOv5s的PCB缺陷检测方法。首先,在主干网络的C3中引入ECA注意力机制,使模型更加关注小目标的特征信息,保证模型检测效果;其次,引入加权双向特征金字塔网络(bidirectional feature pyramid network, BiFPN),让模型能够更快速地开展多尺度特征融合;最后,使用SIoU Loss替换CIoU Loss,进一步提升模型的稳定性。以同一PCB数据集为实验对象,实验结果表明,改进后的模型mAP达到了98.1%,相较于原模型,FPS提高了4.68,在检测的精度和速度上均有提升,满足PCB缺陷的实际检测要求。

     

    Abstract: The proposed method addresses the issues of low precision and inaccurate defect location in conventional PCB defect detection algorithms by incorporating ECA and BiFPN improved YOLOv5s. Firstly, the ECA attention mechanism is introduced into C3 of the backbone network to enhance the model's focus on small target feature information, ensuring effective detection. Secondly, the weighted bidirectional feature pyramid network (BiFPN) is employed for efficient multi-scale feature fusion. Lastly, SIoU Loss replaces CIoU Loss to further enhance model stability. Experimental results using the same PCB dataset demonstrate that the improved model achieves a mAP of 98.1%, an increase in FPS by 4.68 compared to the original model, thereby improving both detection accuracy and speed to meet practical requirements for PCB defect detection.

     

/

返回文章
返回