# 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  
(1) The design of the GRD Algorithm  
The defective mandible 3D models (\(S_{d}\)) were generated on the basis of these complete models, which were constructed in Section 2.2.1 using our GRD algorithm. The GRD is an algorithm that is designed to generate defective mandible. To improve the effectiveness of the network, two rules should be considered: firstly, defects should be  
Figure 2: Voxelized 3D model construction. (**a**) Original CT image (**b**) Mandible 3D model construction (c) 3D model voxelization. generated randomly, and secondly, the rationality of the defects should be ensured. The GRD algorithm includes the following steps:  
First, a range was set in the mandibular defect-prone area, and point P was randomly selected within this range as the center of the defect area. Then, with point P as the center, a spherical selection box of a certain size was generated according to the dimension of the mandible voxel, and the voxels in the selection box were removed to obtain a defective mandibular binary voxel grid. The pseudocode of the GRD algorithm is shown in Algorithm 1. Furthermore, the running result of the algorithm is shown in Figure 3.  
(2) Comparison of different dimensions of mandible 3D voxel model  
In deep learning, the dimension of the voxel model directly affects the processing effect of the network and determines the quality of the mandibular implant model. If the dimension of the model is too high, the generated 3D model will be sparse, which can preserve the surface details of the model to the maximum extent, but this also results in the loss of much internal information. Thus, the implant model obtained by Formula (2) is only the external surface of the defect and does not constitute a closed 3D model. However, if the dimension of the model is too low, a large amount of surface detail information will be lost, meaning the accuracy of the implant model obtained by Formula (2) is not sufficient to complete the repair of the mandibular defects. Figures 4-6 are models of three different dimensions: 32 \(\times\) 32 \(\times\) 32, 64 \(\times\) 64 \(\times\) 64, and 128 \(\times\) 128 \(\times\) 128. The accuracy of the 32 \(\times\) 32 \(\times\) 32 dimension model is too low to meet the needs of the restoration. The 128 \(\times\) 128 \(\times\) 128 dimension model has improved accuracy compared with the 64 \(\times\) 64 \(\times\) 64 model, but the information inside the model is lacking, and a closed defect implant mode can not be obtained after executing the GRD  
Figure 3: Example of generating random defects. (**a**) Complete mandible. (**b**) Mandible after generating defect. the relative spatial position of the pixels remains unchanged, which is not only conducive to learning the structural features of a larger area but also improves the accuracy with which defects are located. The superposition of multiple dilated convolution kernels with a different dilated rate can extract the structural information of the mandible and defect on a larger scale, which facilitates more accurate mandibular defect repair. Incorporating the residual structure can effectively solve the problem of network degradation and gradient disappearance caused by the increase in the network depth and enhance the performance of the encoder in extracting the structural information. The network contains six 3D convolutional layers, two residual modules, four 3D dilated convolutional layers, three max-pooling layers, three upsampling layers, and four skip connection structures. The network parameters are shown in Table 1, and the overall network structure is shown in Figure 7A.