## 2 Materials and Methods
### Deep Learning Approach
#### 2.4.2 Convolutional Neural Networks CNN
\begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Activation Function** & **Advantages** & **Disadvantages** & **When Might It Be Used?** \\ \hline \multirow{3}{*}{Sigmoid} & -Smooth gradient, avoiding “skips” in the output values & -Decreasing gradient: It refuses to learn more and is quite slow to reach an accurate prediction. -Computationally demanding & If the output lies between (0,1) then the sigmoid may be employed \\ \cline{2-4}  & -Centered on zero & -Vanishing gradient issue -Since the function is nonlinear, it can effortlessly backpropagate errors/faults & If the output lies between (0,1) or (\(-1,1\)), then the tanh can be used \\ \hline \multirow{3}{*}{ReLU} & -It is computationally efficient and allows the net to get together quickly -Backpropagation is allowable -Non-linear: Although it possesses a derivative function & -Once the inputs contact zero/negative, the gradient becomes zero, making the network unable to perform backpropagation and failing at learning -Unlimited and undifferentiated & ReLU is widely used, when we want to predict output values higher than 1 because tanh or sigmoid are not appropriate for this purpose \\ \cline{1-1} \cline{2-4}  & -It is computationally efficient and allows the net to get together quickly -Backpropagation is allowable -Non-linear: Although it possesses a derivative function & -Once the inputs contact zero/negative, the gradient becomes zero, making the network unable to perform backpropagation and failing at learning -Unlimited and undifferentiated & ReLU is widely used, when we want to predict output values higher than 1 because tanh or sigmoid are not appropriate for this purpose \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The pros and cons of the applied activation functions. Convolutional neural networks (CNNs) classify incoming images into specific categories (e.g., healthy or affected) by processing them as pixel arrays with a resolution represented as h \(\times\) w \(\times\) d (h = height, w = width, d = dimension). For example, an image with dimensions 8 \(\times\) 8 \(\times\) 3 is a matrix of RGB values, while an image with dimensions 4 \(\times\) 4 \(\times\) 1 is a matrix of grayscale values. The CNN applies a series of convolutional layers with kernels to extract features from the input image using the convolution mathematical function, defined as the continuous function of two functions f and g:  
\[(\mathrm{f*g})(\mathrm{t})=\int_{-\infty}^{\infty}\mathrm{f}(\tau)\mathrm{g}( \mathrm{t}-\tau)\mathrm{d}\tau=\int_{-\infty}^{\infty}\mathrm{f}(\mathrm{t}- \tau)\mathrm{g}(\tau)\mathrm{d}\tau \tag{39}\]  
The analogous convolution function in the discrete state is stated as such:  
\[(\mathrm{f*g})(\mathrm{n})=\int_{\mathrm{m}=-\infty}^{\infty}\mathrm{f}( \mathrm{m})\mathrm{g}(\mathrm{n}-\mathrm{m})=\int_{\mathrm{m}=-\infty}^{\infty }\mathrm{f}(\mathrm{n}-\mathrm{m})\mathrm{g}(\mathrm{m}) \tag{40}\]  
The above 1D convolution for the numerical image can be expanded to a 2D convolution, such as:  
\[(\mathrm{f*g})(\mathrm{x},\mathrm{y})=\sum_{\mathrm{m}=-\mathrm{M}}^{\mathrm{ M}}\sum_{\mathrm{m}=-\mathrm{N}}^{\mathrm{N}}\mathrm{f}(\mathrm{x}-\mathrm{n}, \mathrm{y}-\mathrm{m})\mathrm{g}(\mathrm{n},\mathrm{m}) \tag{41}\]  
In this application, a kernel or filter (called the \"g function\") is applied to an input image (called \"f\"). The process of applying the kernel to the image is known as 2D convolution, which involves sliding the kernel over the image and performing a convolution operation at each point. This produces a 2D array called a feature map. The feature map is then processed by a nonlinear activation layer, which determines whether a neuron