沈萍,李想,杨宁,等.基于三重注意力的轻量级YOLOv8印刷电路板缺陷检测算法[J]. 微电子学与计算机,2024,41(4):20-30. doi: 10.19304/J.ISSN1000-7180.2023.0846
引用本文: 沈萍,李想,杨宁,等.基于三重注意力的轻量级YOLOv8印刷电路板缺陷检测算法[J]. 微电子学与计算机,2024,41(4):20-30. doi: 10.19304/J.ISSN1000-7180.2023.0846
SHEN P,LI X,YANG N,et al. Lightweight YOLOv8 PCB defect detection algorithm based on triple attention[J]. Microelectronics & Computer,2024,41(4):20-30. doi: 10.19304/J.ISSN1000-7180.2023.0846
Citation: SHEN P,LI X,YANG N,et al. Lightweight YOLOv8 PCB defect detection algorithm based on triple attention[J]. Microelectronics & Computer,2024,41(4):20-30. doi: 10.19304/J.ISSN1000-7180.2023.0846

基于三重注意力的轻量级YOLOv8印刷电路板缺陷检测算法

Lightweight YOLOv8 PCB defect detection algorithm based on triple attention

  • 摘要: 在全球产业中,印刷电路板的生产和应用持续增长,已经成为各种电子设备的核心组成部分。由于缺陷尺度较小的问题以及检测模型轻便嵌入便携式设备的需求,印刷电路板图像的自动缺陷检测是一项具有挑战性的任务。为了满足智能制造和使用中对高质量印刷电路板产品日益增长的需求,提出一种基于YOLOv8的印刷电路板缺陷检测改进方法。首先,采用轻量级网络MobileViT作为主干网络,减小模型体积和计算量。其次,引入Triplet Attention模块,增强张量中不同维度间特征的捕捉能力。最后,将边界框损失函数替换为LMPDIoU,直接最小化预测框与实际标注框之间的左上角和右下角点距离。实验表明:改进后的检测模型能够在拥有极小参数量的同时保证小尺寸缺陷检测精度较高,模型参数量降低率为89.38%,满足轻便嵌入便携式检测设备和计算机资源受限的场景应用,证实了在印刷电路板缺陷检测领域具有良好的应用前景。

     

    Abstract: The production and application of Printed Circuit Boards (PCBs) continues to grow in the global industry and has become a core component of various electronic devices. Automatic defect detection of printed circuit board images is a challenging task due to the problem of small defect scales and the need for inspection models to be lightly embedded in portable devices. In order to meet the growing demand for high-quality printed circuit board products in smart manufacturing and usage, an improved YOLOv8-based defect detection method for printed circuit boards is proposed. First, a lightweight network MobileViT is used as the backbone network to reduce the model size and computation. Second, triplet attention module is introduced to enhance the ability of capturing features between different dimensions in the tensor. Finally, the bounding box loss function is replaced with L_\mathrmM\mathrmP\mathrmD\mathrmI\mathrmo\mathrmU to directly minimize the upper-left and lower-right point distances between the predicted box and the actual labeled box. Experiments show that the improved detection model can ensure high accuracy of small-size defect detection while having a very small number of parameters, and the reduction rate of the number of parameters of the model is 89.38%, which satisfies the applications of lightweight embedded portable inspection equipment and scenarios with limited computer resources, and confirms a good application prospect in the field of printed circuit board defect detection.

     

/

返回文章
返回