## 5 Experiments
### Results and Discussion  
This section gives a thorough investigation about our experimental evaluation of the model using a variety of large-scale anomaly detection datasets. Different experiments based on the encoder-decoder architecture were launched, where the pre-trained ViT model is considered an encoder with the decoder constituting the \"baseline\" architecture. Then, the STR attention block was involved after the ViT to show the usefulness of using the spatiotemporal characteristics for video anomaly detection. The proposed model architecture for anomaly identification produced outstanding results, as shown in Table 4, which demonstrates the effectiveness of using the STR attention model for improving anomaly detection accuracy. Table 4 compares the results of using the STR attention model to the results of using the framework without it. Accordingly, the obtained results show that the proposed architecture can successfully detect anomalies with high detection rates by utilizing the local characteristics and global dependencies (context) of the video frames captured by the proposed model for the video anomaly detection process. Moreover, the detection accuracy results depicting the efficacy of the proposed model are shown in Figure 6. The figure shows the ROC results for different test videos from the four datasets, which demonstrate the effectiveness of using the ViT transformer coupled with the spatiotemporal attention model to enhance the detection accuracy of normal/abnormal frames for surveillance videos. The effect of using augmentation and combined datasets is presented in Table 5, which shows that the augmentation techniques improved the ViT + STR attention model's anomaly detection accuracy for the Avenue datasets when strategy 'B' was applied. This \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model’Dataset** & **UCSD\%** & **Avenue\%** & **Shanghai\%** \\ \hline Baseline & 94.5 & 84.9 & 77.3 \\ Baseline + STR attention & 95.6 & 85.2 & 81.9 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The effectiveness of the model for the different datasets. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Augmentation Approach** & **\#Frames UCSD** & **\#Frames Avenue** \\ \hline Approach (A) & 15,300/2550 & 91,968/2550 \\ Approach (B) & 28,050/15,328 & 168,608/15,328 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The augmented dataset sizes. demonstrated the usefulness of the model in identifying anomalies when trained on large datasets. Furthermore, merging the datasets improves the individual and overall detection rate when the STR attention model is applied, even though each dataset contains movies of varying qualities and a range of shooting scenarios, colors, and angles. Additionally, by combining the larger dataset with other datasets, as shown in Table 6, the accuracy of anomaly identification significantly improves. The combination strategy is considered a leading idea for developing automated real-time video surveillance anomaly detection systems. It is well known that those surveillance systems have heterogeneous captured videos with different environmental circumstances and various anomaly types. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Model Trained on** & **Model Tested on** & **Baseline** & **Baseline + STR Attention** \\ \hline \multirow{3}{*}{Avenue + UCSD} & UCSD & 94.6 & 94.5 \\  & Avenue & 84.8 & 85.0 \\  & Avenue + UCSD & 87.5 & 87.7 \\ \hline \multirow{3}{*}{Shanghai + UCSD} & UCSD & 89.3 & 89.9 \\  & Shanghai & 80.2 & **82.1** \\  & Shanghai + UCSD & 80.9 & 82.5 \\ \hline \multirow{3}{*}{Shanghai + Avenue} & Avenue & 86.6 & 86.1 \\  & Shanghai & 79.1 & 80.6 \\  & Shanghai + Avenue & 80.3 & 81.5 \\ \hline \multirow{3}{*}{Shanghai + Avenue + UCSD} & UCSD & 90.2 & 92.3 \\  & Avenue & 85.8 & **86.8** \\ \cline{1-1}  & Shanghai & 79.4 & 80.3 \\ \cline{1-1}  & Shanghai + Avenue + UCSD & 81.4 & 81.8 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: AUC ROCs (%) for different combinations for the UCSD, Avenue, and Shanghai datasets. Figure 6: _Cont._