# Lightweight Violence Detection Model Based on 2D CNN with Bi-Directional Motion Attention
## 3 Proposed Violence Detection Model
### Improved EfficientNet-B0  
The improved EfficientNet-B0 is a modified version of EfficientNet-B0 [18]. Specifically, we propose a new attention module, namely, Bi-LTMA, and integrate it into EfficientNet-B0 to enable long-term motion feature extraction. In addition, the TSM module [20] is adopted to realize temporal feature interaction. In what follows, we briefly review the EfficientNet-B0 [18] and then present details of the improved EfficientNet-B0. EfficientNet-B0 is a state-of-the-art lightweight 2D CNN obtained by using a multi-objective neural architecture search that optimizes both accuracy and FLOPS [18]. As shown in Figure 2, it consists of nine stages. The specific structure of each stage can be found in Table 1. Notably, the second to eighth stages are composed of inverted residual blocks, named as mobile inverted bottleneck (MBConv) in Table 1. In fact, MBConvs resemble the basic block of MobileNetV3 [48]. The structure of the inverted residual block is shown in Figure 3. Within the block, depthwise separable convolution (DW Conv) is employed to decrease the computational cost-effectively. For further detailed information, please refer to [18; 48] and references therein. To take advantage of EfficientNet-B0 in both accuracy and FLOPs, we select it as the backbone of the proposed model. The goal of the improved EfficientNet-B0 is to gain capabilities of long-term motion feature extraction and temporal feature interaction. To this end, we integrate the Bi-LTMA module and TSM module into inverted residual blocks in Figure 4, i.e., the second to eighth stages, of the EfficientNet-B0. The modified inverted residual block is shown in Figure 4. In what follows, we present the details of our proposed Bi-LTMA and that of TSM. The Bi-LTMA module is proposed to extract long-term motion information effectively. As reported in the literature [1, 2, 15, 41], long-term motion information plays a key role in violence detection in videos. In [1, 2], LSTM and BiLSTM were used to aggregate temporal features. In [15], a temporal attention module, named T-SE, was employed jointly with frame-grouping to recalibrate and aggregate global temporal features. In [41], motion features were defined as a channel-wise difference between adjacent frames, and the motion excitation (ME) module was proposed to excite the motion-sensitive channels. The ME focuses on channel attention, where detailed spatial features are omitted by using the pooling operation. Our idea of Bi-LTMA is partly inspired by ME. Differently from ME, Bi-LTMA takes both spatial and channel dimensions into consideration and captures motion features in both forward and backward directions. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Stage** & **Operator** & **Resolution** & **Channels** & **Layers** \\ \hline
1 & Conv3 \(\times\) 3 & 224 \(\times\) 224 & 32 & 1 \\
2 & MBConv1, k1 \(\times\) 1 & 112 \(\times\) 112 & 16 & 1 \\
3 & MBConv6, k3 \(\times\) 3 & 112 \(\times\) 112 & 24 & 2 \\
4 & MBConv6, k5 \(\times\) 5 & 56 \(\times\) 56 & 40 & 2 \\
5 & MBConv6, k3 \(\times\) 3 & 28 \(\times\) 28 & 80 & 3 \\
6 & MBConv6, k5 \(\times\) 5 & 14 \(\times\) 14 & 112 & 3 \\
7 & MBConv6, k5 \(\times\) 5 & 14 \(\times\) 14 & 192 & 4 \\
8 & MBConv6, k3 \(\times\) 3 & 7 \(\times\) 7 & 320 & 1 \\
9 & Conv1 \(\times\) 1 and Pooling \& FC & 7 \(\times\) 7 & 1280 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The structure of the EfficientNet-B0. Figure 4: The architecture of the modified Inverted Residual Block. We insert the Bi-LTMA module before the first convolution block, and the TSM module after the first convolution block. Figure 3: The architecture of the Inverted Residual block. BN stands for batch normalization, Swish is the activation function used, and SE denotes the Squeeze-and-Excitation attention module. Figure 2: The architecture of the EfficientNet-B0. The architecture of the Bi-LTMA module is shown in Figure 5. To meet the lightweight design requirements, the input feature F is downscaled by using a \(1\times 1\) 2D convolution (Conv1).