Abstract:In this paper, YOLOv5 is used as a benchmark model to address the problem of easy leakage and low accuracy of electronic components detection on circuit boards. The leakage problem of the model in detection is improved by using the convolutional block attention module (CBAM) to enhance the detection accuracy in the process of feature extraction and improving the boundary regression loss function. Firstly, the feature information of components is extracted using convolutional layers. Secondly, the CBAM module is introduced into the path aggregation network (PANet), which enriches the feature information of components and improves the problem of lower accuracy of the model. Finally, accurate detection of components of different scales is achieved by multi-scale prediction and adaptive anchor frames. The experimental results show that the improved CCM-YOLO algorithm achieves a mean average precision (mAP) value of 96.8% on the homemade dataset, and it achieves a leakage detection rate of 4.5%, which is an improvement of 8.3% value compared to the 88.8% of the mean average precision of the YOLOv5 network, and the leakage detection rate is reduced from 13.7% of the original baseline model is reduced by 9.2%. Therefore, the algorithm in this paper effectively improves the detection accuracy and significantly reduces the leakage detection, providing an effective detection scheme for component detection.