TrafficVisionAI: A Real-Time Deep Learning Framework for Automated Vehicle Counting and Speed Estimation using YOLOv8 and ByteTrack
Keywords:
Computer vision, Object tracking, Speed estimation, Traffic monitoring, YOLOv8Abstract
Rapid urbanization has escalated the urgent need for intelligent transportation systems capable of alleviating traffic congestion, enhancing road safety, and enabling data-driven urban planning. Traditional manual surveillance methods are notoriously prone to human error, labor-intensive, and incapable of delivering real-time analytics at scale. This paper presents the design, implementation, and evaluation of TrafficVisionAI, a lightweight and cost-effective deep learning framework for automated vehicle detection, tracking, and speed estimation. The system leverages the YOLOv8n model to perform object detection across four specific COCO classes: Cars, Motorcycles, Buses, and Trucks. To ensure consistent identity preservation in complex, occluded traffic environments, the ByteTrack algorithm is integrated to assign persistent IDs to moving vehicles. The core novelty of this work lies in the seamless integration of a custom pixel-to-meter scaling factor for real-time speed estimation (in km/h), coupled with a professional, feature-rich Heads-Up Display (HUD) that provides live traffic statistics and system status (FPS, timestamp). Additionally, automated video archiving via OpenCV ensures high-volume annotated data is retained for post-hoc analysis. Experimental results demonstrate the system's robust capability to classify and count vehicles, while preliminary testing highlights a performance trade-off of 4 FPS on standard CPU hardware. The findings confirm that deep learning provides a scalable, accessible, and highly efficient solution for modern intelligent transportation systems.