Improved YOLOv8n algorithm for PCB flaws detection
DOI:
CSTR:
Author:
Affiliation:

School of Electronic and Information Engineering, Changchun University of Science and Technology, Changchun 130022, China

Clc Number:

TM93;TP391.4

Fund Project:

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

    In order to solve the problems of small defect area of industrial printed circuit boards (PCB), high false detection and missed detection rate caused by background interference, and difficult defect location, an improved circuit board defect detection algorithm based on YOLOv8n was proposed. First, by adjusting the feature fusion levels of the feature pyramid networks (FPN) in the backbone network, introduce a 160×160 tiny-target feature layer and detection head to replace the original 20×20 large-target feature layer and detection head., which enhances the network’s ability to extract features of small targets. Secondly, a parallelized patch-aware (PPA) attention module is introduced between the backbone and the neck. Through the multi-branch feature extraction part, it captures features of different scales and levels of the target, strengthening the model’s ability to extract and fuse local and global information. While avoiding the interference of complex background features, it also improves the utilization efficiency of the target feature information. Furthermore, the efficient multi-scale attention module (EMA) is introduced at the neck end to avoid more sequential processing and model depth, and at the same time, the cross-space learning ability of the network is enhanced. Finally, normalized wasserstein distance-efficient intersection over union) is employed as the bounding box regression loss function (NWD-EIoU). By introducing the normalized Wasserstein distance (NWD) to construct a geometrically-aware similarity metric, it alleviates the cumulative localization errors caused by minor offsets of detection boxes, improves the model’s positioning accuracy for micro-defects on PCBs, and accelerates convergence. The experimental results on the publicly available PCB defect dataset PKU-Market-PCB show that the mAP@0.5 of the improved method has increased by 4.2% compared with the original algorithm. The Precision and Recall metrics have increased by 7.7% and 4.3% respectively. Compared with the same type of single-stage object detection methods, the improved method meets the requirements of high-precision PCB defect detection.

    Reference
    Related
    Cited by
Get Citation
Related Videos

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