吉林大学学报(理学版) ›› 2026, Vol. 64 ›› Issue (2): 344-0350.

• • 上一篇    下一篇

基于YOLOv8的PCB缺陷检测改进算法

刘爽1, 吕俊良1, 秦宇航1, 秦丹丹2, 孙佳慧2   

  1. 1. 吉林大学 数学学院, 长春 130012; 2. 空军航空大学, 长春 130022
  • 收稿日期:2024-12-02 出版日期:2026-03-26 发布日期:2026-03-26
  • 通讯作者: 吕俊良 E-mail:lvjl@jlu.edu.cn

Improved Algorithm of PCB Defect Detection Based on YOLOv8

LIU Shuang1, LV Junliang1, QIN Yuhang1, QIN Dandan2, SUN Jiahui2   

  1. 1. College of Mathematics, Jilin University, Changchun 130012, China; 2. Aviation University of Air Force, Changchun 130022, China
  • Received:2024-12-02 Online:2026-03-26 Published:2026-03-26

摘要: 针对工业印刷电路板缺陷检测任务中, 小目标特征不明显且检测精度不足的问题, 提出一种基于YOLOv8算法的改进算法. 首先, 通过增删特征图尺寸以适应印刷电路板缺陷检测, 并借鉴加权双向特征金字塔网络结构保留原始图像的特征; 其次, 利用分组卷积在颈部设计一个轻量化模块进行特征提取, 提高检测精度的同时降低了模型复杂度; 最后, 在小目标检测头前引入可增强特征表现能力的坐标注意力模块, 进一步提高检验精度. 实验结果表明, 改进后的算法能将检测精度mAP@0.5提升至95.4%, 并使检测速度FPS(帧每秒)达到105.4, 可以更好地满足工业检测对精度和实时性的要求.

关键词: 印刷电路板缺陷检测, 神经网络, 注意力机制, 分组卷积

Abstract: Aiming at  the problem of unclear  small-target features and insufficient detection accuracy in the defect detection task of industrial printed circuit boards, we proposed an improved  algorithm based on YOLOv8 algorithm. Firstly, we  adapted  the defect detection of printed circuit boards by adding or deleting the feature map sizes, and drew on the experience of  the weighted bi-directional feature pyramid network structure to retain the features of the original image. Secondly, we designed a lightweight module at the neck  for feature extraction by using group convolution, which  improved the detection accuracy while reducing the complexity of the model. Finally, before the  small-object detection head, we introduced coordinate attention module that could  enhance feature representation capabilities, further improving the inspection accuracy. The experimental results show that the improved algorithm can improve the detection accuracy  mAP@0.5 to  95.4% and achieve a detection speed FPS (frames per second) of 105.4, which  can better  meet the  requirements of industrial detection for accuracy and real-time performance.

Key words: defect detection of , printed circuit board, neural network, attention mechanism, group convolution

中图分类号: 

  • TP391.41