Lightweight PCB defect detection algorithm based on improved YOLOv8s
DOI:
CSTR:
Author:
Affiliation:

1.School of Mechanical Engineering, Tianjin University of Technology and Education, Tianjin 300130, China; 2.School of Mechanical Engineering, Tianjin University, Tianjin 300130, China

Clc Number:

TP391.4; TN911.73

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    Abstract:

    There is a trade-off between the lightweight nature of YOLO algorithm models and maintaining detection accuracy. To address the task of detecting small defects in printed circuit boards, we propose a lightweight object detection algorithm based on an improved YOLOv8s. This approach significantly reduces the number of parameters and model size while enhancing detection accuracy. First, remove the last convolutional layer and the C2f layer from the backbone network. Then, introduce the lightweight cross-scale feature fusion module to achieve model lightweighting while enhancing the detection accuracy of small objects. Secondly, we introduce distribution shifting convolution, combining C2f and DSConv to create the C2f_DSConv module, which is then integrated with the lightweight attention mechanism CBAM to design the C2f_DSConv_CBAM module. This module replaces the C2f components in both the backbone and neck networks, further reducing the number of model parameters and enhancing feature extraction capability. Finally, by combining the auxiliary bounding box loss functions Inner-IoU, the bounding box focal loss function Focal IoU Loss, and the original bounding box loss function CIoU, we design the Focal Inner-CIoU. This introduces a controllable auxiliary bounding box to calculate localization loss, increasing the proportion of high IoU bounding boxes and ultimately enhancing detection accuracy. Experimental results show that compared to the original YOLOv8s model, the improved model reduces the number of parameters by 81.5%, computation by 21.3%, and model size by 72.3%, while increasing mAP by 3.0%. This effectively lowers the computational cost of the algorithm, making it more suitable for practical applications and deployment.

    Reference
    Related
    Cited by
Get Citation
Related Videos

Share
Article Metrics
  • Abstract:
  • PDF:
  • HTML:
  • Cited by:
History
  • Received:
  • Revised:
  • Adopted:
  • Online: May 16,2025
  • Published:
Article QR Code