## 4 Joint Extraction on Tunnel Faces Based on Image Segmentation Neural Network Models
### Joint Extraction of Tunnel Face Based on Mask R-CNN Deep Learning Architecture
#### 4.3.2 Mask R-CNN Convolutional Neural Network Parameter Selection  
The input image size for this convolutional neural network is 512 \(\times\) 512. After feature map generation, region proposal, and region extraction, the final output is an image of size 512 \(\times\) 512 with a mask overlay, class labels, and target region positions. This study  
Figure 27: Mask R-CNN network architecture.  
Figure 26: Comparison of U-Net prediction results.  
uses ResNet101 + FPN for the backbone and ROIAlign for pooling, enhancing small object recognition accuracy.  
(1) Backbone architecture parameter selection  
The backbone architecture of the Mask R-CNN convolutional neural network consists of ResNet + FPN. The commonly used configurations are ResNet50 + FPN and ResNet101 + FPN. The network structures of ResNet50 and ResNet101 are compared in Table 1.  
As shown in Table 1, the ResNet101 network has a deeper structure compared to ResNet50, allowing for more precise extraction of image details. Therefore, this study uses ResNet101 + FPN as the backbone architecture for the research on tunnel face joint extraction.  
(2) Anchor calibration rules in RPN  
Unlike simply dividing anchors into positive and negative samples based on IoU values, this study uses the Non-Maximum Suppression (NMS) [35] method for iterative calculation, as demonstrated by the principle in Equation (10). First, the box with the highest score is selected, and the IoU value of other boxes is calculated against this box. If the IoU value is greater than 0.6, the box is marked as a negative sample. Then, the box with the next highest score is selected for the next iteration, continuing until the process is complete.  
\[s_{i}=\begin{cases}s_{i},IoU(M,b_{i})<N_{t}\\ 0,IoU(M,b_{i})\geq N_{t}\end{cases} \tag{10}\]  
where \(s_{i}\) is the score value of the \(i\)-th box, \(M\) is the target box, \(b_{i}\) is the proposal box with the highest confidence, and \(N_{t}\) is the IoU threshold, set to 0.6 here.  
(3) ROI pooling method selection  
For networks based on the R-CNN architecture, ROI pooling methods mainly include ROIPooling and ROIAlign. Both aim to map features to a fixed-size feature map. The difference lies in that ROIPooling rounds off pixel values during pooling, while ROIAlign retains the floating-point values of pixels using bilinear interpolation, as shown in Figure 28. ROIAlign provides higher accuracy for small object recognition. To obtain detailed images of tunnel face joints, this study uses the ROIAlign pooling method.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Layer Name** & **50-Layer** & **101-Layer** \\ \hline Conv1 & & 7 \(\times\) 7, 64, stride 2 \\  & & 3 \(\times\) 3 max pool, stride 2 \\ Conv2\_x & \(\begin{bmatrix}1\times 1,&64\\ 3\times 3,&64\\ 1\times 1,&256\\ 1\times 1,&128\\ 3\times 3,&128\\ 1\times 1,&512\\ 1\times 1,&1024\\ \end{bmatrix}\times 3\) & \(\begin{bmatrix}1\times 1,&64\\ 3\times 3,&64\\ 1\times 1,&256\\ 1\times 1,&128\\ 3\times 3,&128\\ 1\times 1,&512\\ \end{bmatrix}\times 4\) & \(\begin{bmatrix}1\times 1,&128\\ 3\times 3,&128\\ 1\times 1,&512\\ 1\times 1,&1024\\ \end{bmatrix}\times 4\) \\ Conv5\_x & \(\begin{bmatrix}1\times 1,&256\\ 3\times 3,&256\\ 1\times 1,&1024\\ 3\times 3,&512\\ 1\times 1,&2048\\ \end{bmatrix}\times 23\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of ResNet network structures.