A hybrid DETR-YOLOv10 framework for PCB micro-defect detection
Abstract
As the electronic manufacturing industry continues to evolve towards higher density and integration, the detection of micro-defects in printed circuit boards (PCBs) demands greater accuracy and efficiency. Traditional methods of manual visual inspection and machine vision lack generalization in complex backgrounds, while single deep learning models face performance bottlenecks. This study proposes a hybrid DETR (detection Transformer)-YOLOv10 architecture with bidirectional feature interaction, which integrates DETR’s global semantic understanding and YOLOv10’s local detail capture, and improves the perception granularity of micro-defects through a shared feature extraction backbone, attention-guided multi-scale adaptive feature weighting, and an optimized EIoU (enhanced intersection over union) loss function. Experiments are conducted on a multi-source PCB dataset integrating PCB_DATASET, DeepPCB and PCBSDD, with a 5-fold cross-validation strategy adopted to ensure the reliability of results. The evaluation metrics include mean Average Precision (mAP), inference speed, comprehensive robustness score, and average missed detection rate. In detecting micro-shorts, micro-open circuits, and pinhole defects, the proposed algorithm achieved an average detection accuracy of 94.2%, which was 7.9% higher than YOLOv10 and 11.1 percentage points higher than DETR. In terms of detection speed, the inference time for a single image was 18 milliseconds, and it could process 56 images per second, which was 154.5% faster than DETR, and the average missed detection rate was reduced to 3.7%. In complex scenarios such as lighting changes and texture interference, the algorithm’s comprehensive robustness score reached 91.4%, significantly better than the model. This research provides a solution that emphasizes both high precision and high efficiency for PCB micro-defect detection and has potential for industrial applications.