## 3 Methods
### Working with CNNs  
CNNs are good at extracting hierarchical features, representing a class of deep learning models that are widely utilized for image and video analysis and classification. They enable automated feature learning through back propagation. They can process temporal and spatial relationships using learnable filters. A typical CNN is a deep neural network with several layers, each of which has a specific purpose.  
1. Convolutional Layers: These layers use convolution operations with trainable filters to extract spatial characteristics. As they pass over the input, the filters pick up patterns like edges and textures. The convolution operation is mathematically expressed as follows: \[\phi_{\alpha,\beta,\kappa}=\sum_{\mu=1}^{M}\sum_{\
u=1}^{N}\xi_{\alpha+\mu-1, \beta+\
u-1,\lambda}\cdot\omega_{\mu,\
u,\lambda,\kappa}+\theta_{\kappa}\] (1) where \(\bullet\) \(\zeta\): input feature map \(\bullet\) \(\phi\): output feature map \(\bullet\) \(\omega\): convolutional filter \(\bullet\) \(\theta\): bias term \(\bullet\) \(\alpha,\beta\): spatial indices \(\bullet\) \(\lambda\): index of input channel \(\bullet\) \(\kappa\): index of output channel \(\bullet\) \(M,N\): filter dimensions
2. Normalization and Activation Layers: After convolution, batch normalization is applied to stabilize training and accelerate convergence. The transformation is defined as follows: \[\hat{\chi}^{(i)}=\frac{\chi^{(i)}-\mu^{(i)}}{\sqrt{\sigma^{(i)2}+\epsilon}}, \quad\psi^{(i)}=\gamma^{(i)}\hat{\chi}^{(i)}+\beta^{(i)}\] (2) where \(\bullet\) \(\mu^{(i)},\sigma^{(i)2}\): batch mean and variance, respectively\(\gamma^{(i)},\beta^{(i)}\): trainable scale and shift parameters
* \(\varepsilon\): small constant for numerical stability
* \(\chi\), \(\psi\): input and output activations  
To enhance learning capacities, the Rectified Linear Unit (ReLU) activation function adds non-linearity:  
\[\psi=\max(0,\chi) \tag{3}\]  
where  
* \(\chi\): input activation
* \(\psi\): output after ReLU transformation
* Pooling layers and Dropout Layers: In order to minimize computational complexity while maintaining essential properties, pooling layers carry out spatial downsampling. This is how the max-pooling operation is defined: \[\phi_{\alpha,\beta,\kappa}=\max_{\mu,\
u}\{\xi_{\alpha+\mu,\beta+\
u,\kappa}\}\] (4) where
* \(\xi\): input feature map
* \(\phi\): pooled output
* \(\alpha,\beta\): spatial indices
* \(\kappa\): channel index
* \(\mu,\
u\): pooling window indices  
Dropout is used to reduce overfitting and improve model generalization by randomly deactivating neurons. The dropout operation is expressed as follows:  
\[\psi=\frac{\delta\cdot\chi}{1-\rho} \tag{5}\]  
where:  
* \(\chi\): input activation
* \(\delta\): binary mask, where \(\delta\sim\text{Bernoulli}(1-\rho)\)
* \(\rho\): dropout probability
* \(\psi\): output activation
* Fully Connected and Output Layers: Decision-making methods incorporate high-level feature representations through the fully connected layers. These layers produce classification outputs by transforming the retrieved feature maps using weighted transformations. Regression tasks mostly use a linear function in the final output layer, while multi-class classification mostly uses a softmax activation function.