# Abnormal Behavior Detection in Uncrowded Videos with Two-Stream 3D Convolutional Neural Networks
## 4 The Proposed Approach
### Dataset Preparation  
This study prepared a specialized dataset named UFLV-DS (Uncrowded scene Falling, Loitering, Violence DataSet), based on videos from six public datasets. More precisely, it used (URFDS: [[http://fenix.univ.rzeszow.pl/~mkepski/ds/uf.html](http://fenix.univ.rzeszow.pl/~mkepski/ds/uf.html)]([http://fenix.univ.rzeszow.pl/~mkepski/ds/uf.html](http://fenix.univ.rzeszow.pl/~mkepski/ds/uf.html)) (accessed on 15 January 2021)) UR Fall Dataset (URF-DS) and the (MulticamDS: [[http://www.iro.umontreal.ca/~labimage/Dataset/](http://www.iro.umontreal.ca/~labimage/Dataset/)]([http://www.iro.umontreal.ca/~labimage/Dataset/](http://www.iro.umontreal.ca/~labimage/Dataset/)) (accessed on 15 January 2021)) Multiple Camera Fall Dataset (Multicam-DS) for fall detection, the dataset of ([[http://home-pages.inf.ed.ac.uk/rbf/CAVIAR](http://home-pages.inf.ed.ac.uk/rbf/CAVIAR)]([http://home-pages.inf.ed.ac.uk/rbf/CAVIAR](http://home-pages.inf.ed.ac.uk/rbf/CAVIAR)) (accessed on 15 January 2021)) CAVIAR Project (Caviar-DS) and UMN ([[http://mha.cs.umn.edu/proj_events.shtml](http://mha.cs.umn.edu/proj_events.shtml)]([http://mha.cs.umn.edu/proj_events.shtml](http://mha.cs.umn.edu/proj_events.shtml)) (accessed on 15 January 2021)) (UMN-DS) for loitering, and Hockey Fight Dataset (Hockey-DS) [18] and Movies Dataset (Movies-DS) [18] for violence detection. The study intended to create a specialized dataset more aligned with its objectives. Therefore, the choice of datasets was driven by some requirements such as: (i) the videos should mainly contain uncrowded scenes with minimum variation in lighting conditions to enable focus on the behavior only, (ii) the main actions (or their negatives) pertaining to abnormal behaviors to be classified in the study must clearly be displayed, (iii) videos should contain as many as possible examples of the specifics of each behavior described in Section 3, and (iv) the dataset should be publicly available and other works in the literature should have used it for recognition of similar behaviors.  
The UFLV-DS was finalized in two stages. Initially, a basic setup was created by randomly selecting positive and negative examples of each class given in the original dataset. In this stage, no specific criteria were applied for the selection of videos. Later, each example was manually labeled into one of four classes: fall, loitering, violence, and none. Note that the \"none\" class corresponded to negative examples taken from each class. A sample of frames taken from videos of positive and negative examples of each class is shown in Figure 2. The total number of positive and negative examples of each action class is as follows. The falling class has 40 positive and 27 negative examples. The loitering class has 35 positive and 23 negative examples. Similarly, there are 42 examples of positive and 28 examples of negative actions for violence. In this way, the total of all negative examples gives us the number of positive examples of the \"none\" class i.e., 78. Further, the examples were divided into training, validation, and testing datasets by specifying a split property for each example. Also, video frames were preprocessed to obtain a size of 224 \(\times\) 224 for input to the model as detailed in the later sections.  
Figure 1: Overall system architectural flow.