## 4 The Application of CNN and Other Deep Learning Algorithms  
Convolutional neural networks (CNN) are a type of deep learning model commonly used for image processing and computer vision tasks. The basic principles of CNN are as Figure 9.  
* Convolutional Layers:  
The convolutional layer is the core layer of a CNN. It performs convolutional operations on the input image using a set of filters (also known as kernels or convolution matrices). These filters can capture different features in the image, such as edges, textures, etc. The convolution operation involves sliding the filters over the image and calculating the dot product between the filter and the input image to generate a feature map (also known as a convolutional feature or convolutional map). \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Feature Extraction** & **Classifier** & **Year** & **Data Form** \\ \hline spectral features & NN & 2000 [29] & A-scan and B-scan \\ \hline shape filtering & NN & 2000 [30] & B-scan \\ \hline down-track slices & MSNN & 2001 [31] & B-scan \\ \hline edge detection & MLP & 2005 [32] & B-scan \\ \hline trapezoidal image sections & NN & 2010 [33] & B-scan \\ \hline some points of B-scan data & NN & 2013 [34] & B-scan \\ \hline sliding window & NN & 2014 [35] & B-scan \\ \hline Laplace transform & LTANN & 2015 [36] & B-scan \\ \hline SR with an overcomplete & & & \\ [PERSON] dictionary & SVM & 2013 [37] & A-scan \\ \hline a dictionary of theoretical & & & \\ pipe signatures & SVM & 2016 [38] & B-scan \\ \hline ODL & SVM & 2017 [39] & A-scan \\ \hline LC-KSVD & SVM & 2017 [40] & B-scan \\ \hline deep dictionary learning & no additional classifier & 2018 [41] & B-scan \\ \hline DOMINODL & SVM & 2019 [42] & B-scan \\ \hline ODL & no additional classifier & 2019 [43] & B-scan \\ \hline K-SVD & no additional classifier & 2021 [44] & B-scan \\ \hline ROSL & no additional classifier & 2020 [45] & B-scan \\ \hline MPDL-LR & \(\varepsilon\)-dragging technique & 2022 [46] & B-scan \\ \hline K-SVD & no additional classifier & 2022 [47] & B-scan \\ \hline DL & NN & 2023 [48] & A-scan and B-scan \\ \hline DL & no additional classifier & 2023 [49] & B-scan \\ \hline Hough transform & Viola-Jones & 2013 [56] & B-scan \\ \hline MUSIC & no additional classifier & 2023 [50] & A-scan \\ \hline \hline \end{tabular}
\end{table} 
Table 1: _Cont._  
Figure 9: Typical CNN architecture. The convolutional operation between an input image (or feature map) denoted as X and a filter (or kernel) denoted as W can be mathematically represented as:  
\[Convolution(X,W)=\sum{(X*W)}+b \tag{8}\]  
where \"\(*\)\" denotes the convolution operation, \"\(\sum\)\" denotes the sum, \"\(b\)\" is the bias term, and \"\(X\)\" and \"\(W\)\" are matrices. * Activation Functions: Activation functions are typically applied after the convolutional layer to introduce nonlinearity. Popular activation functions used in CNN include rectified linear unit (ReLU) function, which helps the model learn more complex feature representations. \[\text{ReLu}(x)=\text{max}(0,x)\] (9)
* Pooling Layers: Pooling layers are used to reduce the spatial dimensions of the feature map, thus reducing computation and the number of parameters. Common pooling operations include max pooling and average pooling, which extract the most salient features from the feature map. \[\text{Max pooling}:\ \text{MaxPooling}(X)=\text{max}(X)\] (10) Average pooling : \[\text{AvgPooling}(X)=\text{average}(X)\] (11)
* Fully Connected Layers: Fully connected layers are used to transform the output of the pooling layers into the final classification or regression output. Neurons in the fully connected layer are connected to all neurons in the previous layer, and each connection has a weight that needs to be learned through training. \[\text{FullyConnected}(X,W,b)=W*X+b\] (12) where \"\(X\)\" is the input feature vector, \"\(W\)\" is the weight matrix, and \"\(b\)\" is the bias vector.