Abstract:To address the issues of low efficiency, poor accuracy, and insufficient capability in detecting component appearance defects in traditional surface defect detection methods for low-voltage boards, technical improvements were made to the YOLOv5s algorithm. The CBAM attention mechanism was introduced to enhance the extraction of key board features. The CotNet module was integrated to improve small target detection capability. A dynamic detection head was adopted to achieve adaptive multi-scale target detection. The SIoU loss function was utilized to optimize model convergence speed, detection accuracy, and bounding box regression. Experimental results showed that the improved algorithm achieved an accuracy of 95.7% on a custom board dataset, with mAP50 and mAP50:95 improved by 4.3% and 2.5% respectively compared to the original algorithm. This method effectively enhances the accuracy and reliability of surface defect detection for low-voltage board components and provides valuable insights for future research on printed circuit board component defect detection.