# From Stationary to Nonstationary UAVs: Deep-Learning-Based Method for Vehicle Speed Estimation
## 3 Data and Methods
### Vehicle Detection and Tracking  
The YOLO algorithm is a significant advancement in real-time object detection, introducing the concept of single-stage detection. It works by dividing the input image into a grid and predicting both bounding boxes and class probabilities from each cell. This unique grid-based approach enables YOLO to perform predictions swiftly, making it an ideal choice for real-time applications, especially on UAV platforms with limited resources [26]. Over time, YOLO has undergone several improvements (discussed in Table 2), resulting in various versions, with each iteration delivering noteworthy improvements in both accuracy and speed. The 8 th generation YOLO architecture has gained widespread attention due to its improved identification capabilities and has been widely tested in several scenarios by academia and industry. The decision to use YOLOv8 over its subsequent iterations, like the 10 th generation YOLO architecture, was also motivated by the superior performance it exhibited in previous research works in detecting larger vehicle classes, such as cars, vans, and trucks. This contrasts with the 10 th generation YOLO, which exhibits improved detection capabilities for smaller objects [27]. YOLOv8, by default, utilizes Bot-SORT for object tracking, which possesses the ability to reidentify objects even if they temporarily disappear, ensuring continuous and accurate object tracking, which is crucial for applications requiring uninterrupted tracking of objects over time [28; 29]. The multiobject tracking algorithm enables the proposed workflow to record the speeds of multiple vehicles simultaneously. In the proposed study, the YOLOv8 model was trained on the VisDrone2019-DET dataset with average precision [EMAIL_ADDRESS] of 64% for the class of interest; cars, which is sufficient for the experiment as the vehicle used for speed measurement remained consistently detected and tracked throughout the input footage. The VisDrone dataset is specifically \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Version** & **Year of Release** & \multicolumn{2}{c}{**Strengths and New Features**} \\ \hline \multirow{3}{*}{YOLOv1} & \multirow{3}{*}{2015} & - & Real-time object detection. \\  & & - & Regression-based approach for bounding box and class \\  & & & probability prediction. \\ \hline YOLOv2 & 2016 & - & Batch normalization and anchor boxes. \\ \hline YOLOv3 & 2018 & - & More efficient backbone network and spatial \\  & & & pyramid pooling. \\ \hline YOLOv4 & 2020 & - & Enhanced with mosaic data augmentation and \\  & & & other upgrades. \\ \hline YOLOv5 & 2020 & - & Hyperparameter optimization and \\  & & & improved performance. \\ \hline YOLOv6 & 2022 & - & Popular for Metituan’s delivery robots. \\ \hline YOLOv7 & 2022 & - & Introduced pose estimation capabilities. \\ \hline YOLOv8 & 2023 & - & Quick feature fusion. \\  & & - & Improved object identification \\ \hline YOLOv9 & 2024 & - & Introduces innovative methods like programmable \\  & & & gradient information and generalized efficient layer \\  & & & aggregation network (CLEAN). \\ \hline YOLOv10 & 2024 & - & IOU-free inference. \\  & & - & Enhanced inference speed. \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The evolution of the You Only Look Once (YOLO) algorithm over the years [30; 31]. designed for object detection in aerial images [21]. The standard Bot-SORT tracker was utilized for object tracking. To prevent overestimations of bounding boxes and the double detection of vehicles close to each other, the intersection over union (IoU) threshold was set to 0.3. This threshold was determined to be sufficient, considering the controlled traffic in the experimental footage. Detection and tracking accuracy are crucial for accurate trajectory extraction. Tracking inaccuracies can introduce noise into vehicle trajectories and consequently impact the speed measurements. However, this noise can be filtered out by implementing a low-pass filter, such as the exponential moving average (EMA) (further discussed in the Section 4).