## 3 System Overview
### ROI Management
#### 3.2.3 ROI Adjustment
Detailed information regarding the file size of the encoded videos is addressed. By comparing the file size of the videos processed by the videos produced by YOLOv7, we observed that the file size of the video processed by the proposed algorithm is significantly smaller than the file size of the video processed by YOLOv7. In Table 3, the compression rate differs depending on the video. All codecs are somewhat optimized and do not support the same standards. All original videos used in the experiment were optimally encoded by some codec. Such codecs are optimized differently, have different basic settings, and encode video with different parameter sets. As evidenced, authors have found that ffmpeg--a well

Figure 5: Comparison of videos (0, kaggle02, Youtube) processed with YOLOv7 (**left**) and the proposed system (**right**). known open-source codec--and OpenCV give different size outputs when they encode the same video. The resulting videos produced by the proposed algorithm were encoded by using OpenCV video compression with the same setting and parameters of YOLOv7. Videos with smaller ROI experienced smaller file sizes, and videos with larger ROI had larger file sizes. This is due to different encoding rates: the ROI area, where XROI-DCT is not applied, is encoded with a lower encoding rate so that it can be decoded without as much loss as possible, and the non-ROI area, where XROI-DCT is applied, is encoded with a higher encoding rate because it is efficient to have a compressed file size even if there could be some loss in a non-important area during decoding. By observing the encoded videos' file size, we were able to verify the effectiveness of the extra compression on non-ROI. ### Detection Speed

In this subsection, we evaluate how fast our proposed algorithm can detect a UAV on a video frame. As said above, our proposed algorithm adapts optical flow to predict the location of the UAV in the next frame so that it can track it. If the ROI is small and accurate enough, optical flow is expected to be faster than the trained neural network's inference speed. Evaluation results can be seen in Table 4. The inference speed of a neural network and optical flow calculation could vary depending on the hardware specification, image size, video codec, etc. Comparing raw latency will be inaccurate and meaningless. Therefore, we have compared two types of video--YOLOv7 applied to every frame and proposed algorithm--and presented them in a time-latency ratio. As shown in the table, the proposed algorithm adopting optical flow takes less time than applying YOLO to every frame. While Video1 takes about 64.86% of YOLOv7 process time, YouTube only takes about 24.05%. The processing time depends on the size of the ROI and, more importantly, the number of I-frames in a video. A large ROI accounts for more background pixels in the ROI and more feature points. Thus, more optical flow calculations were conducted on every frame except for I-frames. I-frames, where YOLOv7's detection is applied, take more time than non-I-frames, where optical flow is applied. As a note, there was one I-frame for every 30 frames. This shows that optical flow is faster than YOLOv7's inference. ### UAV Identification

The UAV identification of the proposed system is evaluated in this subsection. UAV identification of the proposed system is a UAV model classifier based on CNN. It was trained to classify 16 models, including Mavic Pro, Phantom, and Solo2--all models in the experiment videos. During evaluation, a small set of images, 1825 images for training and 390 images for testing, was used. To overcome the performance ceiling due to the small number of images, data augmentation was applied in various ways, such as rotations, left-right flips, saturation, brightness control, etc. Figure 6 depicts the confusion matrix [35]