# EnsembleVehicleDet: Detection of Faraway Vehicles with Real-Time Consideration
## 3 Proposed Method
### Obtaining Detection Results from Transformed Image
That is, if the full spatial extent of an object is ambiguous in one frame, information from previous or later frames can be used to constrain the shape. Since we focused on the task of 2D object detection, we only used the center RGB camera from multiple sensors. That is, 39,343 images of learning data were set fortraining and validation (5-fold cross-validation), and 14,572 images of verification data were used for testing. The details of the Argoverse data can be found in [32]. The deep learning model was trained on a PC with an AMD Ryzen 5950\(\times\) 16-core processor, GeForce RTX 3090 GPU, and 32 GB of RAM. Regarding the specification for training the model, the number of iterations was 30,000, the learning rate was 0.00261, and the anchor box was classified as 9 anchors using the k-means algorithm. The accuracy of the proposed method was evaluated using the following metrics, where TP is true positive, FP is false positive, and FN is false negative:

* Precision, defined as TP/(TP + FP), means the false detection rate of the proposed method;
* Recall, defined as TP/(TP + FN), means the missed detection rate of the proposed method;
* \(\text{AP}_{0.5}\), defined as the average precision (AP) evaluated for vehicle class, means the target accuracy of the proposed method when the IoU of the detection box and the GT is more than 0.5. Additionally, a recently reported tiny version of YOLOv7 was applied and implemented to consider real-time processing on a low-cost commercial GPU. Particularly, rather than deriving the results optimized for a specific detector on a specific GPU, we assumed a general setup that considered the tradeoff between detection accuracy and execution speed for vehicle detection. In other words, lightweight techniques, such as pruning and quantization, were not applied. ### Detection Performance

Generally, an ensemble method focuses solely on improving the accuracy compared to the baseline model by using multiple and different models. On the other hand, this study proposes an integrated performance of \(\text{AP}_{0.5}\)\(\times\) FPS that determines the cost-effectiveness. This integrated performance focuses on the accuracy-speed tradeoff instead of the prior ensemble method's purpose (i.e., accuracy only). Additionally, experiments, following the proposed pre-processing methods, of the 'Ensemble-Warping', 'Ensemble-Upsampling #1', and 'Ensemble-Upsampling #2' versions were conducted. The CPU pre-processing time was pipelined by having it processed, while Model A was processed by a GPU. Therefore, execution speed reduction caused by image processing was alleviated. Table 3 shows an accuracy-speed comparison of various Model B structures for small vehicle detection, as shown in Figure 6. There are many metrics to show accuracies such as Precision, Recall, and \(\text{AP}_{0.5}\). In the experiment, \(\text{AP}_{0.5}\) was chosen as the target accuracy metric, as it is most often used for object detection accuracy. Additionally, FPS was chosen as the target speed metric, which is a metric measuring the execution speed with frames per second. The structure that showed the highest FPS was Structure 1, as Stage 5 was removed from the baseline model with nothing added. Compared to the baseline model, the FP was decreased, whereas the FN was increased. Although \(\text{AP}_{0.5}\) was degraded, the highest FPS of Structure 1 could provide the best \(\text{AP}_{0.5}\)\(\times\) FPS among the five possible structures for Model B. By adding the Stage 2 neck to Structure 1 in Structure 2, the FP of Structure 2 was increased (i.e., degraded Precision), whereas the FN of Structure 2 was decreased (i.e., improved Recall), compared to Structure 1. Although Structure 2 could provide better \(\text{AP}_{0.5}\) than Structure 1, the integrated performance of Structure 2 was worse than that of Structure 1 due to the low speed. Note that \(\text{AP}_{0.5}\) is the precision metric, and thus, a higher \(\text{AP}_{0.5}\) does not guarantee a higher recall rate.