| Literature DB >> 34239973 |
Pritul Dave1, Arjun Chandarana1, Parth Goel1, Amit Ganatra2.
Abstract
The traffic congestion and the rise in the number of vehicles have become a grievous issue, and it is focused worldwide. One of the issues with traffic management is that the traffic light's timer is not dynamic. As a result, one has to remain longer even if there are no or fewer vehicles, on a roadway, causing unnecessary waiting time, fuel consumption and leads to pollution. Prior work on smart traffic management systems repurposes the use of Internet of things, Time Series Forecasting, and Digital Image Processing. Computer Vision-based smart traffic management is an emerging area of research. Therefore a real-time traffic light optimization algorithm that uses Machine Learning and Deep Learning Techniques to predict the optimal time required by the vehicles to clear the lane is presented. This article concentrates on a two-step approach. The first step is to obtain the count of the independent category of the class of vehicles. For this, the You Only Look Once version 4 (YOLOv4) object detection technique is employed. In the second step, an ensemble technique named eXtreme Gradient Boosting (XGBoost) for predicting the optimal time of the green light window is implemented. Furthermore, the different implemented versions of YOLO and different prediction algorithms are compared with the proposed approach. The experimental analysis signifies that YOLOv4 with the XGBoost algorithm produces the most precise outcomes with a balance of accuracy and inference time. The proposed approach elegantly reduces an average of 32.3% of waiting time with usual traffic on the road.Entities:
Keywords: Computer vision; Deep learning; Machine learning; Object detection; Regression analysis; YOLOv4; eXtreme Gradient Boosting (XGBoost)
Year: 2021 PMID: 34239973 PMCID: PMC8237335 DOI: 10.7717/peerj-cs.586
Source DB: PubMed Journal: PeerJ Comput Sci ISSN: 2376-5992
Figure 1Flowchart for the Smart Traffic Management System.
Algorithm for green light prediction.
| Set of Region of Interest (N) |
| WAIT; |
Figure 2Cross-Roads undertaken for analytics from Vadodara City—(Map data ©2021 Google).
Figure 3Different object detection algorithm analysis for traffic at cross-road in the day time (A) OpenCV DNN Leaky YOLOv4 (B) OpenCV DNN Mish YOLOv4 (C) ONNX YOLOv4 (D) PP-YOLO (E) Darknet YOLOv4 (F) Darknet YOLOv4 Tiny.
Figure 4Different object detection algorithm analysis for traffic at cross-road in the night time (A) OpenCV DNN Leaky YOLOv4 (B) OpenCV DNN Mish YOLOv4 (C) ONNX YOLOv4 (D) PP-YOLO (E) Darknet YOLOv4 (F) Darknet YOLOv4 Tiny.
YOLO object detection comparison between YOLOv4 ONNX, YOLOv4 Darknet, YOLOv4 Darknet Tiny YOLOv4, PP-YOLO, OpenCV Leaky YOLOv4 and OpenCV YOLOv4.
The inference time and accuracy is calculated by using fixed computational environment.
| Architecture | Inference time | Inference time | AP50 | APM |
|---|---|---|---|---|
| YOLOv4 ONNX | ∼3.1327 s | ∼3.168 s | 44.4% AP | |
| YOLOv4 Darknet | ∼8.865 s | ∼8.965 s | 44.4% AP | |
| YOLOv4 Darknet Tiny | 40.2% | – | ||
| PP-YOLO | ∼4.489 s | ∼4.468 s | 62.8% | |
| ∼1.40821 s | ∼1.4109 s | 62.7% | 43.7% AP | |
| OpenCV Mish YOLOv4 | ∼1.6733 s | ∼1.679 s | 44.4% AP |
Regression Model Comparison between Elastic Net, Support Vector Machine Regressor (SVR), Random Forest Regressor and eXtreme Gradient Boosting Tree based (XGBoost GBT).
The hyperparameters of each model are optimized for training, validation and testing set.
| Model | Hyper-parameters | Training set | Cross validation | Testing set |
|---|---|---|---|---|
| Elastic Net | Degree: 2 | R2: 0.7891 | R2: 0.7936 | R2: 0.638 |
| Interaction: True | MSE: 34.56 | MSE: 36.672 | MSE: 21.79 | |
| Learning Rate: 0.05 | ||||
| L1 ratio: 0.5 | ||||
| SVR | Kernel: poly | R2: 0.8207 | R2: 0.7964 | R2: 0.7321 |
| Degree: 3 | MSE: 35.157 | MSE: 35.323 | MSE: 22.39 | |
| C: 4.688 | ||||
| Random Forest regressor | N estimators: 120 | R2: 0.98 | R2: 0.8932 | R2: 0.8933 |
| Max depth: 58 | MSE: 3.592 | MSE: 18.918 | MSE: 19.16 | |
| XGBoost GBT | N estimators: 76 | |||
| max depth: 120 | ||||
| learning rate: 0.35 | ||||
| gamma: 0.018 | ||||
| base score: 0.578 |
Waiting Time Reduced by XGBoost in comparison to Static Time.
The parameters used for prediction are number of Cars, Bus or Trucks, Bike and Precipitation.
| CAR | BUS and TRUCK | BIKE | RAIN | XGBoost predicted (in s) | Static Time (in s) | Reduced waiting time |
|---|---|---|---|---|---|---|
| 1 | 6 | 5 | YES | 48 | 60 | 20% |
| 4 | 5 | 2 | NO | 48 | 60 | 20% |
| 5 | 2 | 5 | YES | 40 | 60 | 33% |
| 7 | 1 | 3 | YES | 44 | 60 | 27% |
| 2 | 4 | 5 | YES | 35 | 60 | 42% |
| 3 | 2 | 4 | NO | 32 | 60 | 47% |
| 4 | 1 | 1 | YES | 27 | 60 | 55% |
Figure 5Histogram along with Kernel Density Estimation for the predictive model.
Figure 6Average value time between model predicted and labelled for training (A) 25% of Vehicles (B) 50% of Vehicles (C) 75% of Vehicles (D) 100% of Vehicles.
Figure 7Average value time.