Search papers, labs, and topics across Lattice.
This paper introduces UniPCB, a framework for PCB defect inspection that tackles the challenges of scarce and imbalanced defect samples by integrating a multi-modal conditional diffusion model for defect synthesis with a specialized defect detection network. The diffusion model uses edge, depth, and text conditions to generate realistic defect samples, while the detection network employs inverted residual shift attention and cross-level feature fusion. Experiments on the DsPCBSD+ dataset demonstrate that UniPCB significantly improves defect detection performance, achieving state-of-the-art mAP scores and outperforming existing conditional generation methods in FID and SSIM.
Generating synthetic training data with multi-modal diffusion beats hand-crafting better detection architectures for PCB defect inspection.
Printed Circuit Board (PCB) defect inspection faces two compounding challenges: scarce and imbalanced defect samples that limit model training, and insufficient feature representation under complex circuit backgrounds. Existing generation methods rely on single-modality conditions with coarse structural control, while detection methods improve architectures without addressing the data bottleneck. To resolve both challenges jointly, we propose a generation-assisted PCB defect inspection framework that integrates controlled defect synthesis with task-specific defect detection. On the generation side, a Multi-modal Condition Generator extracts complementary edge, depth, and text conditions in parallel. A ScaleEncoder then embeds these conditions into the diffusion U-Net at four resolutions, and a Condition Modulation applies FiLM-style spatially-adaptive modulation at each scale, enabling structurally aligned and defect-aware sample synthesis. On the detection side, an Inverted Residual Shift Attention couples self-attention with shift-wise convolution to jointly capture global context and local texture, and a Cross-level Complementary Fusion Block generates pixel-level gates for selective cross-level feature fusion. The synthesized samples directly enrich the detection training set, so that improvements in generation compound with improvements in detection. Extensive experiments on DsPCBSD+ demonstrate that UniPCB achieves mAP@0.5 of 98.0% and mAP@0.5:0.95 of 61.8% on defect detection, surpassing all compared methods, while the generation branch attains an FID of 129.61 and SSIM of 0.619, outperforming existing conditional generation approaches.