Printed circuit board (PCB) defect inspection is difficult because many defects are small and visually subtle. This study proposes a template-based inspection method combining image differencing, learning-free local candidate refinement, and selective ROI classification. Initial candidates are obtained from aligned test and template images, then locally refined using grayscale residual information without adding new candidates. Refined ROIs are represented by test, template, and residual patches and classified using MobileNetV3-Small. On DeepPCB, candidate recall at IoU 0.20 increases from 0.3389 to 0.9586 and at IoU 0.30 from 0.1153 to 0.6344. ROI classification achieves 0.9874 accuracy and 0.9855 macro F1. With a rejection threshold of 0.90, coverage remains 0.9762 with macro F1 of 0.9927. The method improves coarse defect localization, although strict bounding-box localization remains limited.
Copyrights © 2026