Accurate vehicle speed estimation is essential for traffic monitoring, road safety, and intelligent transportation systems. Conventional methods such as radar, LiDAR, and embedded sensors provide reliable measurements but involve high installation and maintenance costs, limiting their scalability. This paper presents a vision-based vehicle detection and speed tracking system that utilizes existing surveillance cameras without requiring additional hardware. The proposed system integrates YOLOv3 for real-time vehicle detection, DeepSORT for multi-object tracking, and the Pyramidal Lucas–Kanade optical flow algorithm for fine-grained motion analysis. Four virtual intrusion lines are defined within the camera’s field of view to extract temporal and spatial features, enabling speed estimation using both distance-over-time and time-over-distance approaches. Additionally, a Multilayer Perceptron (MLP) model is employed to further improve prediction accuracy. Experimental results demonstrate that the system achieves a Mean Absolute Error (MAE) of approximately 3.07 km/h and a Root Mean Square Error (RMSE) of 3.98 km/h under real traffic conditions. The proposed method offers a cost-effective, scalable, and non-intrusive solution for real-time vehicle speed estimation, contributing to the development of smart traffic monitoring systems.
Introduction
This paper presents a vision-based vehicle detection and speed tracking system that uses existing surveillance cameras to estimate vehicle speeds in real time without requiring additional hardware such as radar, laser sensors, or inductive loops. Accurate vehicle speed measurement is essential for traffic management, law enforcement, congestion monitoring, and intelligent transportation systems. Traditional speed measurement systems offer high accuracy but are expensive, require infrastructure modifications, and are difficult to deploy on a large scale.
The proposed system leverages advances in computer vision and deep learning to transform conventional traffic cameras into intelligent monitoring tools. It combines YOLOv3 for real-time vehicle detection, DeepSORT for multi-object tracking, and optical flow techniques for motion analysis. This approach enables accurate detection, tracking, and speed estimation of multiple vehicles simultaneously while reducing deployment and maintenance costs.
The system follows a modular architecture consisting of video input, vehicle detection, vehicle tracking, and speed estimation. Vehicle detection is performed using YOLOv3, which identifies vehicles and generates bounding boxes around them. DeepSORT assigns unique IDs to vehicles and tracks their movement across video frames using Kalman filtering and appearance-based matching. Optical flow algorithms further enhance tracking accuracy by monitoring feature points, especially around vehicle wheel regions.
Vehicle speed is estimated using two complementary approaches:
Distance-over-Time Model – calculates speed from vehicle displacement between frames and the frame rate.
Time-over-Distance Model – measures the time taken for a vehicle to cross known distances between virtual intrusion lines within the video frame.
To improve reliability, temporal motion features are averaged and processed using a Multilayer Perceptron (MLP) model that refines speed predictions and reduces estimation errors.
The system is implemented using Python, OpenCV, YOLOv3, DeepSORT, and optical flow algorithms. Experimental evaluation was conducted on real-world traffic videos captured by fixed surveillance cameras with known ground-truth speeds obtained from laser speed guns. Performance was measured using Mean Absolute Error (MAE) and Root Mean Square Error (RMSE).
Results demonstrate strong performance, achieving an MAE of approximately 3.07 km/h and an RMSE of approximately 3.98 km/h, indicating accurate and reliable speed estimation under real-world conditions. The integration of optical flow and DeepSORT improved tracking stability, while the dual speed estimation models enhanced robustness.
Although challenges remain in situations involving heavy occlusion, extreme lighting conditions, and perspective distortion, the proposed system provides a cost-effective, scalable, and accurate alternative to traditional sensor-based speed measurement systems. By utilizing existing surveillance infrastructure, it supports the development of intelligent traffic monitoring solutions and smart city applications.
Conclusion
The proposed vehicle detection and speed tracking system demonstrates an effective vision-based approach for estimating vehicle speed using traffic video data. By integrating YOLOv3 for vehicle detection, DeepSORT for multi-object tracking, and optical flow techniques for motion analysis, the system is capable of accurately tracking multiple vehicles and estimating their speed in real time. The use of dual speed estimation models—distance-over-time and time-over-distance—enhances reliability by validating measurements through complementary methods. Experimental results show that the system achieves a Mean Absolute Error (MAE) of approximately 3.07 km/h and a Root Mean Square Error (RMSE) of 3.98 km/h, confirming its accuracy and robustness under real-world traffic conditions.
The system provides a cost-effective and scalable alternative to traditional sensor-based speed measurement methods, as it utilizes existing surveillance infrastructure without requiring additional hardware. It also offers flexibility for deployment in various traffic environments, including urban roads and highways. However, certain limitations remain, such as sensitivity to camera positioning, lighting variations, and occlusion in dense traffic scenarios.
Future work can focus on enhancing the system to support multi-lane vehicle tracking and improving robustness under challenging environmental conditions. Automated camera calibration techniques can be incorporated to reduce manual intervention and improve accuracy. Additionally, integrating advanced deep learning models and real-time processing optimizations can further enhance performance. The system can also be extended with Automatic Number Plate Recognition (ANPR) for traffic enforcement applications, contributing to the development of intelligent and data-driven transportation systems.
References
[1] T. V. Mathew, “Automated Traffic Measurement,” Indian Institute of Technology, Bombay, India, 2023.
[2] P. Michalaki, M. Quddus, D. Pitfield, M. Mageean, and A. Huetson, “A sensor-based system for monitoring hard-shoulder incursions: Review of technologies and selection criteria,” in Proc. 5th Int. Conf. Transp. Traffic Eng., vol. 81, 2016, pp. 1–8.
[3] U.S. Department of Transportation Federal Highway Administration, “Traffic Monitoring Guide eBook,” Washington, DC, USA, 2014.
[4] H. A. Kurdi, “Review of closed circuit television (CCTV) techniques for vehicles traffic management,” Int. J. Comput. Sci. Inf. Technol., vol. 6, no. 2, pp. 199–206, Apr. 2014.
[5] D. Fernández Llorca, A. Hernández Martínez, and I. García Daza, “Vision-based vehicle speed estimation: A survey,” IET Intell. Transp. Syst., vol. 15, no. 8, pp. 987–1005, Aug. 2021.
[6] A. G. Yabo, S. I. Arroyo, F. Safar, and D. Oliva, “Vehicle classification and speed estimation using computer vision techniques,” in Proc. AADECA Conf., Buenos Aires, Argentina, 2016.
[7] D. C. Luvizon, B. T. Nassu, and R. Minetto, “A video-based system for vehicle speed measurement in urban roadways,” IEEE Trans. Intell. Transp. Syst., vol. 18, no. 6, pp. 1393–1404, Jun. 2017.
[8] C. Wang and A. Musaev, “Preliminary research on vehicle speed detection using traffic cameras,” in Proc. IEEE Int. Conf. Big Data, 2019, pp. 3820–3823.
[9] W.-P. Wu et al., “Design and implementation of vehicle speed estimation using road marking-based perspective transformation,” in Proc. IEEE Veh. Technol. Conf., 2021.
[10] S. S. Wardha et al., “Development of automated technique for vehicle speed estimation and tracking in video stream,” in Proc. IEEE RTEICT, 2017, pp. 940–944.
[11] G. Cheng et al., “Real-time detection of vehicle speed based on video image,” in Proc. ICMTMA, 2020, pp. 313–317.
[12] B. Krishnakumar et al., “Detection of vehicle speeding violation using video processing techniques,” in Proc. ICCCI, 2022.