## 4 Machine Learning Model  
As highlighted in numerous recent studies, the academic community primarily focuses on the use of 3D convolutional neural networks (3D CNNs) and Long Short-Term Memory (LSTM) networks for anomaly detection in video sequences. Three-dimensional CNNs are particularly effective for analyzing video data, as they capture spatial and temporal information across three dimensions, enabling a comprehensive understanding of motion and changes within video frames. LSTM models, conversely, excel in modeling long-term temporal relationships, which is essential for detecting gradual changes or anomalies over time. In [24], the authors emphasize that these two approaches have become the predominant methods for video anomaly detection due to their demonstrated effectiveness in capturing the inherent spatial and temporal complexities of video data. Many of the existing proposals employing these models have demonstrated strong performance, with Area Under the Curve (AUC) values ranging from 80% to 95%, indicating substantial discriminatory capabilities. However, it is important to note that many of these studies have been conducted using datasets with insufficient samples, which limits the ability of these models to generalize effectively in real-world applications. The objective is to implement a model capable of effectively detecting crimes by incorporating 3D convolutional layers. This approach is expected to yield good performance in crime detection. The architectural elements, listed in the next section and described in terms of their primary functions, have been carefully selected to support the proposed architecture. _Architecture Description_  
The proposed model comprises multiple 3D convolutional layers, pooling layers, and fully connected layers with regularization mechanisms. A detailed description of each component is provided below:  
* Batch Normalization:
* Applied to the input layer to stabilize and accelerate the training process, thereby reducing the risk of overfitting and facilitating faster convergence. * 3D Convolutions and MaxPooling3D:
* The model employs eight 3D convolutional layers, each with varying numbers of filters and kernel sizes, to capture both spatial and temporal features in the video data. The convolutional kernels vary between dimensions (1, 3, 3) and (3, 1, 1), \begin{table}
\begin{tabular}{p{142.3 pt} p{142.3 pt}} \hline \hline
**Criterion** & **Description** \\ \hline Representativeness & It contains samples of crimes against people, from various datasets. \\ \hline \multirow{2}{*}{Diversity} & Different types of incidents like fights, robberies, thefts, and abuse. \\ \hline \multirow{2}{*}{Size} & A total of 9000 samples distributed in two classes for the detection of criminal events. \\ \hline \multirow{2}{*}{Class Balance} & A total of 4874 positive events and 4126 negative events, with a proportion of 54.16\%. \\ \hline \multirow{2}{*}{Labeling} & Labeling at the frame level. \\ \hline \multirow{2}{*}{Temporal Consistency} & Temporal consistency is guaranteed in each of the events from the first frame to the last. \\ \hline \multirow{2}{*}{Accessibility} & Data available to the public on a scientific platform: \\  & [[https://zenodo.org/records/13855628](https://zenodo.org/records/13855628)]([https://zenodo.org/records/13855628](https://zenodo.org/records/13855628)) (accessed on 6 June 2024) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Dataset criteria. enabling the model to capture diverse spatial and temporal characteristics. After each set of convolutional layers, a 3D max-pooling layer is applied with varying pool sizes (e.g., (1, 2, 2), (2, 2, 2), (8, 1, 1)). This pooling operation reduces the spatial dimensionality, allowing for compact feature extraction while lowering computational costs. * A dropout layer with a rate of 20% is introduced to mitigate the risk of overfitting by randomly deactivating neurons during training, thereby encouraging the model to learn more robust features.