Vehicle Detection and Counting for Traffic Congestion Estimation Using YOLOv5 and DeepSORT in Smart Traffic Light Application
Keywords:
Deep learning, YOLOv5, DeepSORTAbstract
The escalating number of vehicles on the roads has exacerbated traffic congestion, presenting a significant and inevitable challenge for road users. To address this issue, deep learning algorithms, including YOLOv5 and DeepSORT, have been leveraged to enable vehicle detection and estimate the number of vehicles through image processing. This study focuses on training a custom YOLOv5 dataset of vehicles and compares its performance with a pretrained YOLOv5 dataset in terms of feasibility for detecting and estimating the number of vehicles. In the proposed approach, YOLOv5 is employed to detect vehicles in video streams, while DeepSORT is used for vehicle tracking and counting as they pass through the detection zone. The number of vehicles in each lane is estimated with the aid of Supervision techniques. The custom dataset's validation demonstrates promising results, with the precision curve indicating convergence for all classes at 97.4% precision and an 87% accuracy in predicting vehicle classes. Additionally, the precision-recall curve assesses that the ability to detect individual vehicle categories, such as bus, car, motorcycle, and truck, with accuracies of 68.2%, 95.2%, 79.9%, and 70.1%, respectively. Furthermore, the overall accuracy for detecting all vehicle classes combined is 78.3%. The F1 curve indicates that the system achieves a confidence level of 30.9% F1 score, ensuring 78% confidence in accurately predicting all classes. Both the pretrained and custom datasets exhibit similar accuracy in counting the total number of vehicles passing through the detection zone, as well as estimating the number of vehicles in each lane. However, it is evident that the custom dataset's performance can be further improved by incorporating more extensive and diverse datasets during the training process to enhance the accuracy of vehicle detection and estimation. In conclusion, the integration of deep learning algorithms, specifically YOLOv5 and DeepSORT, offers a promising solution for addressing traffic congestion by efficiently detecting and estimating vehicle numbers. Continued research with larger datasets can lead to further advancements and refined results in the field of traffic management and optimization.
Downloads
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Online Journal for TVET Practitioners

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.







