## 2 Materials and Methods
### Pile Defect Recognition Based on Multi-Feature Extraction and CNN
#### 2.5.1 Convolutional Neural Network (CNN)  
Input, convolutional, pooling, fully connected, and output layers comprise convolutional neural networks' basic network structures, often cascading architectures [49]. The input layer is in charge of feeding the matrix to be processed into the network; the convolutional and pooling layers are interconnected in pairs and are in charge of feature mining and extraction; the amount of connectivity between these layers can be adjusted depending on the model's complexity. The output and fully connected layers carry out the final categorization. The convolutional layer is the core component of the CNN, which is in charge of the recursive convolution of the input matrix to extract the associated features. A small portion of the preceding layer is used as input by the convolutional layer, which then chooses a convolutional kernel to be placed there and multiplies it by the value of the corresponding neuron in the convolutional layer to produce the convolutional result. The convolutional layer has to have the stride hyperparameter configured for improved training outcomes. The first convolutional layer, with a kernel size of 6, several 12, and a stride of 1, is used in this paper. The second and third convolutional layers (kernel size is 2, the number is 12, and the stride is 1). The pooling layer, the downsampling layer, samples the convolutional layer's output data by downsampling the features while maintaining the depth dimension. This increases the generalizability of the model and curbs the overfitting phenomenon while using fewer parameters and computations in the network. Maximum pooling and average pooling are the two most popular pooling operations. Average pooling indicates that the average value within the local window data is selected for calculation, and maximum pooling indicates that the maximum value of the data within the local window is selected. Here, the most extensive pooling layer is selected for downsampling, and the dimensions of pooling layers 1 and 2 are 2 \(\times\) 2 with a step size of 1. The output layer produces the results using the same number of nodes as the input sample categories after connecting with the fully connected layer, reassembling the previous local features through the weight matrix, and mapping the local features to the sample token space. The output unit solution for the classification problem is the Softmax function. To help the neural network learn more nonlinear mappings, this research extends the useof convolutional neural networks using ReLU [50] as the network's activation function, which can cover many nonlinear models with greatly enhanced expressive power. \[f_{ReLU}(x)=\max(0,x)\quad\ x\in[0,+\infty] \tag{16}\]  
One of the main drawbacks of neural networks during training is overfitting. One standard method of regularisation is adding a Dropout layer to the network model, which prevents all neurons from being placed in one layer to optimize the weights simultaneously. The Dropout layer also spurs the activation of the neurons in the hidden layer, reducing the synergistic effect of the different features and improving the robustness of the network. The fully connected is followed by a Dropout layer in this network paradigm, with the Dropout layer parameter set to 0.5 [51]. 5.2 Construction of Pile Foundation Defect Recognition Network Using Multi-Feature Extraction and Convolutional Neural Network (CNN)  
The construction of the CNN model in this paper consists of three convolution-pooling layer pairs, two fully connected layers, and a Dropout layer. This is shown in Figure 12.  
The hyperparameters of the model include learning rate (0.001), training epochs (195), and minibatch size (20). The foundation pile defect identification model is illustrated in Figure 13.  
Figure 12: CNN model.