Real-Time Pavement Crack Detection for Cutting Machines: Enhancing YOLOv5 with Lightweight Modules and Attention Mechanisms
摘要
Road maintenance is crucial for ensuring the safety and service life of transportation infrastructure. As a core operational equipment, pavement cutting machines directly impact maintenance quality and efficiency through the accuracy and real-time performance of their crack detection. However, existing vision-based detection methods still face multiple challenges in practical applications, including complex field environments such as lighting variations, shadow interference, and road marking occlusion, which severely disrupt feature extraction. Furthermore, limited embedded hardware resources demand models that are both lightweight and high-precision. Additionally, the lack of specialized datasets that adequately reflect real-world pavement conditions constrains model generalization. To address these issues, this study proposes YOLOv5-CSS, a lightweight and high-precision crack detection method tailored for pavement cutting machines. Building upon YOLOv5, this method introduces the C2fRepGhost module to significantly reduce parameter count and computational costs, while integrating SE channel attention and SimAM spatial attention mechanisms to construct a dual channel-spatial feature enhancement structure. The SE mechanism enhances the model’s focus on crack-related key feature channels, improving feature discrimination, while the SimAM mechanism highlights subtle spatial features of narrow cracks, effectively suppressing background interference. To support model training and evaluation, we constructed the SlitCrack-Data dataset, which includes pavement images with complex backgrounds such as shadows, varying illumination, and road markings, covering predominantly slender and small-scale crack morphologies. The dataset also incorporates simulated cracks using ink to enhance diversity, thereby improving the applicability to real-world scenarios. Comprehensive experimental results confirm the superior performance of YOLOv5-CSS as it achieves a maximum mAP@0.5 improvement of 25.98 percentage points on the SlitCrack-Data dataset while reducing computational load by 15.1%, outperforms other lightweight attention models with an average map@0.5 improvement of 9.1% and exhibits strong generalization ability on the COCO dataset. The model achieves a real-time inference speed of 23 FPS on testing devices, meeting the operational requirements of pavement cutting machines. This study not only provides an efficient and reliable lightweight solution for pavement crack detection but also promotes reproducibility and further research through publicly available source code and datasets. To promote transparency and reproducibility, the source code and dataset are publicly available at: https://github.com/erererhan/yolov5-css.