ZHANG Zhen1, XIAO Zongrong2, LI Youhao3, HUANG Weitao3
Abstract:
To address the safety risks posed by construction vehicles operations in highrisk areas near natural gas pipelines, particularly the physical impacts and environmental disturbances caused by heavy vehicles, in this study an improved YOLOv7-based construction vehicles recognition algorithm was proposed. Six common types of construction vehicles including dump trucks, rollers, mixers, forklifts, excavators, and loaders were selected as the research objects. A custom dataset, containing images captured in various environments and angles, was used to train the model, ensuring its performance. Firstly, the CBAM attention mechanism was introduced into the YOLOv7 head, and an improved GAM attention mechanism was added to the max pooling layer to enhance the model′s focus on key image features and improve detection accuracy. Secondly, the DySample dynamic upsampling module replaced the nearest neighbor interpolation, boosting precision. Finally, an improved SPPCSPC module was designed to enhance feature extraction efficiency, reduce computational costs, and accelerate inference. These modifications could enable the model to maintain high detection accuracy even in challenging scenarios such as low-quality images or distant targets. Experimental results demonstrated that the proposed algorithm achieved a precision P of 97.7%, recall R of 94.7%, mAP@0.5 of 98.6%, and mAP@0.5∶0.95 of 90.4%. Compared to the original YOLOv7 algorithm, these metrics improved by 1.3, 1.4, 1.4, and 3.7 percentage points, respectively.