Lightweight Roadside Object Detection Algorithm Based on YOLOv5s
摘要
To address the issues of low detection accuracy for small and occluded objects from a roadside perspective and limited computational resources at the roadside, a lightweight roadside object detection algorithm based on YOLOv5s is proposed. In the Backbone, a lightweight DC-C3 module with a hybrid attention mechanism is introduced along with the CA spatial attention mechanism. This approach enhances the ability to capture spatial relationships and local features in the image, effectively addressing the problems of occluded and small objects. The Neck layer structure is pruned, and the CARAFE upsampling operator and GSConv module are introduced. Additionally, a lightweight DWG module is proposed to replace the C3 module. These modifications reduce the computational complexity and parameter count of the Neck while maintaining good model performance. Finally, a lightweight and efficient decoupled prediction head is proposed to separately handle the classification and localization tasks of the detection layer, improving detection accuracy and accelerating model convergence. On the open-source roadside DAIR-V2X-I dataset, the improved D-YOLOv5 algorithm model reduces the model size by 12.5%, and mAP(0.5) and mAP(0.95) are improved by 1.2% and 1.1%, respectively. In complex roadside object detection tasks, the proposed detection algorithm demonstrates superior performance.