## 3 Results and Discussion
### Model Comparison
A comparative analysis was conducted to evaluate the performance of the YOLOv7x-SORT algorithm in quantifying the number of cars, shuttles, buses, and motorcycles. Due to the system's susceptibility to environmental influences, an assessment of its efficacy was conducted across various time periods and weather conditions. To evaluate the model's performance in each class, we compared the obtained results and the manual count. Figure 6 displays the ground truth, detected vehicles, and corresponding accuracy percentages (%) for each vehicle class across the eight traffic surveillance video streams. The YOLOv7x-SORT algorithm demonstrated high accuracy in detecting and classifying vehicles and providing precise quantification results. The overall detection accuracy was found to be 94.2% for cars, 91.8% for buses, 91.0% for shuttles, and 71.9% for motorcycles. The majority of the vehicles in the video streams consisted of the car class, and the count for the car object class is highly precise, with an overall mean accuracy score of 94.2%. The accuracy rates of the algorithm for detecting the motorcycle class are lower compared to other classes. Its efficacy in detecting small objects, such as motorcycles, in congested traffic was the lowest at 68.7%. Similar to our study, [PERSON] et al. [14] utilized the YOLO-SORT algorithm to estimate traffic flow and reported a highly precise count for the car object class with a mean accuracy score of 0.95. In contrast, they achieved a mean accuracy score of 0.16 for the bus category, and this is attributed to the limited number of bus images in the training dataset. The algorithm has challenges in accurately identifying high-speed motorcycles and has limited ability to effectively monitor vehicles under conditions of variable and high traffic speeds. Consistent with our findings, other studies have demonstrated a deficiency in the YOLO algorithm's ability to accurately identify small objects [49; 50; 51]. In the proposed model, the tracking algorithm uses the center positions of vehicles, derived from the output of the object identification model instead of image information. The primary objective of the tracking algorithm is to accurately predict the future location of vehicles by employing the Kalman filter. A decline in performance arises when a vehicle's distance from the projected location falls below a predetermined threshold value as a result of changes in traffic speed, leading to a shift in its associated identity. Another issue identified pertains to the misclassification of shuttles as cars across different camera perspectives and the assignment of dual IDs to large vehicles as a result of inadequate background modeling. Furthermore, due to the low-quality visual output that cameras occasionally produce, the algorithm fails to detect and track some vehicles in certain frames. Figure 5: A visual representation of the classes, assigned names, and tracks of the vehicles in the video streams. [PERSON] [52] utilized YOLO under different weather and diurnal variations for traffic detection. This study had varied video conditions. [PERSON] et al. [53] counted vehicles and estimated their speed by YOLOv4 and proposed further study of detection during traffic jams. Actually, this study had the conditions of congested traffic. Under situations of low traffic density, during night-time, the model achieved a maximum accuracy of 100% for each class. In contrast, when the total number of vehicles on the line increases, the accuracy rates for all classes decline, as demonstrated in video 2-4. Especially during night-time and rainy weather conditions, when the vehicle's headlights illuminate the front, it creates variations in the object's contours and makes it difficult for the proposed model to accurately identify and classify objects on the road. The significant decline in accuracy in video 2-2 is attributed to the vehicle headlights illuminating the rainwater on the road. In the study conducted by [PERSON] et al.