# From Stationary to Nonstationary UAVs: Deep-Learning-Based Method for Vehicle Speed Estimation
## 4 Results and Discussion  
The experimental results were evaluated based on the speed and positional accuracy of the vehicle tracks by drawing comparisons against the LiDAR-based speed gun measurements and manually drawn vector maps. Speed measurements were conducted under three conditions: a stationary drone, a drone moving at 5 m/s while following the vehicle track, and a drone moving at 10 m/s. The findings indicated that vehicle velocities estimated from the stationary drone had the highest accuracy, exhibiting a minimal absolute error of 0.53 m/s (as discussed in Table 3). However, this error increased as the drone's speed increased. Notably, at higher drone speeds, some discrepancies within the footage were observed. These discrepancies can be attributed to factors such as the increased drone speed, varying wind conditions, and the inherent limitations of gimbal stabilization systems. To address these challenges and improve data quality, we propose adjustments, such as modifying the drone's altitude to cover a broader area and optimizing the UAV's speed. These adjustments are expected to enhance the accuracy of vehicle speed estimations under varying operational conditions. The second challenge of this proposed method is the presence of jumpy vehicle tracks, mainly due to changing inference confidence and the proximity of the detected vehicles. In the case of stationary drone footage, a low-pass filter using exponential moving averages (EMA) was implemented on the centroidal coordinates of the vehicle tracks to stabilize the recorded velocities. EMA stabilizes the abrupt changes in the initial positions reducing fluctuations in velocity estimates. EMA is applied to vehicle positions to ensure the vehicle tracks are smooth and representative of the real-world situation. The smoothing factor \(\alpha\) was set to 0.1, significantly dampening fluctuations within the vehicle tracks. A higher \(\alpha\) becomes more sensitive to fluctuation and increases variability, as shown in Figure 3. \begin{table}
\begin{tabular}{c c c c c c} \hline \multirow{2}{*}{\#} & **Speed Gun** & **Proposed Method** & **Absolute** & **UAV** & **UAV Speed** \\  & **(km/h)** & **(km/h)** & **Error** & **Altitude (m)** & **(m/s)** \\ \hline
1 & 26 & 25.47 & 0.53 & 65 & - \\
2 & 26 & 25.18 & 0.82 & 65 & 5 \\
3 & 30 & 29.44 & 0.55 & 65 & 5 \\
4 & 34 & 33.33 & 0.67 & 65 & 5 \\
5 & 35 & 37.5 & 2.5 & 50 & 10 \\ \hline \end{tabular}
\end{table} 
Table 3: The velocity measurements obtained from this workflow with measurements taken from speed guns at various UAV altitudes and speeds. After applying the exponential moving average (EMA), the positioning of the vehicle tracks aligns consistently with the actual vehicle movements, resulting in more stabilized velocity measurements. Initial velocity measurements are closer to zero, because the filter is applied directly to the positions instead of velocity measurements; therefore, it requires the first few positions to identify movement. This delay can be reduced by increasing the \(\alpha\) but could lead to increased variability in the velocity measurements. Figure 4 shows the original tracks in yellow and the corrected tracks in red after EMA application with \(\alpha\) = 0.1. Resultingly, the vehicle velocity measurements were also stabilized (illustrated in Figure 5). Correcting the vehicle tracks in the stationary drone footage is straightforward. However, tracking vehicles in moving drone footage presents greater challenges, as the drone's movement introduces additional motion, affecting both stationary and moving objects (as shown in Figure 6). In these instances, a more rigorous approach is necessary for effectively removing noise from vehicle tracks. Figure 4: The mapped vehicle trajectories before and after EMA application. Figure 3: Comparison of noisy and EMA-filtered trajectories with different alpha values.