Computer Integrated Manufacturing System ›› 2025, Vol. 31 ›› Issue (10): 3794-3804.DOI: 10.13196/j.cims.2023.0407

Previous Articles     Next Articles

Lightweight PCB defect detection algorithm incorporating partial convolution and parameter-free attention mechanisms

ZHU Rui1,QI Yuansheng2+,ZHANG Yongbin1   

  1. 1.School of Mechanical and Electrical Engineering,Beijing Institute of Graphic Communication
    2.School of Printing and Packaging Engineering,Beijing Institute of Graphic Communication
  • Online:2025-10-31 Published:2025-11-19
  • Supported by:
    Project supported by the National Key R&D Program,China(No.2019YFB1707202),and the National Natural Science Foundation,China(No.62275025).

融合部分卷积和无参数注意力机制的轻量级印刷电路板缺陷检测算法

朱瑞1,齐元胜2+,张勇斌1   

  1. 1.北京印刷学院机电工程学院
    2.北京印刷学院印刷与包装工程学院
  • 作者简介:
    朱瑞(1995-),男,山东菏泽人,硕士研究生,研究方向:智能制造、人工智能、机器视觉,E-mail:1394434079@qq.com;

    +齐元胜(1968-),男,山东淄博人,教授,博士,研究方向:印刷智能制造技术、人工智能、机器视觉,通讯作者,E-mail:yuansheng-qi@bigc.edu.cn;

    张勇斌(1974-),男,湖北黄冈人,副教授,博士,研究方向:智能制造大数据、业务决策建模,E-mail:zhangyognbin@bigc.edu.cn。
  • 基金资助:
    国家重点研发计划资助项目(2019YFB1707202);国家自然科学基金资助项目(62275025)。

Abstract: To address the problems of low accuracy and excessive parametric modulus of algorithms in existing Printed Circuit Board (PCB) defect detection methods,a lightweight PCB defect detection algorithm named YOLO-P that incorporated partial convolution and parameter-free attention mechanism was proposed.The new algorithm used an improved FasterNet network with Partial Convolution (PConv) as the structural core for the backbone network of the model,which reduced the parameters number of algorithmic model and the computational redundancy,and also replaced the ordinary convolutional layer in the neck network with a partial convolution to further reduce the complexity of the model and improve the efficiency of detection.A Simple,parameter-free Attention Mechanism (SimAM) was added to the backbone network,which strengthened the new algorithm's suppression of irrelevant background information of the image and improved the extraction of small target features without increasing the model complexity.Finally,the speed of model convergence was improved by introducing a composite loss function ECIOU to enhance the regression accuracy.The experimental results proved that the improved YOLO-P algorithm achieved a detection accuracy of 98.8%,which was 5.0% higher than the YOLOv5 algorithm,while the parameter modulus was also reduced by 26.13%,and the size of the trained weights was only 10.1MB,which made it more suitable for deploying in the scenarios of embedded systems,mobile devices and other computational resource-constrained and edge computing scenarios.To address the problems of low accuracy and excessive parametric modulus of algorithms in existing Printed Circuit Board (PCB) defect detection methods,a lightweight PCB defect detection algorithm named YOLO-P that incorporated partial convolution and parameter-free attention mechanism was proposed.The new algorithm used an improved FasterNet network with Partial Convolution (PConv) as the structural core for the backbone network of the model,which reduced the parameters number of algorithmic model and the computational redundancy,and also replaced the ordinary convolutional layer in the neck network with a partial convolution to further reduce the complexity of the model and improve the efficiency of detection.A Simple,parameter-free Attention Mechanism (SimAM) was added to the backbone network,which strengthened the new algorithm's suppression of irrelevant background information of the image and improved the extraction of small target features without increasing the model complexity.Finally,the speed of model convergence was improved by introducing a composite loss function ECIOU to enhance the regression accuracy.The experimental results proved that the improved YOLO-P algorithm achieved a detection accuracy of 98.8%,which was 5.0% higher than the YOLOv5 algorithm,while the parameter modulus was also reduced by 26.13%,and the size of the trained weights was only 10.1MB,which made it more suitable for deploying in the scenarios of embedded systems,mobile devices and other computational resource-constrained and edge computing scenarios.

Key words: printed circuit board, defect detection, YOLOv5 algorithm, partial convolution, attention mechanism

摘要: 针对现有印刷电路板(PCB)缺陷检测方法存在准确率低和算法参数模量过多的问题,提出一种融合部分卷积和无参数注意力机制的轻量级PCB缺陷检测算法YOLO-P。新算法使用了以部分卷积(PConv)为结构核心的改进FasterNet网络作为模型的主干网络,降低算法模型的参数量并减少计算冗余,同时将颈部网络中的普通卷积层更换为部分卷积,进一步降低模型复杂度,提高检测效率;其次,在主干网络添加了无参数注意力机制(SimAM),在不增加模型复杂度的同时加强了新算法对图像无关背景信息的抑制,提升对小目标特征的提取能力;最后,通过引入复合型损失函数ECIOU来提升模型收敛速度,从而提升回归精度。实验结果证明,改进后的YOLO-P算法检测精度达到了98.8%,比YOLOv5算法提升了5.0%的,参数模量也减少了26.13%,训练后权重文件大小仅为10.1MB,更加适合部署在嵌入式系统、移动设备等计算资源受限和边缘计算的场景。

关键词: 印刷电路板, 缺陷检测, YOLOv5算法, 部分卷积, 注意力机制

CLC Number: