## 3 Proposed Methods
### Edge Video Detection Acceleration Based on Motion Inference  
Based on the characteristics of airport apron operations, there are two proposed acceleration strategies shown in Figure 3 in order to further accelerate edge detection and reduce the power consumption of edge devices. The first strategy is to avoid detection of some idle periods. There is a statistic of work time and free time of a certain apron shown in Figure 4. The operation of the apron is not continuous. There is a long idle period between the two jobs that totals more than half of the total time. Obviously, it is not necessary to detect idle periods when no jobs are taking place. Therefore, it is important to distinguish whether the current airport apron is in operation and skip the detection of idle periods to save computing power and power consumption. The video is divided into small segments with a duration of T (in order to avoid too long detection delay, T should take a small value. T takes 1 s, 2 s, 3 s, 4 s, 5 s in the experiments). According to whether object position changed in the segment, the judger decides whether the detection can be skipped (As shown in Figure 5). The Algorithm 1 is used to determine whether the position of an object has changed in a segment. In Algorithm 1, the parameter \(T_{apra}\) represents the pixel value of the minimum object to be detected, which can be determined according to the specific detection task. The parameter \(T_{pixel}\) represents the minimum pixel change of the object movement. We recommend a value of 10 to 20. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Params** & **FLOPS** & **Model Size (Half Precision)** \\ \hline YOLOv5s backbone & 3.80 M & 4.42 G & 13.1 MB \\ ShuffleNetv2 [10] & 0.25 M & 0.31 G & 626 KB \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Parameters and calculation complexity comparison of backbone. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model** & **Params** & **FLOPS** & **Model Size (Half Precision)** \\ \hline YOLOv5s head & 3.00 M & 2.79 G & 5.78 MB \\ Edge-YOLO head & 0.25 M & 0.21 G & 455 KB \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters and calculation complexity comparison of head. The effect diagram of the way based on _IOU_ matching is shown in Figure 6. For the detection results of two key frames, if the _IOU_ of the two objects is greater than 0.2 and less than 0.9, we regard them as the same object. The _IOU_ calculation formula of two objects \(A\) and \(B\) is given by Equation (1). \[IOU(A,B)=\frac{A\cap B}{A\cup B} \tag{1}\]  
Figure 4: Statistical chart of an airport apron operation. Figure 5: Whether the detection can be skipped/Work or free. However, the _IOU_-based matching method sometimes misses the relatively small objects on the airport apron such as staffs (as shown in Figure 7). In this case, the motion trajectory of the object may be incomplete. Thus, we proposed the T frame dynamic and static separation method based on the three-frame difference method to handle this problem as a supplement. The three-frame difference method is one of the well-known methods to perform moving objects detection. The difference of frame \(i\) and frame \(i-1\), and the difference of frame \(i+1\) and frame \(i\) is used to obtain the motion mask layers \(D_{1}\) and \(D_{2}\), respectively. Figure 6: Matching of moving objects is based on _IOU_. Figure 7: _IOU_ matching failure (T = 2 s). The final motion mask layer \(D\) of frame \(i\) is calculated as \(D_{1}\) AND \(D_{2}\). The formula is expressed as Equations (2)-(4). \[D_{1}(x,y)=\left\{ \begin{aligned} 1,\&\& if|F_{i}(x,y)-F_{i-1}(x,y)| >T\\ 0,&\&\&other\end{aligned} \right. \tag{2}\]  
\[D_{2}(x,y)=\left\{ \begin{aligned} 1,&\& if|F_{i+1}(x,y)-F_{i}(x,y)| >T\\ 0,&\&\&other\end{aligned} \right. \tag{3}\]  
\[D(x,y)=D_{1}(x,y)\cap D_{2}(x,y) \tag{4}\]  
In the above expression, \(D(x,y)\) denotes the value of the position of the motion mask layer (\(x,y\)), i.e., the pixel change interpolation of this point.