## 2 Deep Learning Based Underground Pipeline Target Recognition Using 3-Dimensional GPR Data
### Data Augmentation  
Even though using GprMax3.0 software for genetic simulation data can obtain a large number of 3-dimensional GPR data images, only using simulation data to train the network will easily lead to poor performance in the classification of real-world data. This is in contrast to our original goal. At the same time, a convolutional neural network requires a large number of samples for training. If the training dataset is very small, it will cause many problems such as unstable network training, difficulty in reducing loss function, and overfitting of the network. Therefore, based on the simulation GPR image generated by GprMax3.0, it is necessary to further expand the real-world GPR image. Meanwhile, GprMax3.0 simulation modeling also takes a long time. To improve efficiency, the GPR images generated by simulation also need to be augmented. The GPR image is a grayscale image, and the image is relatively monotone, so general data enhancement methods such as sharpening and brightness adjustment are not effective. In addition, the 3-dimensional GPR data format has integrity, so it is often difficult to imple  
Figure 4: The simulation image and real-world image. (**a**) The transverse pipeline. (**b**) The longitudinal pipeline. (**c**) The real-world pipeline. ment 2D image augmentation. Considering the integrity of 3D data and the particularity of GPR data, we propose a method based on 3D matrix rotation to augment the data. Three-dimensional GPR image data consist of a 3D matrix stored with a NumPy array. The point in the three-dimensional space can be represented by the normalized homogeneous coordinate \([x,y,z,1]\), and the transformation matrix can be used to transform the three-dimensional point into the new homogeneous coordinate system \([\hat{x},\hat{y},\hat{z},1]\) during rotation transformation. \[[x,y,z,1]\times S=[\hat{x},\hat{y},\hat{z},1], \tag{1}\]  
where \(S\) represents the transformation matrix. When the three-dimensional matrix is rotated at a positive Angle \(\theta\) around the Y-axis, there are:  
\[\left\{ \begin{array}{l}\hat{x}=x\cos\theta+z\sin\theta\\ \hat{y}=y\\ \hat{z}=-x\sin\theta+z\cos\theta\end{array} \right., \tag{2}\]  
Then, \(S\) is as follows:  
\[S= \begin{bmatrix}\cos\theta&0&-\sin\theta&0\\ 0&1&0&0\\ \sin\theta&0&\cos\theta&0\\ 0&0&0&1\end{bmatrix} , \tag{3}\]  
To make the matrix rotate around the center of the image, translating the center of rotation is also required. Assuming \(K\), \(M\), and \(N\) are the three-dimensional dimensions of the image, respectively, then the translation matrix can be expressed as:  
\[T_{1}= \begin{bmatrix}1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\ -K/2&-M/2&-N/2&1\end{bmatrix} , \tag{4}\]  
We transform the coordinates back using \(T_{2}\) after the rotation. \[T_{2}= \begin{bmatrix}1&0&0&0\\ 0&1&0&0\\ 0&0&1&0\\ K/2&M/2&N/2&1\end{bmatrix} , \tag{5}\]  
Finally, we can obtain:  
\[[x,y,z,1]\times T_{1}\times S\times T_{2}=[\hat{x},\hat{y},\hat{z},1], \tag{6}\]  
In this way, the three-dimensional image can be rotated directionally around the central position. However, because the three-dimensional dimensions \(K\), \(M\), and \(N\) are not equal, point mismatch will occur after directional rotation, so it is necessary to interpolate and fill the vacant positions after rotation. In this paper, we use bilinear interpolation, as shown in Figure 5, to solve this problem. First, we construct the rotated matrix, and then the corresponding value of the original matrix is found to fill in the blank by bilinear interpolation. The rotated point P can be determined using the four points \(Q_{11}\), \(Q_{12}\), \(Q_{21}\), and \(Q_{22}\) at the original position. Finally, we can obtain the pixel value of point P using Equations (7)-(9).