TRAFFIC FLOW DETECTION USING YOLOV4 AND DEEPSORT ON NVIDIA JETSON NANO
Abstract
Abstract: This study aims to develop a Deep Learning-based Traffic Flow Detector to automatically and accurately observe traffic flow. Conventional traffic observation is often conducted manually or via CCTV, but it is prone to human error and difficult to use for real-time trend analysis. In this study, the YOLOv4 method is used to detect four types of vehicles (cars, motorcycles, buses, trucks). To continuously track vehicle movement and address occlusion issues, the Deep SORT algorithm is implemented. The YOLOv4 model used is a pre-trained model and was tested on seven CCTV video recordings obtained from the official website of the Pekanbaru City Transportation Department. The system was implemented on a limited device, the Nvidia Jetson Nano, as a simulation of direct CCTV integration. Test results showed a highest precision of 98%, but the maximum accuracy achieved was only 26%. This low accuracy is influenced by several factors, including video resolution, detection model quality, and lighting conditions. Nevertheless, the system demonstrates potential to support future traffic management and engineering decisions but still requires further optimization, including improving video resolution and quality, retraining the model with a more representative local dataset, using lighter and more accurate detection models, and optimizing the tracking algorithm.
Keywords: deep learning; deepsort; NVIDIA Jetson NANO; traffic flow; YOLOv4
Abstrak: Penelitian ini bertujuan mengembangkan Traffic Flow Detector berbasis Deep Learning untuk mengobservasi arus lalu lintas secara otomatis dan akurat. Observasi lalu lintas konvensional sering dilakukan secara manual atau melalui CCTV, namun rentan terhadap human error dan sulit digunakan untuk menganalisis tren secara real-time. Pada penelitian ini digunakan metode YOLOv4 untuk mendeteksi empat jenis kendaraan (mobil, motor, bus, truk). Untuk melacak pergerakan kendaraan secara berkelanjutan dan mengatasi masalah occlusion, digunakan algoritma Deep SORT. Model YOLOv4 yang digunakan merupakan pre-trained model dan diujikan pada tujuh rekaman video CCTV yang diambil dari situs resmi Dinas Perhubungan Kota Pekanbaru. Sistem ini diimplementasikan pada perangkat terbatas Nvidia Jetson Nano sebagai simulasi penerapan langsung pada CCTV. Hasil pengujian menunjukkan presisi tertinggi mencapai 98%, namun akurasi tertingginya hanya sebesar 26%. Rendahnya akurasi dipengaruhi oleh beberapa faktor seperti resolusi video, kualitas model deteksi, serta kondisi pencahayaan. Meski demikian, sistem ini menunjukkan potensi untuk membantu pengambilan keputusan dalam manajemen dan rekayasa lalu lintas di masa depan, namun masih membutuhkan optimasi lebih lanjut, seperti peningkatan kualitas video input, pelatihan ulang model dengan dataset lokal, penggunaan model deteksi yang lebih ringan dan akurat serta pengoptimalan algoritma pelacakan.
Kata kunci: deep learning deepsort; Nvidia Jetson Nano; traffic flow; YOLOv4
References
A. M. Santos, C. J. A. Bastos-Filho, A. M. A. MacIel, and E. Lima, “Counting Vehicle with High-Precision in Brazilian Roads Using YOLOv3 and Deep SORT,” Proc. - 2020 33rd SIBGRAPI Conf. Graph. Patterns Images, SIBGRAPI 2020, pp. 69–76, 2020.
B. Y. Maram and A. Boukerche, “Context Prediction of Highways Based on The Vehicular Traffic Distribution,” IEEE Int. Conf. Commun., pp. 1–6, 2021.
P. Khorramshahi, V. Shenoy, M. Pack, and R. Chellappa, “Scalable and Real-time Multi-Camera Vehicle Detection, Re-Identification, and Tracking,” pp. 1–13, 2022.
Y. Djenouri, A. Belhadi, G. Srivastava, D. Djenouri, and J. Chun-Wei Lin, “Vehicle detection using improved region convolution neural network for accident prevention in smart roads,” Pattern Recognit. Lett., vol. 158, pp. 42–47, 2022.
Y.-L. Li, H.-T. Li, and C.-K. Chiang, “Multi-Camera Vehicle Tracking Based on Deep Tracklet Similarity Network,” Electron., 2022.
Y. Zhang, Z. Guo, J. Wu, Y. Tian, H. Tang, and X. Guo, “Real-Time Vehicle Detection Based on Improved YOLO v5,” Sustain., vol. 14, no. 19, 2022.
M. I. Uddin, M. S. Alamgir, M. M. Rahman, M. S. Bhuiyan, and M. A. Moral, “AI Traffic Control System Based on Deepstream and IoT Using NVIDIA Jetson Nano,” Int. Conf. Robot. Electr. Signal Process. Tech., pp. 115–119, 2021.
A. Saadeldin and M. M. Rashid, “Video-Based Vehicle Counting and Analysis using YOLOv5 and DeepSORT with Deployment on Jetson Nano,” Asian J. Electr. Electron. Eng., vol. 2, no. 2, pp. 11–20, 2022.
F. Imanuel, S. K. Waruwu, A. Linardy, and A. M. Husein, “Review Application of YOLO Algorithm for Detection and Tracking,” J. Comput. Networks , Archit. High Perform. Comput., vol. 6, no. 3, pp. 1378–1383, 2024.
Al-qaness, M.A.A., Abbasi, A.A., and H. Fan, “An improved YOLO-based road traffic monitoring system,” Computing, vol. 103, pp. 211–230, 2021.
Z. Rahman, A. M. Ami, and M. A. Ullah, “A Real-Time Wrong-Way Vehicle Detection Based on YOLO and Centroid Tracking,” 2020 IEEE Reg. 10 Symp. TENSYMP 2020, no. June, pp. 916–920, 2020.
H. Song, H. Liang, H. Li, Z. Dai, and X. Yun, “Vision-based vehicle detection and counting system using deep learning in highway scenes,” Eur. Transp. Res. Rev., vol. 11, no. 1, 2019.
Y. Zhao et al., “A novel vehicle tracking id switches algorithm for driving recording sensors,” Sensors (Switzerland), vol. 20, no. 13, pp. 1–15, 2020.
H. Park, S. H. Ham, T. Kim, and D. An, “Object Recognition and Tracking in Moving Videos for Maritime Autonomous Surface Ships,” J. Mar. Sci. Eng., vol. 10, no. 7, pp. 1–17, 2022.
S. Park et al., “Edge-computing Enabled Traffic State Estimation Based on Vehicle Tracking,” Soc. Sci. Res. Netw., 2022.
S. Tak, J. D. Lee, J. Song, and S. Kim, “Development of AI-Based Vehicle Detection and Tracking System for C-ITS Application,” J. Adv. Transp., vol. 2021, pp. 78311–78319, 2021.
X. C. Vuong, R. F. Mou, and T. T. Vu, “Vehicle Tracking and Speed Estimation Under Mixed Traffic Conditions Using Yolov4 and Sort: a Case Study of Hanoi,” Transp. Probl., vol. 17, no. 4, pp. 17–26, 2022.
J. Zhao et al., “Improved Vision-Based Vehicle Detection and Classification by Optimized YOLOv4,” IEEE Access, vol. 10, no. i, pp. 8590–8603, 2022.
X. Liu and Z. Zhang, “A Vision-Based Target Detection, Tracking, and Positioning Algorithm for Unmanned Aerial Vehicle,” Wirel. Commun. Mob. Comput., vol. 2021, 2021.
C. Y. Wang, A. Bochkovskiy, and H. Y. M. Liao, “Scaled-yolov4: Scaling cross stage partial network,” Proc. IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit., no. June, pp. 13024–13033, 2021.
S. Kumar et al., “Fusion of Deep Sort and Yolov5 for Effective Vehicle Detection and Tracking Scheme in Real-Time Traffic Management Sustainable System,” Sustain., vol. 15, no. 24, 2023.
F. E. Purwiantono and A. Aditya, “Klasifikasi Sentimen Sara, Hoaks Dan Radikal Pada Postingan Media Sosial Menggunakan Algoritma Naive Bayes Multinomial Text,” J. Tekno Kompak, vol. 14, no. 2, p. 68, 2020.
F. Rofii, G. Priyandoko, M. I. Fanani, and A. Suraji, “Peningkatan Akurasi Penghitungan Jumlah Kendaraan dengan Membangkitkan Urutan Identitas Deteksi Berbasis Yolov4 Deep Neural Networks,” Teknik, vol. 42, no. 2, pp. 169–177, 2021.