基于STR-DETR的轻量化PCB缺陷检测算法
DOI:
CSTR:
作者:
作者单位:

1.南京信息工程大学电子与信息工程学院南京210044;2.南京信息工程大学 江苏省气象探测与信息处理重点实验室南京210044

作者简介:

通讯作者:

中图分类号:

TP391;TN912

基金项目:

国家自然科学基金(41075115)、江苏省重点研发计划社会发展项目(BE2015692)、无锡市社会发展科技示范工程项目(N20191008)资助


Lightweight PCB defect detection algorithm based on STR-DETR
Author:
Affiliation:

1.School of Electronics and Information Engineering, Nanjing University of Information Science and Technology, Nanjing 210044, China;2.Jiangsu Key Laboratory of Meteorological Observation and Information Processing, Nanjing University of Information Science and Technology, Nanjing 210044, China

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    针对现有印刷电路板缺陷检测模型参数量庞大、计算复杂度高,难以部署在计算资源有限的工业边缘设备上的问题,提出了一种基于STRDETR的轻量化缺陷检测算法。首先,通过分组卷积重构轻量级网络StarNet形成新型主干网络G-StarNet,在保留多尺度特征提取能力的同时显著减少模型复杂度;其次,在自适应特征交互模块中引入基于统计学特征的自注意力机制来代替原有的多头自注意力,降低了计算开销;再次,结合曼哈顿自注意力机制及其分解形式设计RetBlockC3模块,采用距离相关的衰减模式增强了局部特征的表达优先级,实现了计算复杂度从二次方到线性的优化;最后,提出了一种新的损失函数FSN Loss,通过改善形状和尺度因素、样本分布不均对边界框回归结果的影响来增强检测的定位与分类准确性。实验结果表明,改进后的算法平均精度均值(mAP)mAP@0.5达到了96.7%,相较于基准模型,参数量减少了50.8%,计算量下降了55.4%,检测速度提高了23.7%,验证了算法的有效性,能够满足轻量化小目标检测的需求。

    Abstract:

    To address the challenges of existing PCB defect detection models, which suffer from excessive parameters, high computational complexity, and limited deploy ability on industrial edge devices with constrained computing resources, we propose a lightweight defect detection algorithm based on STR-DETR. First, we construct a novel backbone network, G-StarNet, by integrating group convolution into the lightweight StarNet architecture. This modification significantly reduces model complexity while preserving multi-scale feature extraction capabilities. Second, within the adaptive feature interaction module, a statistical feature-based self-attention mechanism replaces the conventional multi-head self-attention, effectively lowering computational overhead. Third, the RetBlockC3 module is designed by combining the Manhattan self-attention mechanism and its decomposed form. By incorporating a distance-dependent attenuation strategy, this module prioritizes local feature representation and reduces computational complexity from quadratic to linear scaling. Finally, we introduce a new loss function, FSN Loss, which mitigates the adverse effects of shape/scale variations and imbalanced sample distributions on bounding box regression, thereby enhancing both localization and classification accuracy. Experimental results demonstrate that the improved algorithm achieves an mAP@0.5 of 96.7%. Compared with the baseline model, it reduces parameters by 50.8%, computational load by 55.4%, and increases detection speed by 23.7%. These findings validate the algorithm’s effectiveness in meeting the requirements of lightweight small-target detection tasks.

    参考文献
    相似文献
    引证文献
引用本文

陈枫赟,李鹏.基于STR-DETR的轻量化PCB缺陷检测算法[J].电子测量与仪器学报,2025,39(6):30-40

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:
  • 最后修改日期:
  • 录用日期:
  • 在线发布日期: 2025-09-16
  • 出版日期:
文章二维码
×
《电子测量与仪器学报》
关于防范虚假编辑部邮件的郑重公告