## 3 Theoretical Foundations
### Convolutional Neural Network  
A convolutional neural network (CNN) is a type of ANN where the hidden layers consist of a set of convolutions that typically are a combination of linear and nonlinear operations (i.e., convolution operation and activation function) [42]. In addition, the CNN usually includes pooling and fully connected layers.  
The convolutional layer constructs a feature map to extract key features from input data. Here, convolutional kernels function as local filters, operating on sequential data to produce non-invariant local features. Conversely, the pooling layer plays a fundamental role in reducing the dimensionality of the feature vector, preserving only the most pertinent features. By extracting essential features within fixed-length windows, the pooling layer aids in making the subsequent processing steps more efficient [43; 44]. Moreover, fully connected layers serve as linear classifiers, facilitating the assignment of predicted classes to specific inputs \(\mathbf{x}_{p}\). CNNs are formidable tools for feature extraction, particularly adept in tasks involving image data modeling, summarization, and classification [45; 46].  
In recent years, the utilization of pre-trained models for specific tasks has gained prominence, a practice known as transfer learning. This approach is invaluable when resources for training a neural network are limited or inadequate, allowing for adapting a model to varying classification problems. Notable pre-trained CNN models such as DenseNet121, EfficientNetB0, InceptionV3, MobileNetV2, ResNet50, and VGG16 offer the advantage of requiring fewer filters and parameters while yielding favorable results. Consequently, these models have found application in diverse domains, from processing biomedical images to violence detection in videos [20; 47; 48]. Below, we provide a summary overview of the three pre-trained models we used in our experimentation.  
* **DenseNet121**. The DenseNet model [49] is a convolutional neural network comprising 121 densely connected layers. DenseNet utilizes MaxPool2D and AveragePool3D reduction layers with (2,2) and (7,7) pool sizes, respectively. With its robustness and efficiency, DenseNet requires fewer filters and parameters to achieve favorable performance.
* **EfficientNetB0**. It is a convolutional neural network model that utilizes the ImageNet database for classification tasks across 1000 object categories. One of its key innovations is the adoption of \"compound scaling\", a technique designed to enhance model performance by increasing the resolution of input images. This increase in resolution necessitates adjustments in both the width (number of channels) and depth (number of layers) of the network to effectively capture the additional details provided by higher-resolution images. This approach involves applying a fixed set of coefficients to uniformly scale the network architecture's width, depth, and resolution. It was specifically developed to improve the scalability of CNNs to achieve better model performance and efficiency. EfficientNet-B0 serves as the baseline model, characterized by 5.3 million parameters, and accepts input images of size \(224\times 224\). Subsequent variants, denoted by increasing numbers (e.g., B1, B2, B3, etc.), further incorporate width, depth, and resolution adjustments to optimize performance across different computational constraints and task requirements [50].
* **MobileNetV2**. The MobileNetV2 architecture consists of two main types of building blocks: residual blocks with stride and blocks with a stride of 2 to reduce the size. Each block comprises three layers: the first layer is a \(1\times 1\) convolutional layer followed by a rectified linear unit 6 (ReLU6) activation function, the second layer is a depthwise convolutional layer, and the third layer is another \(1\times 1\) convolutional layer used to linearly combine the output channels of the depthwise convolution with a ReLU6 activation function [51].