## 4 Experiments and Evaluation
### Cross-Validation Evaluation and Ablation Study  
In this section, we perform 5-fold cross-validation to evaluate the robustness of the proposed DeepGun-based firearm detection approach. The performance metrics obtained using various feature extraction methods are summarized in Table 7. As shown in Table 7, the DeepGun model with IFC implementation outperforms all other feature extraction methods when combined with state-of-the-art OCC techniques, demonstrating stable performance with minimal standard deviation in most cases, which confirms its robustness. Another notable finding from the cross-validation is that ResNet50, when combined with SVM, outperforms all other methods. For MCDE and GMM based implementation's performance the trend is quite comparable to the performance evaluation given in previous Table 4. The performance trends of the MCDE and GMM-based implementations in Table 7 are largely consistent with the evaluation results presented earlier in Table 4.  
We conduct ablation studies to validate the effectiveness of the proposed firearm detection method using a VAE. Specifically, we replace the NN in the VAE with a CNN, forming a CVAE. We analyze the impact of removing specific layers of the VAE model on firearm detection performance and compare the effects of variable patch sizes versus a fixed patch size. The objective results are presented and summarized in Table 8. In this table, we evaluate the F1, ACC, P, R, and AP values on the test set, which consists of a total of 4000 patches extracted from \"_handgun_\" and \"_no gun_\" frames in the input videos. For this study, we have chosen the best-performing state-of-the-art OCC, IFC with VAE, for the final firearm detection step. Based on the anomaly score generated by the IFC, a score of \"1\" is assigned to anomalous samples containing a _lundgun_ and a dangerous pose, while a score of \"0\" is assigned to samples without a gun and in a normal pose. To validate the effectiveness of DeepGun, we compare the performance metrics obtained by replacing the NN in VAE with CNN, as shown in the first column of Table 8. Both networks are trained using MSE loss and KL loss with same parameter settings. We refer to them as DeepGun (see the last column of Table 8) and DeepGun-CNN (see the first column \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Classifier** & **Metric** & **Nas-NetLarge** & **Dense-Net201** & **VGG19** & **Mobile-NetV2** & **Res-Net50** & **AE** & **DeepGun** \\ \hline \multirow{4}{*}{_IFC_} & \(F_{1}\) & 76.7 & 78.0 & 78.8 & 80.1 & 80.5 & 66.6 & **81.8** \\  & \(ACC\) & 84.7 & 85.5 & 85.8 & 86.8 & 86.8 & 68.7 & **87.6** \\  & \(P\) & 88.2 & 89.3 & 90.2 & 90.4 & 91.4 & 95.7 & **92.1** \\  & R & 89.1 & 89.0 & 88.5 & **89.9** & 88.6 & 55.8 & 89.2 \\  & \(AP\) & 86.0 & 86.9 & 87.5 & 88.1 & 88.7 & 83.1 & **89.4** \\ \hline \multirow{4}{*}{_SVM_} & \(F_{1}\) & 75.0 & 74.7 & 76.7 & 75.5 & 78.5 & 49.4 & **84.7** \\  & \(ACC\) & 84.7 & 84.4 & 85.5 & 84.9 & 86.4 & 32.8 & **90.1** \\  & \(P\) & 86.0 & 86.1 & 87.3 & 86.4 & 88.2 & 10.0 & **92.0** \\  & R & 92.2 & 91.6 & 91.7 & 92.0 & 92.0 & 10.0 & **93.3** \\  & \(AP\) & 84.6 & 84.5 & 85.6 & 68.9 & 86.6 & 67.1 & **90.3** \\ \hline \multirow{4}{*}{_MCDE_} & \(F_{1}\) & 76.9 & 79.4 & 79.5 & 78.3 & 79.7 & **80.0** & 79.6 \\  & \(ACC\) & 64.0 & 68.7 & 68.8 & 66.4 & 69.5 & **70.1** & 69.0 \\  & \(P\) & 67.5 & 71.0 & 71.1 & 69.1 & 72.0 & **72.4** & 71.2 \\  & R & 89.4 & 90.1 & 90.0 & **90.4** & 89.2 & 89.4 & 90.1 \\  & \(AP\) & 67.5 & 70.6 & 70.7 & 68.9 & 71.5 & **71.9** & 70.8 \\ \hline \multirow{4}{*}{GMM} & \(F_{1}\) & 25.7 & 44.8 & 25.8 & 41.6 & 43.8 & 27.4 & **44.9** \\  & \(ACC\) & 61.7 & 33.3 & **66.5** & 33.3 & 34.1 & 65.4 & 33.4 \\ \cline{1-1}  & \(P\) & 35.6 & 30.6 & **47.8** & 29.2 & 30.4 & 44.4 & 30.8 \\ \cline{1-1}  & R & 20.2 & 82.3 & 13.0 & 72.1 & 78.0 & 84.7 & **82.4** \\ \cline{1-1}  & \(AP\) & 33.4 & 31.1 & **35.5** & 30.2 & 30.9 & 35.1 & 31.2 \\ \hline \hline \end{tabular}
\end{table}