# EnsembleVehicleDet: Detection of Faraway Vehicles with Real-Time Consideration
## 3 Proposed Method
### Obtaining Detection Results from Transformed Image
On the other hand, in Structure 3, the FP of Structure 3 was decreased, whereas the FN of Structure 3 was increased, compared to Structure 1. Although Structure 3 connected the Stage 2 backbone to the new Stage 2 head directly, the \(\text{AP}_{0.5}\) of Structure 3 was worse than that of Structure 1 due to the insufficient high-level information in the Stage 2 backbone. Since both Structure 4 and Structure 5 combined Structure 2 and Structure 3, they had similar accuracy and speed. In summary, this study focused on improving the accuracy-speed tradeoff. Therefore, Structure 1 (i.e., the removal of Stage 5 from the baseline showing the highest integrated performance \(\text{AP}_{0.5}\)\(\times\) FPS) was selected as the final structure for Model B. A performance comparison of the baseline and proposed method of the 1920 \(\times\) 1216 input image is shown in Table 4. The proposed method using Upsampling #1 could provide the same accuracy as the baseline. On the other hand, the FPS execution speed that measured the total time, including pre-processing and post-processing, increased from 28.80 to 44.80. Hence, the integrated performance of AP\({}_{0.5}\)\(\times\) FPS that measured the target efficiency increased from 23.32 to 36.28, and thus, we denote the proposed method using Upsampling #1 as EnsembleVehicleDet. While we expected the larger effect of a larger RoI on the accuracy by configuring Warping and Upsampling #2 compared to Upsampling #1 in terms of the x-axis, the detection accuracy was slightly lower (0.80 vs. 0.81) or there was no difference (0.81 vs. 0.81) compared to Upsampling #1, respectively. The FPS also showed a slight decrease (44.60 vs. 44.80) or a significant decrease (30.60 vs. 44.80) compared to Upsampling #1. The object density around the center of the image was high in AccumulateImage_S, showing the distribution of small vehicles. While the TP on small vehicles was slightly increased by detecting large regions in terms of the x-axis, the medium and large vehicles' FP within the y-axis range was also increased, which resulted in overall accuracy degradation. The distortion caused by the perspective transformation was assumed to have a greater effect on the accuracy compared to setting the RoI larger. While partially turning at an intersection (hence, small vehicles located outside of the RoI region) in the test dataset was included, the overall accuracy degradation was minimal. Therefore, the two versions of the proposed methods do not seem to have any problem with integration practically. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **Model** & **Resolution 1** & **Resolution 2** & **AP\({}_{0.5}\)** & **FPS** & **AP\({}_{0.5}\)\(\times\) FPS** \\ \hline Baseline & YOLOv7-Tiny & 1920 \(\times\) 1216 & 0.81 & 28.80 & 23.32 \\  & Ensemble-Warping & 960 \(\times\) 608 & 1920 \(\times\) 320 & 0.80 & 44.60 & 35.68 \\ Proposed & Ensemble-Upsampling \#1 & 960 \(\times\) 608 & 1920 \(\times\) 320 & 0.81 & 44.80 & 36.28 \\ Method & Ensemble-Upsampling \#2 & 960 \(\times\) 608 & 3840 \(\times\) 320 & 0.81 & 30.60 & 24.78 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Accuracy–speed performance comparison using a PC GPU (RTX 3090) of 1920 \(\times\) 1216 input images. EnsembleVehicleDet could improve the accuracy–speed tradeoff (i.e., AP\({}_{0.5}\)\(\times\) FPS) of the baseline from 23.32 to 36.28. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Model** & **TP** & **FP** & **FN** & **Precision** & **Recall** & **AP\({}_{0.5}\)** & **FPS** & **AP\({}_{0.5}\)\(\times\) FPS** \\  & \(\uparrow\) & \(\downarrow\) & \(\downarrow\) & \(\uparrow\) & \(\uparrow\) & \(\uparrow\) & \(\uparrow\) & \(\uparrow\) & \(\uparrow\) \\ \hline YOLOv7-Tiny & 112,372 & 28,092 & 60,960 & 0.80 & 0.65 & 0.81 & 28.80 & 23.32 \\
**YOLOv7-Tiny** &



images out of the test dataset's video sequences. In Figures 7, A1, and A2, the first image shows two vehicles parked on the right side of the main road, in addition to many vehicles on the main road.