Abstract:Due to the complex and diverse textures of leather surface defects, existing detection methods often suffer from limited accuracy and elevated rates of missed and false detections. To address these challenges, this paper presents an enhanced defect detection algorithm based on YOLOv5s, incorporating small-object detection techniques and attention mechanisms. Specifically, multiple attention modules are integrated into the backbone network to guide the model′s focus toward defect regions while suppressing interference from background and irrelevant features, thereby enhancing feature extraction. A weighted bidirectional feature pyramid network is introduced in the neck to strengthen feature fusion and interaction across scales. Additionally, a dedicated detection head tailored for small objects is implemented in the head network to improve the localization and recognition of subtle defect features. Experimental results show that the proposed improved method achieves a recall of 92.27% and a detection accuracy of 92.16%, representing improvements of 4.56% and 3.06%, respectively, compared to the baseline model.These enhancements effectively reduce missed and false detections in small-object scenarios and significantly improve the model′s generalization capability, contributing to more robust and comprehensive performance in real-world applications.