# Lightweight Violence Detection Model Based on 2D CNN with Bi-Directional Motion Attention
## 2 Related Works  
### Violence Detection  
Violence detection is an important branch of behavior recognition. Up to date, violence detection algorithms can be categorized into three categories: algorithms based on hand-crafted features, DL algorithms based on 3D CNNs, and DL algorithms based on 2D CNNs. Traditional violence detection algorithms are based on hand-crafted features. The most classical hand-crafted features include a histogram of oriented gradient (HOG) [23],  
Figure 1: The pipeline of the proposed lightweight violence detection scheme. F\({}_{1}\)–F\({}_{3T}\) stand for RGB frames sparsely sampled from the video clip. X\({}_{1}\)–X\({}_{3T}\) denote grayscale frames converted from F\({}_{1}\)–F\({}_{3T}\) by RGB2 Gray operation. I\({}_{1}\)–I\({}_{T}\) are 3-channel images obtained by frame-grouping. space-time interest points (STIP) [24], and speeded-up robust features (SURF) [25]. Optical flow and its variants were proposed later. In [26], [PERSON] et al. introduced the violent flows descriptor (ViF) and combined it with a support vector machine (SVM) classifier to detect violent behaviors, where the statistics of flow-vector magnitudes over time were taken into consideration. In [27], oriented violent flow (OViF) was proposed to take advantage of the motion magnitude change information in statistical motion orientations to exhibit better accuracy. Moreover, improved dense trajectory (iDT) was adopted in [28] to mitigate the adverse effect of camera motion on action recognition. The scheme proposed in [29] combined video frames into dynamic images using approximate rank pooling. Afterward, hand-crafted features were extracted and summarized by using a bag of visual words (BOVW). Based on the hybrid handcrafted/learned features, a support vector machine (SVM) classifier was trained to recognize violence. In [30], the video sequence was encoded into a result image leveraging handcrafted descriptors, i.e., binary robust invariant scalable key points (BRISK) [31] and features from an accelerated segment test (FAST) [32]. Then, the resulting image was fed to a 2D CNN to learn high-level features and recognize fight actions. Differently from these schemes, this work employs DL techniques to learn violence features from videos automatically. DL algorithms based on 3D CNNs [4; 5; 6; 7; 17; 33] extract spatiotemporal features in videos automatically. In [4], the authors applied 3D CNNs to extract spatiotemporal features in videos and demonstrated that the proposed C3D features outperformed hand-crafted features. Subsequently, two-stream networks such as Inflated 3D ConvNet (I3D) [6] and Slowfast [7] emerged and achieved good performance in the field of behavior detection. The I3D was constructed by using 2D ConvNet inflation, where RGB frames and optical flow were taken as input. As the ResNet [34] gained widespread popularity in image classification, several 2D ResNet variants were adapted to the 3D domain for behavior recognition [5; 33]. [PERSON] et al. proposed a residual 3D network (R3D) [5] based on the original 2D ResNet architecture. The R(2 + 1)D [33] was proposed to split the 3D convolutional filters into separate spatial and temporal components. In comparison with R3D, the R(2 + 1)D is easier to optimize and demonstrates better action recognition accuracy. Though these methods have made great progress in accuracy, they are computationally expensive. We designed our violence detection model based on a lightweight 2D CNN to meet the requirements of real-time applications. DL algorithms based on 2D CNNs take 2D CNNs as their backbone and adopt temporal modeling strategies to enable the extraction of motion features. The ConvLSTM network proposed in [1] employed an LSTM network to aggregate the features extracted from video frames by a 2D CNN. The CNN-BiLSTM Model proposed in [2] employed BiLSTM instead of LSTM to improve the performance further.