Guo Qiyang, Chen Yajun, Zhu Yirui, Chen Dongle
Department of Information Science, Xi'an University of Technology, Xi'an 710048, China.
Sensors (Basel). 2025 Aug 9;25(16):4919. doi: 10.3390/s25164919.
PCBs play a critical role in electronic manufacturing, and accurate defect detection is essential for ensuring product quality and reliability. However, PCB defects are often small, irregularly shaped, and embedded in complex textures, making them difficult to detect using traditional methods. In this paper, we propose CM-UNetv2, a semantic segmentation network designed to address these challenges through three architectural modules incorporating four key innovations. First, a Parallelized Patch-Aware Attention (PPA) module is incorporated into the encoder to enhance multi-scale feature representation through a multi-branch attention mechanism combining local, global, and serial convolutions. Second, we propose a Dual-Stream Skip Guidance (DSSG) module that decouples semantic refinement from spatial information preservation via two separate skip pathways, enabling finer detail retention. Third, we design a decoder module called Frequency-domain Guided Context Mamba (FGCMamba), which integrates two novel mechanisms: a Spatial Guidance Cross-Attention (SGCA) mechanism to enhance the alignment of spatial and semantic features, and a Frequency-domain Self-Attention Solver (FSAS) to compute global attention efficiently in the frequency domain, improving boundary restoration and reducing computational overhead. Experiments on the MeiweiPCB and KWSD2 datasets demonstrate that the CM-UNetv2 achieves state-of-the-art performance in small object detection, boundary accuracy, and overall segmentation robustness.
多氯联苯在电子制造中起着关键作用,准确的缺陷检测对于确保产品质量和可靠性至关重要。然而,印刷电路板(PCB)缺陷通常很小,形状不规则,并且嵌入复杂纹理中,这使得使用传统方法难以检测。在本文中,我们提出了CM-UNetv2,这是一种语义分割网络,旨在通过包含四项关键创新的三个架构模块来应对这些挑战。首先,将并行化补丁感知注意力(PPA)模块纳入编码器,通过结合局部、全局和串行卷积的多分支注意力机制增强多尺度特征表示。其次,我们提出了双流跳跃引导(DSSG)模块,该模块通过两条独立的跳跃路径将语义细化与空间信息保留解耦,从而实现更精细的细节保留。第三,我们设计了一个名为频域引导上下文曼巴(FGCMamba)的解码器模块,它集成了两种新颖机制:一种空间引导交叉注意力(SGCA)机制,用于增强空间和语义特征的对齐;以及一种频域自注意力求解器(FSAS),用于在频域中高效计算全局注意力,改善边界恢复并减少计算开销。在MeiweiPCB和KWSD2数据集上的实验表明,CM-UNetv2在小目标检测、边界精度和整体分割鲁棒性方面达到了当前的最优性能。