# Three-Stage Deep Learning Framework for Video Surveillance
## 4 Experiment and Results  
### Dataset Introduction  
Real-world video data from CCTV and other security cameras are required for the performance verification and learning of the architecture proposed in this study. However, there are limitations to collecting and organizing large amounts of video data manually, and video data from security cameras, such as roads, individuals, institutions, and companies, are limited owing to various legal and ethical issues related to privacy and security. Therefore, we use the UBI-Fights [24], Hockey Fights [41], Movie Fights [42], and Crowd [43] datasets, which are widely used in anomaly detection research for training and verification purposes. UBI-Fights is a large dataset consisting of 80 h of videos, which includes 216 anomaly videos and 784 everyday scenes, totaling 1000 30 fps videos. The videos were stripped of unnecessary video segments (video introductions, news, etc.) that interfered with the learning process. The UBI-Fights dataset encompasses videos from diverse locations and includes various situations, captured across different times of the day and night. An example video is shown in Figure 6.  
In addition to the UBI-Fights dataset, the other three major datasets--Hockey Fights, Movie Fights, and Crowd--each offer unique and varied environments. Hockey Fights includes various conflicts and anomalous situations in hockey games, while Movie Fights features scenes from actual movies. Crowd includes both normal and abnormal situations in crowd settings.  
All three datasets consist of video data with a frame rate of 25 fps, as listed in Table 1. The Crowd dataset includes videos ranging from 3 to 5 s in length, while the others are all 1 s long. This format is conducive to accurately analyzing rapidly evolving anomalous situations, and the structure of these datasets is deemed crucial in assessing the applicability and efficiency of the proposed framework in a variety of contexts.  
All datasets were divided into training and validation datasets to validate the performance of the network. For the UBI-Fights dataset, 40 abnormal and 27 normal situations were used for validation, totaling 67 data points, referring to the list of validation files provided. For all other datasets, 30% of the total dataset was used as validation data.  
For the training process, each frame image was resized to a resolution of 800 \(\times\) 800 pixels. Due to the sufficient length of videos in the UBI-Fights dataset, 150 frames per video were utilized. However, for the remaining datasets, each consisting of approximately one second of footage, nearly all frames within a video, 30 frames, were used. A challenge arose in certain instances, including specific videos from the UBI-Fights dataset, where the total number of frames was less than the required frame count. To resolve this, when the total number of frames in a video was fewer than the set number, the last saved frame was duplicated in reverse order up to the designated frame count, effectively reconstructing the video to simulate a reverse playback effect.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Dataset** & **Video Length (s)** & **Fps** & \
\begin{tabular}{c} **Number of** \\ **Anomalies** \\ \end{tabular} &
\begin{tabular}{c} **Number of Normal** \\ **Instances** \\ \end{tabular} \\ \hline UBI-Fights & 16–6416 & 30 & 216 & 784 \\ Hockey Fights & 1 & 25 & 500 & 500 \\ Movie Fights & 1 & 25 & 100 & 100 \\ Crowd & 3–5 & 25 & 123 & 123 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Dataset information.  
Figure 6: Gallery of the UBI-Fights dataset.