Anomalies Detection in Traffic Video Stream Using Computer Vision and Deep Learning

Authors

  • V. O. Romanets Vinnytsia National Technical University
  • R. V. Maslii Vinnytsia National Technical University

DOI:

https://doi.org/10.31649/1997-9266-2025-182-5-146-155

Keywords:

anomaly detection, traffic surveillance, YOLOv8, OC-SORT, homography, computer vision

Abstract

The article considers the problem of detecting anomalies in the video stream from traffic surveillance cameras, which is an important element of modern intelligent transport systems. An object-centric approach “detector-tracker-analyzer of anomalies” is proposed, which provides increased reliability of automatic detection of anomalous events, in particular, driving at a prohibitory traffic light signal, speeding, emergency braking and prolonged stay in the intersection zone. The method is based on the modern object detector YOLOv8n, which is characterized by high processing speed and acceptable accuracy for real-time tasks, as well as the OC-SORT tracker, which demonstrates increased resistance to short-term occlusions and reduces the number of false associations in a dense traffic flow. To determine the speed characteristics of vehicles, a homographic transformation was used taking into account the camera calibration, which made it possible to correctly translate the coordinates of objects into the world system.

To test the efficiency of the approach, the proprietary dataset based on open source videos (Friant Roulette channel, California) was generated, containing both normal and abnormal situations. A total of 160 video fragments were used. The experiments demonstrated that the use of the combination of YOLOv8n + OC-SORT provides higher accuracy compared to the basic combination of YOLOv8n + SORT, which is confirmed by the increase in the Matthews correlation coefficient (MCC) values. The best results were obtained for anomalies such as “running a red light” (MCC = 0.909) and “being in the intersection zone” (MCC = 0.881). The results for “speeding” (MCC = 0.815) and “emergency braking” (MCC = 0.505) were somewhat worse, which is explained by the sensitivity to the quality of the video stream, viewing angle and camera stability.

The developed approach is promising for the integration into intelligent traffic monitoring systems, as it allows automating the process of detecting violations and reducing the workload on operators. Further development directions include the optimization of the detector model architecture, using re-identification modules to reduce the number of false associations, improving speed estimation algorithms, and expanding the list of anomalies, such as pedestrians on the roadway or prohibited parking.

Author Biographies

V. O. Romanets, Vinnytsia National Technical University

 Post-Graduate Student of the Chair of Automation and Intellectual Informational Technologies

R. V. Maslii, Vinnytsia National Technical University

Cand. Sc. (Eng.), Associate Professor of the Chair of Automation and Intellectual Informational Technologies

References

P. Wu, C. Pan, Y. Yan, G. Pang, P. Wang, and Y. Zhang, “Deep learning for video anomaly detection: A review,” arXiv preprint arXiv:2409.05383, Sep. 2024. [Online]. Available: https://arxiv.org/abs/2409.05383 . Accessed: 06.09.2025.

H.-T. Duong, V.-T. Le, and V. T. Hoang, “Deep learning-based anomaly detection in video surveillance: A survey,” Sensors, vol. 23, no. 11, Art. 5024, 2023. https://doi.org/10.3390/s23115024 .

A. Adam, E. Rivlin, I. Shimshoni, and D. Reinitz, “Robust real-time unusual event detection using multiple fixed-location monitors,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 30, no. 3, pp. 555-560, Mar. [1] 2008.

B. T. Morris, and M. M. Trivedi, “Learning trajectory patterns by clustering: Experimental studies and comparative evaluation,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2011, pp. 312-319.

W. Hu, X. Xiao, Z. Fu, D. Xie, T. Tan, and S. Maybank, “A system for learning statistical motion patterns,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 28, no. 9, pp. 1450-1464, Sep. 2006.

N. Choudhry, J. Abawajy, S. Huda, and I. Rao, “A comprehensive survey of machine learning methods for surveillance videos anomaly detection,” IEEE Access, vol. 11, pp. 114680-114713, 2023. https://doi.org/10.1109/ACCESS.2023.3321800 .

Р. В. Маслій, В. В. Гармаш, П. П. Ковальчук, і В. В. Кабачій. «Аналіз методів знаходження аномалій у зображеннях,» Інформаційні технології та комп’ютерна інженерія, вип. 59 (1), с. 13-22, 2024. https://doi.org/10.31649/1999-9941-2024-59-1-13-22 . Дата звернення: 06.09.2025.

Г. Д. Симбирский, «Аналіз методів виявлення аномалій у відеоряді камер відеоспостереження на транспорті,» Вісник Харківського національного автомобільно-дорожнього університету, вип. 98, с. 26-36, 2022. https://doi.org/10.30977/BUL.2219-5548.2022.98.0.26 . Дата звернення: 06.09.2025.

M. Hasan, J. Choi, J. Neumann, A. K. Roy-Chowdhury, and L. S. Davis, “Learning temporal regularity in video sequences,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition(CVPR), 2016, pp. 733-742.

W. Liu, W. Luo, D. Lian, and S. Gao, “Future frame prediction for anomaly detection–a new baseline,” Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition(CVPR), 2018, pp. 6536-6545.[Electronic resource]. Available: https://arxiv.org/abs/1712.09867 . Accessed: 06.09.2025.

О. К. Колесницький, С. В. Кукунін, М. Ю. Дерев’янко, А. А. Преподобний, і Мендеш Да Майа, «Розпізнавання нетипових ситуацій на дорозі за допомогою згорткової нейронної мережі,» Оптико-електронні інформаційно-енергетичні технології, № 38(2), с. 38-44, 2020. https://doi.org/10.31649/1681-7893-2019-38-2-38-44 .

M. Rezaei, M. Azarmi, and F. M. P. Mir, “Traffic-net: 3D traffic monitoring using a single camera,” arXiv preprint arXiv:2109.09165, Sep. 2021. [Online]. Available: https://arxiv.org/abs/2109.09165 . Accessed: 06.09.2025.

G. D’amicantonio, and E. Bondarau, “uTRAND: Unsupervised anomaly detection in traffic trajectories,” Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition(CVPR), 2024, pp. 7638-7645. [Online]. Available: https://arxiv.org/abs/2404.12712 . Accessed: 06.09.2025.

D. C. Luvizon, B. T. Nassu, and R. Minetto, “A video-based system for vehicle speed measurement in urban roadways,” IEEE Transactions on Intelligent Transportation Systems, vol. 18, no. 6, pp. 1393-1404, Sep. 2017. https://doi.org/10.1109/TITS.2016.2606369 .

M. Dubská, A. Herout, and J. Sochor, “Automatic camera calibration for traffic understanding,” Proceedings of the British Machine Vision Conference (BMVC), 2014, vol. 4, p. 8.

J. Sochor, R. Juránek, and A. Herout, “Traffic surveillance camera calibration by 3D model bounding box alignment for accurate vehicle speed measurement,” Computer Vision and Image Understanding, vol. 161, pp. 87-98, Jan. 2017.

V. Bartl, J. Špaňhel, P. Dobeš, R. Juránek, and A. Herout, “Automatic camera calibration by landmarks on rigid objects,” Mach. Vis. Appl., vol. 32, no. 1, pp. 1-13, 2021.

J. Revaud, and M. Humenberger, “Robust automatic monocular vehicle speed estimation for traffic surveillance,” in Proc. IEEE/CVF International Conference on Computer Vision(ICCV), 2021, pp. 4551-4561.

YOLOv8 vs Faster R-CNN: A Comparative Analysis, Keylabs, May 30, 2025. [Electronic resource]. Available: https://keylabs.ai/blog/yolov8-vs-faster-r-cnn-a-comparative-analysis/ . Accessed: 08.09.2025.

M. Yaseen, “What is YOLO v8: An in-depth exploration of the internal features of the next-generation object detector,” arXiv preprint, arXiv:2408.15857, Aug. 2024. [Online]. Available: https://arxiv.org/pdf/2408.15857 Accessed: 06.09.2025.

J. Cao, J. Pang, X. Weng, R. Khirodkar, and K. Kitani, “Observation-centric SORT: Rethinking SORT for robust multi-object tracking,” Proceedings of the IEEE / CVF Conference on Computer Vision and Pattern Recognition(CVPR), 2023, pp. 9686-9696.

A. Bewley, Z. Ge, L. Ott, F. Ramos, and B. Upcroft, “Simple online and realtime tracking,” IEEE International Conference on Image Processing (ICIP), 2016, pp. 3464-3468.

N. Wojke, A. Bewley, and D. Paulus, “Simple online and realtime tracking with a deep association metric,” IEEE International Conference on Image Processing (ICIP), 2017, pp. 3645-3649.

A. P. Shah, J. B. Lamare, T. Nguyen-Anh, and A. Hauptmann, “CADP: A novel dataset for CCTV traffic camera based accident analysis,” 15th IEEE International Conference on Advanced Video and Signal Based Surveillance(AVSS), 2018, pp. 1-9. [Online]. Available: https://arxiv.org/pdf/1809.05782 . Accessed: 06.09.2025.

P. Pradeep Kumar and K. Kant, “TU-DAT: A computer vision dataset on road traffic anomalies,” Sensors, vol. 25,

no. 11, Art. 3259, 2025. [Online]. Available: https://www.mdpi.com/1424-8220/25/11/3259 . Accessed: 06.09.2025.

Friantroulette, YouTube [Electronic resource]. Available: https://www.youtube.com/@friantroulette . Accessed: 06.09.2025.

Downloads

Abstract views: 74

Published

2025-10-31

How to Cite

[1]
V. O. Romanets and R. V. . Maslii, “Anomalies Detection in Traffic Video Stream Using Computer Vision and Deep Learning”, Вісник ВПІ, no. 5, pp. 146–155, Oct. 2025.

Issue

Section

Information technologies and computer sciences

Metrics

Downloads

Download data is not yet available.