## 4 Experimental Results
### Experimental Results  
Processing each image frame takes 85.87 ms on average; thus, we achieved a frame rate of approximately 11.64 frames per second. The average amount of processing time per algorithm step is summarized in Table 4.  
For object detection training using YOLOv9, the dataset is organized into training, validation, and test sets at a 6:2:2 ratio, as presented in Table 5.  
The object compositions of each set are listed in Table 6. The car class comprises the largest number of objects, buses and trucks are less represented, and motorcycles have the fewest instances. Table 7 presents the results of transfer learning using the YOLOv9 model. The precision was 90.1%, and the recall was 82.8%. A higher precision than recall indicates a greater probability of failing to detect an object but a lower probability of incorrectly detecting the object. Specifically, for motorcycles, the recall is low, at 80.2%, due to their small size, while for cars, the recall is 79.5%, which can be attributed to a reduction in detection performance for vehicles in the opposite lane on urban roads. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Step**} & **Lane** & **Vehicle** & **Collision** & \multirow{2}{*}{**Sum**} \\  & **Detection** & **Detection** & **Warning** & \\ \hline Average time & 22.72 ms & 63.15 ms & \textless{}0.01 ms & 85.87 ms \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Execution time for each step. Figure 14: Example test images: (**a**) under bridge on highway, (**b**) shadows, (**c**) under bridge on urban road, (**d**) many objects on urban road, (**e**) red-colored lane, (**f**) crosswalk, (**g**) highway, and (**h**) many objects on highway. A comparison with the Faster RCNN method was conducted [34]. The results of the Faster RCNN are shown in Table 8, and it can be observed that the results of YOLOv9 are favorable. The Faster RCNN utilizes the largest portion of the dataset, but since motorcycles, buses, and trucks have less training data, it can be seen that the precision and recall for these categories are lower compared to those for cars. Table 9 shows the results under highway conditions. The precision in highway situations is 94.3%, and the recall is 92.8%. Motorcycles were excluded from the dataset as they are not typically found on highways. The performance difference between highways and urban roads is due to two main factors: (1) the presence or absence of motorcycles and (2) the presence or absence of vehicles in the opposite lane. First, the absence of motorcycles on the highway contributed to the performance difference. Additionally, on highways, vehicles in the opposite lane are not visible due to the median barrier. In contrast, on urban roads, vehicles in the opposite lane are visible, which results in a lower detection rate for vehicles in the opposite lane. Consequently, the detection rate is higher on highways. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Training Set** & **Validation Set** & **Test Set** \\ \hline Motorcycle & 294 & 86 & 85 \\ Car & 28,925 & 9695 & 9644 \\ Bus & 1549 & 524 & 521 \\ Truck & 1704 & 591 & 583 \\ \hline Total & 32,472 & 10,896 & 10,833 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Number of objects in each class. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Test Set** & **Precision** & **Recall** \\ \hline Motorcycle & 85 & 86.5 & 80.2 \\ Car & 9644 & 91.5 & 79.5 \\ Bus & 521 & 91.2 & 86.5 \\ Truck & 583 & 91.1 & 85 \\ \hline Total & 10,833 & 90.1 & 82.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Transfer learning result using YOLOv9. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Class** & **Test Set** & **Precision** & **Recall** \\ \hline Motorcycle & 85 & 57.10 & 78.43 \\ Car & 9644 & 71.69 & 77.22 \\ Bus & 521 & 54.84 & 59.07 \\ Truck & 583 & 57.57 & 74.43 \\ \hline Total & 10,833 & 70.28 & 77.20 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Transfer learning result using Faster RCNN.