Defect detection is a crucial task in screen-printed circuit (SPC) production, where image processing method based on deep learning is often used. This field frequently encounters challenges, such as minute surface defects, a large number of model parameters, and high computational complexity. To address these challenges, a self-made SPC defect data set and an enhanced CAAB-YOLOv8n detection algorithm were developed. A CAD module was integrated into the backbone network to improve the model’s ability to detect bar-shaped features. In addition, the ASF feature fusion and RMT modules were combined to construct the ASF-CR neck structure, which enhances the model’s capability to detect small, localized defects. To expedite inference speed, the DBB-Head reparameterization module was incorporated. Experimental results show that the enhanced algorithm achieves 88.4 $$\%$$ accuracy, a mAP@50 of 90.2 $$\%$$ , and a parameter count of just 33.27 million, with a detection speed of 35.2 frames per second. The real-time requirements for SPC defect detection are met by these findings. This work lays a solid theoretical foundation for subsequent defect traceability and the optimization of printing process parameters.