Lightweight PCB defect detection algorithm based on STR-DETR
DOI:
CSTR:
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

Clc Number:

TP391;TN912

Fund Project:

  • Article
  • |
  • Figures
  • |
  • Metrics
  • |
  • Reference
  • |
  • Related
  • |
  • Cited by
  • |
  • Materials
  • |
  • Comments
    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.

    Reference
    Related
    Cited by
Get Citation
Related Videos

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