# Toward Scalable Video Analytics Using Compressed-Domain Features at the Edge
## 3 Methodology
### Light-Weight Runtime Moving Object Detection in the Video Compressed-Domain
#### 3.2.2 IoU-Based Moving Objects Tracking
If the encoded frame includes the motion, it will be forwarded to a cloud node using its own real-time streaming protocol (RTSP) server. To avoid decoding inaccuracies at the cloud node, all frames from the start time to the end time of the motion are continuously delivered in a connection session. Each session will start with an intra-coded frame. * Cloud node implementation: receiving the forwarded encoded frame with the motion from the edge node over the network and then decoding and placing the output images into the intrusion detection module, which uses YOLO to detect humans. ### Scenario Setup

* Testbed: We built a testbed comprised of a single edge device node and a single video analytics server that runs as a cloud node, as shown in Figure 12. The edge device node involves the moving object detection and runs on a low computation device called the Raspberry Pi 4, and the video analytics server is executed on NVIDIA Jetson Xavier because it is a GPU that supports running YOLO. The hardware specifications of the edge node and video analytics server are listed in \[Comp_{c}=S \tag{4}\]0 Note that the two devices are directly connected to a router using a wired cable. * Video test sequence: Experiments were conducted on the two video datasets. The VIRAT video dataset [42] was collected in natural scenes showing people performing normal actions for video surveillance domains. The second dataset was previously recorded from our surveillance camera and uploaded [43]. The details of our video test sequence and the ground-truth motion time are listed in Tables 2 and 3. We evaluate the performance of the moving object detection method and the proposed edge-to-cloud system separately. \[Comp_{c}=S \tag{4}\]1 Overview of the system design. RTSP, real-time streaming protocol. ### Light-weight Runtime Moving Object Detection in the Video Compressed-Domain

To evaluate the quality of the proposed method for the moving object detection, we calculated the IoU score metric of the detected object's bounding box with those of the ground-truth bounding box. Because the accuracy of the proposed method depends on the MV's density, we ran the proposed \begin{table}
\begin{tabular}{c c c} \hline \hline
**Specifications** & **Edge Device** & **Video Analytics Server** \\ \hline Device Name & Raspberry Pi 4 & NVIDIA Jetson Xavier \\ Operating System & Ubuntu 18.04, 64 bits & Ubuntu 18.04, 64 bits \\ GPU & Not supported & NVIDIA Maxwell architecture with NVIDIA CUDA cores \\ CPU & Quad-core ARM Cortex-A72 & Quad-core ARM Cortex-A57 MPCore processor \\ RAM & 4 GB & 8 GB \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Hardware specifications. \begin{table}
\begin{tabular}{c c} \hline \hline
**Tested Video Information** \\ \hline Resolution & 1920 \(\times\) 1080 \\ Length & 6 min \\ Codec & H264 \\ Group of picture (GOP) & 30 \\ Frame rate & 25 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Video test sequence. Figure 12: Testbed: (**a**) scenario setup, (**b**) the implemented edge device. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Time** & **Duration (Seconds)** \\ \hline
00:00:50 & 00:01:10 & 20 \\
00:01:25 & 00:01:45 & 20 \\
00:02:12 & 00:01:10 & 5 \\
00:02:39 & 00:02:45 & 6 \\
00:03:50 & 00:04:48 & 58 \\
00:



method multiple times with different scenario applications such as: different camera distances, different moving object speeds. We observed that except the I frame, which does not apply motion estimation, the moving objects including sometimes big MV noises always are detected in other frames. Example of the moving object detection results are shown in Figure 13.

The green bounding boxes shown in the figure are ground-truth bounding boxes, while the red bounding boxes are detected objects using the proposed method. The average IoU scores are shown in detail for each scenario in Table 4. The results show that when a camera is placed at a close distance and the human does not move fast (i.e., human walking), the proposed method detected the human well and achieved a good average IoU score of 0.75.