RefDiffNet: Learning to Expose Subtle PCB Defects Before Detection

📅 2026-05-30
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the challenge of detecting subtle defects on printed circuit boards (PCBs), which are often obscured by complex backgrounds and overlooked by existing deep learning methods that neglect structural priors embedded in defect-free reference images. To this end, we propose RefDiffNet—a lightweight, plug-and-play input enhancement module placed before the detector backbone—that explicitly models structural discrepancies by comparing the test image with an aligned defect-free reference to highlight anomalous regions. By integrating classical reference-comparison principles into a deep learning framework, our approach achieves detector-agnostic input enhancement with minimal computational overhead. Evaluated on HRIPCB and DeepPCB benchmarks, RefDiffNet improves mAP50:95 by up to 18% while adding only 0.004–0.005 million parameters and 0.7–0.8 GFLOPs—less than 0.25% of the computational cost of mainstream detectors.
📝 Abstract
Printed circuit board (PCB) defect detection is challenging because many defects are small and difficult to distinguish from complex background patterns. Most deep learning-based PCB inspection methods rely only on the inspected PCB image for defect detection, ignoring the defect-free reference image that encodes the expected layout of traces, pads, and other PCB structures. In this work, we propose RefDiffNet, a lightweight plug-and-play input enhancement block placed before the detector backbone to enhance the image before defect detection. RefDiffNet brings one proven idea from classical inspection into the deep learning era, using a defect-free reference image to reveal defects. RefDiffNet compares the defective image with the aligned reference, captures structural changes relative to the reference, and uses a lightweight encoder to output the original image with defective regions highlighted, thereby making the downstream detector's task easier. Results on HRIPCB and DeepPCB show that RefDiffNet consistently improves performance across detector families, including one-stage detectors from YOLOv8 to YOLOv26, the transformer-based RT-DETR, and the two-stage Faster R-CNN. It achieves up to 18% relative mAP50:95 gain with negligible overhead, introducing only 0.004 - 0.005M additional parameters and 0.7 - 0.8 GFLOPs, amounting to at most 0.25% of the parameter count of any evaluated detector. Results establish RefDiffNet as a lightweight, plug-and-play, detector-agnostic input enhancement module that substantially improves PCB defect detection with minimal computational cost.
Problem

Research questions and friction points this paper is trying to address.

PCB defect detection
small defects
complex background
reference image
defect visibility
Innovation

Methods, ideas, or system contributions that make the work stand out.

RefDiffNet
reference-based defect enhancement
plug-and-play module
PCB defect detection
lightweight input preprocessing
🔎 Similar Papers
No similar papers found.