YOLOv8n-MMSP: A Lightweight Real-Time Vehicle Detector for Edge-Based Perception in Intelligent Transportation Systems
Abstract
Real-time vehicle detection in edge-based intelligent transportation systems is essential for enhancing traffic efficiency and safety. However, vehicle detection in complex urban environments faces challenges (cluttered backgrounds, significant scale variations among targets), necessitating lightweight models that achieve both high accuracy and low computational cost for resource-constrained edge devices. To address these challenges and tackle key engineering problems in traffic scenarios, we proposed YOLOv8n-MMSP, a lightweight real-time vehicle detection algorithm optimized for edge deployment. To mitigate fine-grained feature loss from downsampling, the C2f-StarBlocks module was integrated to enhance multiscale feature fusion, beneficial for long-range vehicle perception in traffic monitoring systems. To reduce the distant small-object miss rate, a P2 small-object detection layer was introduced to strengthen shallow feature representation, improving detection reliability. To handle significant scale variations and complex background interference, the Multi-Scale Convolutional Attention mechanism was incorporated, enabling robust perception under challenging conditions (nighttime and adverse weather). To improve bounding box regression accuracy in densely occluded scenarios, the Multi-Precision Distance Intersection over Union loss function was adopted, facilitating more precise localization in congested traffic environments. Furthermore, to meet the computational constraints of edge devices, an L1 regularization–based channel pruning strategy was applied to batch normalization layers, reducing model complexity while maintaining detection performance. Results demonstrated 81.2% mAP and 61.4% mAP50-95, consistent improvements over the baseline model, while reducing model size, parameter count, and computational load to 61.89%, 59.12%, and 58.40% of the original, respectively. Edge-device tests further demonstrate a real-time inference speed of 73.6 fps.