# DVCW-YOLO for Printed Circuit Board Surface Defect Detection
###### Abstract  
The accurate and efficient detection of printed circuit board (PCB) surface defects is crucial to the electronic information manufacturing industry. However, current approaches to PCB defect detection face challenges, including large model sizes and difficulties in balancing detection accuracy with speed. To address these challenges, this paper proposes a novel PCB surface defect detection algorithm, named DVCW-YOLO. First, all standard convolutions in the backbone and neck networks of YOLOv8n are replaced with lightweight DWConv convolutions. In addition, a self-designed C2 fCBAM module is introduced to the backbone network for extracting features. Next, within the neck structure, the C2f module is substituted with the more lightweight VOVGSCSP module, thereby reducing model redundancy, simplifying model complexity, and enhancing detection speed. By enhancing prominent features and suppressing less important ones, this modification allows the model to better focus on key regions, thereby improving feature representation capabilities. Finally, the WIoU loss function is implemented to replace the traditional CIoU function in YOLOv8n. This adjustment addresses issues related to low generalization and poor detection performance for small objects or complex backgrounds, while also mitigating the impact of low-quality or extreme samples on model accuracy. Experimental results demonstrate that the DVCW-YOLO model achieves a mean average precision (mAP) of 99.3% and a detection speed of 43.3 frames per second (FPS), which represent improvements of 4% and 4.08%, respectively, over the YOLOv8n model. These results confirm that the proposed model meets the real-time PCB defect detection requirements of small and medium-sized enterprises. PCB board defect detection; YOLOv8n model; DVCW-YOLO model; C2 fCBAM structure; WIoU loss function 2020 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Vol., 2020, pp. 1-10. IEEE. Personal notice on this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprintingIn recent years, deep learning-based models for PCB surface defect detection have garnered significant attention. Current PCB defect detection methods using vision technology can be broadly classified into two categories: two-stage object detection algorithms and single-stage object detection algorithms [2]. Two-stage object detection algorithms first locate the target and generate detection boxes, followed by the classification of the detected boxes to refine the target categories and positions. Notable models include the region-based convolutional neural networks (R-CNNs) [3; 4; 5]. For example, [PERSON] et al. [5] developed an object detection framework that combines the strengths of R-CNN and a new region proposal network (RPN) to improve the speed and accuracy of object detection. [PERSON] and [PERSON] [6] address the challenge of detecting defects by introducing a two-stage object detection network based on region proposal network (RPN) for PCB defect detection. This type of two-stage detection algorithm presents several challenges, including limited inference speed and susceptibility to interference from background noise. In contrast, single-stage object detection algorithms combine feature extraction with prediction frame positioning, enabling the direct determination of target categories and detection frame positions. Examples include SSD [7] and YOLO [8]. [PERSON] and [PERSON] [9] leveraged the SSD architecture for PCB defect detection, providing a detailed account of the training process, evaluation metrics, and the effectiveness of SSD in identifying various defects, including soldering issues and component misplacements. [PERSON] et al. [10] introduced a cost-effective detection model based on YOLOv4, which improves the activation function in the backbone and neck prediction networks, reducing both the model size and the number of parameters. [PERSON] et al.