RefDiffNet: Learning to Expose Subtle PCB Defects Before Detection
Title: RefDiffNet: Enhancing Subtle PCB Defects Prior to Detection
Abstract: Detecting defects on printed circuit boards (PCBs) is a complex task, primarily because many flaws are minute and easily obscured by intricate background patterns. Current deep learning approaches for PCB inspection typically rely exclusively on the image under inspection, disregarding the defect-free reference image that contains the expected configuration of traces, pads, and other structural elements. To address this, we introduce RefDiffNet, a lightweight, plug-and-play input enhancement module designed to preprocess images before they enter the detector backbone. This approach adapts a traditional inspection principle for the deep learning age: utilizing a defect-free reference to expose anomalies. RefDiffNet operates by aligning and comparing the inspected image with the reference, identifying structural deviations, and employing a compact encoder to generate an output where defective areas are emphasized. This preprocessing step simplifies the detection process for downstream models. Evaluations on the HRIPCB and DeepPCB datasets demonstrate that RefDiffNet consistently boosts performance across a wide range of detector architectures, including one-stage detectors (YOLOv8 through YOLOv26), the transformer-based RT-DETR, and the two-stage Faster R-CNN. The module delivers up to an 18% relative improvement in mAP50:95 with minimal computational burden, adding only 0.004–0.005 million parameters and 0.7–0.8 GFLOPs. This overhead represents no more than 0.25% of the total parameter count for any of the evaluated detectors. These findings confirm that RefDiffNet serves as an efficient, detector-agnostic enhancement tool that significantly advances PCB defect detection capabilities without incurring substantial computational costs.
Source: arXiv Generated at: 2026-06-02 00:00:00 UTC




