Yolo-Sbc: Swin Transformer Combined with Modified Yolo Framework for Pcb Defect Detection
22 Pages Posted: 22 Apr 2025
Abstract
Surface defects generated during the manufacturing process of printed circuit boards (PCB) will adversely affect the quality of product, which in turn directly affects the stability and reliability of equipment performance. In recent years, as the layout of PCB boards has become more and more compact, how to accurately identify tiny surface defects under complex backgrounds becomes a great challenge for PCB industry. In this paper, an improved YOLO Swin Transformer-BiFormer-CARAFE (YOLO-SBC) new framework is proposed to realize high-precision detection of small defects on PCB boards. First, addressing the problem of weak feature extraction ability of small-size defects in PCB under complex background, the Swin Transformer module is introduced into the backbone network to enhance the feature extraction ability, which in turn better captures the long-distance dependencies and global information in the PCB images. Second, the BiFormer attention module is involved to perform bidirectional feature interactions in spatial and channel dimensions to fuse features at different scales and semantic levels to further enhance the feature representation capability of the model. Subsequently, content-aware reassembly of features (CARAFE) is used to replace the upsampling layer to fully aggregate the contextual semantic information of PCB images in a large receptive field. Finally, the detection head of the base YOLOv5 is optimized to improve the detection of small target defects by the proposed model. Experimental results on the public available PCB dataset show that the proposed YOLO-SBC model has significant advantages over other benchmark models. The mean average precision (mAP) of YOLO-SBC can reach 99.05%, which validates the effectiveness and superiority of the proposed YOLO-SBC.
Keywords: Printed Circuit Board (PCB), YOLO, Swin Transformer, small target detection
Suggested Citation: Suggested Citation