# Implant Model Generation Method for Mandibular Defect Based on Improved 3D Unet
## 2 Materials and Methods
### The Process of Constructing the Mandible 3D Model Dataset
#### 2.2.2 The Method to Generate a 3D Voxel Mandible Model with Defect
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Layer** & **Operation** & **Kernel Size** & **Stride** & **Dilation** & **Channels** \\ \hline Conv1 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 8 \\ Maxpool1 & MaxPool3D & \(2\times 2\times 2\) & \(2\times 2\times 2\) & & \\ Resblock1 & Conv3D+BN+ReLU & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 8 \\ Maxpool2 & MaxPool3D & \(2\times 2\times 2\) & \(2\times 2\times 2\) & & \\ Conv2 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 4 \\ Maxpool3 & MaxPool3D & \(2\times 2\times 2\) & \(2\times 2\times 2\) & & \\ Resblock2 & Conv3D+BN+ReLU & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 4 \\ Dilated Conv1 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 2 & 4 \\ Dilated Conv2 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 4 & 4 \\ Dilated Conv3 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 8 & 4 \\ Dilated Conv4 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 16 & 4 \\ Conv3 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 4 \\ Upsampling1 & Upsampling3D & & & & \\ Conv4 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 8 \\ Upsampling2 & Upsampling3D & & & & \\ Conv5 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 8 \\ Upsampling2 & Upsampling3D & & & & \\ Conv5 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 8 \\ Conv5 & Conv3D & \(3\times 3\times 3\) & \(1\times 1\times 1\) & 1 & 1 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Network parameters. Figure 7: The overall structure of the 3D RDUnet network model. (**A**) The structure of the 3D RDUnet. (**B**) The structure of the dilated convolution layer. (**C**) The residual structure. 2.3.1. The Design of Dilated Convolutional Layer  
The structure of the dilated convolution layer is shown in Figure 7B. The input passes through four DR structures (Dilated Conv+ReLU) in sequence, and the dilated rates of the four dilated convolution layers are 2, 4, 8, and 16 in sequence. In addition, a skip connection is added to add the input and output of each dilated convolutional layer to enhance the network's ability to process mandible and defect structure information. 2.3.2. The Design of Residual Structure  
The residual structure is shown in Figure 7C. For the input feature x, after a CBR (Conv3D + BN + ReLU) and a CB (Conv3D + BN) calculation, F (x) is obtained and then added to the input x to obtain F (x) + x, and finally, the output f (x) is obtained through the ReLU activation function. 3.2.2. The Design of Residual Structure  
The residual structure is shown in Figure 7C. For the input feature x, after a CBR (Conv3D + BN + ReLU) and a CB (Conv3D + BN) calculation, F (x) is obtained and then added to the input x to obtain F (x) + x, and finally, the output f (x) is obtained through the ReLU activation function. 3.3.1. Comparison of Network Performance  
This paper compares the proposed 3D RDUnet with three other networks. The three networks are the classic 3D Unet network, the improved network based on 3D Unet combined with the residual structure (3D RUnet), and the improved network based on 3D Unet combined with dilated convolution (3D DUnet). The 3D model dataset constructed by the method described in Section 2.2 was used for training. The learning rate during the training phase was 0.0005, the batch size was 2, and the number of epochs was 150. 3.2. Evaluation Indicators  
The dice similarity coefficient (\(DSC\)) and intersection-over-union ratio (\(IoU\)) were used to evaluate the performance of the model:  
\[DSC=2 TP/(2 TP+FP+FN). \tag{3}\]  
\[\text{Io}U=TP/(TP+FN+FP). \tag{4}\]  
For the evaluation of voxels, the precision (also known as the positive predictive value, PPV) and the Recall are used to evaluate models which were used as distinction occupied voxels (voxels belonging to the mandible) and unoccupied voxels (voxels not belonging to the mandible).