## 2 Background Theories  
### Convolutional Neural Networks  
CNNs are a class of deep neural networks widely applied for tasks like image classification and feature extraction. They consist of several layers, including convolutional, pooling, and fully connected layers. Within the convolutional layers, the inputs are convolved with filters to extract the features. Hyperparameters like the filter size, stride, and the number of filters play pivotal roles in this process [29]. The operation of a single filter in the convolutional operation is demonstrated by Equation (1).  
\[Zlk=f(al^{*}x+b) \tag{1}\]  
where \(x\) is the input, \(l\) is the index of filters in the convolution layer, \(k\) is the index of the convolutional layer, \(f\) is the non-linear activation function, * represents the convolutional operation, \(b\) is the bias, \(Zlk\) is the feature map generated by the \(l\)-th filter, and \(al\) is the corresponding kernel matrix of the l-th filter.  
The Pooling layer divides the feature map into equal-length segments and represents each segment by its average or maximum value. This pooling operation down samples the output bands of convolution, effectively reducing variability in hidden activations. After multiple convolution and pooling operations, the original input image is transformed into a series of feature maps. These feature maps are then connected to generate a new output, forming the final representation of the original input. This representation is fully connected via weights to the output layer. The values from the fully connected layers are passed through a non-linear activation function, such as the softmax layer, which returns the probability of each class. During the training process, the weights and biases are learned using the stochastic gradient descent method, while the gradients are computed using the backpropagation method. The softmax function is represented by Equation (2) [30].  
\[\sigma(y)=ey\sum ey \tag{2}\]  
CNNs have various architectures, each designed to effectively handle specific types of data and tasks. These architectures differ in terms of depth, width, specific layers, and connectivity patterns. Some popular architectures include AlexNet, VGG, GoogLeNet, Inception, and ResNet-50. Each of these architectures has its own unique advantages and trade-offs in terms of computational efficiency, memory usage, and performance on different tasks. In this study, a ResNet-50 algorithm was used. The ResNet-50 model consists of a series of residual blocks, each containing two or more convolutional layers. The key feature of a residual block is the inclusion of a \"skip connection\" that adds the input to the block's output shown in Figure 2. This allows the network to learn residual mapping, enhancing the identity mapping. By incorporating residual connections, information can bypass certain layers, effectively addressing the issue of vanishing gradients. This improves the model's learning efficiency and simplifies the training of deep networks, which is crucial for capturing complex features [31; 32].  
Figure 2: Residual block of ResNet-50 models with skip connections to solve the vanishing gradient problem in deep networks.