Implant Model Generation Method for Mandibular Defect Based on Improved 3D Unet

: The accurate reconstruction of a defective part of the mandible is a time-consuming task in maxillofacial surgery. In order to design accurate 3D implants quickly, a method for generating a mandibular defect implant model based on deep learning was proposed. First, an algorithm for generating a defective mandible 3D model randomly from a complete mandible 3D model was proposed due to the insufﬁciency of 3D models. Then a mandible 3D model dataset that consists of defective mandible 3D models and a complete mandible 3D model was constructed. An improved 3D Unet network that combines residual structure and dilated convolution was designed to generate a repaired mandibular model automatically. Finally, a mandibular defect implant model was generated using the reconstruction–subtraction strategy and was validated on the constructed dataset. Compared with the other three networks (3D Unet, 3D RUnet, and 3D DUnet), the proposed method obtained the best results. The Dice, IoU, PPV, and Recall for mandible repair reached 0.9873, 0.9750, 0.9850, and 0.9897, respectively, while those for implants reached 0.8018, 0.6731, 0.7782, and 0.8330. Statistical analysis was carried out on the experimental results. Compared with other methods, the P value of the method proposed in this paper was less than 0.05 for most indicators, which is a signiﬁcant improvement.


Introduction
Owing to trauma, congenital defects, plastic surgery, or the resection of diseased parts, some areas of the mandible can become damaged, which affects not only the appearance of the patient but also important physiological functions, such as chewing [1].Oral maxillofacial trauma accounts from 7.4 to 8.7% of medical emergencies, both in developed and developing countries [2].To restore the anatomical shape and aesthetic effect of the mandible as much as possible, mandibular defect repair requires the consistency of shape based on the original shape and characteristic parameters of the mandible [3].
In related studies of bone defects, a "critically sized" defect was considered as one that would not heal spontaneously and which requires surgical treatment.The definition of a "critically sized" defect includes a defect length greater than 1-2 cm and a greater than 50% loss of the circumference of the bone [4].During the surgery, the implant needs to match the defect position as much as possible and conform to the defect surface to restore the morphology and function of the mandible.
Currently, there are two commonly used methods for repairing and reconstructing defective mandibles, i.e., autologous bone grafts and personalized 3D implants for implant repair [5].The advantage of autologous bone grafting is immunocompatibility, accessibility, abundance, and low cost.Currently, the most used donor sites for mandibular reconstruction include the forearm radius, scapula, ilium, and fibula [6].The vascularized fibula flap transplantation method has advantages that other autologous bone graft repair and reconstruction methods do not have, such as a sufficient bone volume in the bone donor area, low mobility of the bone donor area, a rich blood supply, and a high survival rate of the graft.[7].Restoring the geometric shape of the mandible with reconstructed bone is difficult because the shape, size, and volume of autogenous bone are considerably different from those of the mandibular defect, which leads to difficulties in overlaying, fixed denture restoration, and dental implant restoration.In recent years, personalized 3D implants, as a new type of bionic repair method, can not only achieve functional repair but also accurately match the shape of the human mandible, which has become a new development direction for repairing mandibular defects.
The process for realizing personalized 3D implants is as follows: First, the patient's mandibular bone information is obtained using computerized tomography (CT) [8].Then, using the scanned information as a reference, a mandibular implant model with a personalized shape and complex internal structure is designed with the help of computer-aided design technology.Finally, through additive manufacturing (3D printing) technology, mandibular implants that meet the surgical requirements are manufactured.This method can effectively restore the patient's personalized appearance and chewing function [9,10].However, designing the desired shape and structure of a mandibular implant is challenging.At present, the usual method of bone defect implant design in surgery is based on the symmetry or bone shape before the defect [11,12].However, the pre-defective shape of the mandible is hardly obtainable.Therefore, it is difficult to completely match the geometric model of the implant obtained by these methods with the shape of the actual defect.The 3D modeling and design of implants are always done under the guidance of orthopedic surgeons, which takes a considerable amount of time and effort, and this also limits their applicability.For defects with relatively complex structures, simplification is usually carried out to reduce the difficulty of design and manufacture.However, this can make it difficult for the shape of the implant to precisely match the shape of the defect, leading to design failure [13].
3D shape completion [14] has been a research hotspot in recent years, aiming to restore the shape and structure of the defect part of the 3D model.The main methods can be classified as follows: (1) The classic mesh processing method: the 3D model is expressed as a 3D triangular mesh and can be directly processed; Sakr et al. [15] present an effective method for filling holes in 3D triangular meshes based on the direct solution of Laplace and biharmonic partial differential equations.The proposed approach is accurate and effective in filling triangular mesh holes of different sizes and shapes.(2) The processing method based on 3D point cloud data, which uses the symmetry of the 3D point cloud for shape completion; and (3) methods based on deep learning.Deep learning methods play an important role in 3D shape completion owing to various publicly available object 3D shape datasets, such as ShapeNet, which convert various objects (such as cars, chairs, airplanes, etc.) into voxel form and use a network of encoder-decoder structures for training [16].Litany et al. [17] propose a variational autoencoder with graph convolution operations that can learn occluded or missing parts in fully realistic shapes.The restoration of mandibular defects is a typical 3D shape completion problem, which is to restore the shape and structure of the bone defect part and design the implant model.However, these above-mentioned methods are not suitable for mandibular shape completion.These methods deal with simple geometries that have the same or a similar shape and structure, whereas the morphological structure of the mandible is relatively complex and varies from person to person.
In recent years, deep learning has been widely used in the medical field [18,19].Morais et al. [20] first proposed a deep learning method in 2019 to perform 3D shape completion on the defective skull model.This method was verified on an entire reconstructed skull without a validation of the defect implant.The deep learning approach adopted by Li et al. [21] uses two neural networks step by step.First, the network is trained to reconstruct a low-dimensional 3D model to locate the defect area.Then, another neural network is trained to achieve high-dimensional implant predictions.Shi et al. [22] proposed a convolutional neural network with an autoencoder structure with auxiliary paths to form 3D implants by inpainting 2D slices with different axes.Matzkin et al. [23] proposed a reconstruction-subtraction strategy for skull repair, which consists of two steps: first, the complete skull is reconstructed, and then the implant model is generated by subtracting the defect model from the complete skull compared to the direct reconstruction method using implants; the 3D model of the implant constructed by the reconstruction-subtraction strategy produces more noise.Qin Chuanbo et al. [24] used an improved 3D Unet for skull repair research.However, the shape and structure of the mandible differ greatly from those of the skull, the size and shape of the mandible vary greatly from person to person, and the location and shape of the defect are also complex and variable.The above-mentioned deep learning methods cannot effectively extract complex mandibular and defect morphological information and cannot complete accurate mandibular defect repair.
Wu et al. [25] incorporated dilated convolution into the encoder-decoder structure to expand the receptive field and enhance the ability of information extraction.However, the increase in the network depth will lead to network degradation and gradient disappearance, which limits the effect of defect repair.In addition, the datasets used in these studies were constructed using the simulated defect method [26], but the skull defect shapes are some simple geometric shapes, such as cylinders, which limits the generalization of the network.In addition, since there is no public 3D shape dataset about defective mandibles, the application of deep learning methods in mandible shape completion is constrained.At present, there is no relevant literature on the application of deep learning methods in mandibular defect repair.
In the repair of defective mandibles, the reconstruction of the defect area needs to meet three design criteria: safety, functionality, and shape consistency.This paper aims at the shape consistency criteria and studies the application of deep learning methods in the automatic repair of mandibular defects and the generation of implant models.The main contributions of this paper are as follows: (1) In order to solve the problem of the insufficient data of the mandible 3D model, an algorithm that can generate defects randomly in the mandible was proposed, namely GRD (generate random defect).Then, a dataset of the mandible 3D model was constructed using GRD.(2) In order to solve the problems of deep learning in the repair of mandibular defects, 3D Unet is used for the automatic repair of mandibular defects.Aiming to solve the problem that the classic traditional 3D Unet has in terms of the difficulty of effectively extracting the structural features of the mandibular defect, an improved 3D Unet (3D RDUnet) was proposed by fusing the residual structure and the dilated convolution layer to obtain the mandibular repair model.Using a reconstruction-subtraction strategy, a 3D model of the defect implant was obtained.(3) The effects of mandibular restoration and defect implant generation were compared on different networks, and the results were statistically analyzed.The results show that the method proposed in this paper has the best effect and is significantly better than other methods in a statistically significant fashion.The implants generated in this paper can meet the medical requirements for the shape consistency of defect repair.

Methods
In fact, the generation of the mandibular defect repair model is a 3D volume shape completion problem from the perspective of modeling.To assist surgeons in achieving an efficient mandibular defect repair model, an automatic generation method of the mandibular defect repair model based on an improved 3D Unet is proposed, as shown in Figure 1.Let the volume of the mandible with a defect be Sd, the volume of the repaired complete mandible be Sc, and the real volume of the complete mandible be Sg.The implant of the predicted defect part is Ip, and the real implant is Ig.
(1) The 3D model dataset for human mandibular defect repair was constructed using the GRD algorithm.First, the mandible 3D model composed of triangular patches was obtained from CT images, then it was converted into a binary voxel grid model (Sg).
Based on the 3D model of the complete mandible, a generate random defect (GRD) algorithm was designed to generate a mandibular voxel grid (Sd) with defects.Finally, a dataset containing inputs and labels was constructed.In this dataset, the input of the network is the defective mandible 3D model (Sd), and the label is the real and complete mandible 3D model (Sg).Let the volume of the mandible with a defect be S d , the volume of the repaired complete mandible be S c , and the real volume of the complete mandible be S g .The implant of the predicted defect part is I p , and the real implant is I g .
(1) The 3D model dataset for human mandibular defect repair was constructed using the GRD algorithm.First, the mandible 3D model composed of triangular patches was obtained from CT images, then it was converted into a binary voxel grid model (S g ).
Based on the 3D model of the complete mandible, a generate random defect (GRD) algorithm was designed to generate a mandibular voxel grid (S d ) with defects.Finally, a dataset containing inputs and labels was constructed.In this dataset, the input of the network is the defective mandible 3D model (S d ), and the label is the real and complete mandible 3D model (S g ).
(2) Based on the 3D Unet network, an improved 3D Unet network (3D RDUnet) was proposed by fusing the residual structure and dilated convolution, the network model was trained with S d as the input and S g as the label, and the output S c was obtained.Mandible evaluation indices were calculated from S c and label S g .Then, the reconstruction-subtraction strategy was used to calculate the predicted implant I p and the real implant I g according to Formulas (1) and ( 2), and the implant evaluation index was used to evaluate the network's performance.Finally, a mandibular defect implant meeting the surgical requirements was obtained.

The Process of Constructing the Mandible 3D Model Dataset
To enhance the generalization of the network, eight healthy mandibles were randomly selected in this study.CT data of these mandibles were obtained to construct a 3D model of these complete mandibles.Based on these complete mandible 3D models, 80 sets of synthetic defect data were obtained.The dataset was divided into the training set (72 sets) and test set (8 sets) according to the ratio of 9:1.
For the classification of defects, Zhang et al. [27] divided mandibular defects into 18 types.In order to make the generated defect as close as possible to the real defect type, this study referred to this classification standard when generating the defect 3D model.

Construct a Complete 3D Voxel Model of the Mandible
As shown in Figure 2, the construction of the complete mandible 3D model (S g ) was divided into three steps: first, a small number of images of the healthy mandible were obtained by CT scans, and these data were saved in DICOM format.Then, a 3D model of the complete mandible was constructed based on the medical image processing software Mimics.Finally, voxelization was performed to process the model as a binary voxel grid.
(2) Based on the 3D Unet network, an improved 3D Unet network (3D RDUnet) was proposed by fusing the residual structure and dilated convolution, the network model was trained with Sd as the input and Sg as the label, and the output Sc was obtained.Mandible evaluation indices were calculated from Sc and label Sg.Then, the reconstruction-subtraction strategy was used to calculate the predicted implant Ip and the real implant Ig according to Formulas (1) and ( 2), and the implant evaluation index was used to evaluate the network s performance.Finally, a mandibular defect implant meeting the surgical requirements was obtained.(2)

The Process of Constructing the Mandible 3D Model Dataset
To enhance the generalization of the network, eight healthy mandibles were randomly selected in this study.CT data of these mandibles were obtained to construct a 3D model of these complete mandibles.Based on these complete mandible 3D models, 80 sets of synthetic defect data were obtained.The dataset was divided into the training set (72 sets) and test set (8 sets) according to the ratio of 9:1.
For the classification of defects, Zhang et al. [27] divided mandibular defects into 18 types.In order to make the generated defect as close as possible to the real defect type, this study referred to this classification standard when generating the defect 3D model.

Construct a Complete 3D Voxel Model of the Mandible
As shown in Figure 2, the construction of the complete mandible 3D model (Sg) was divided into three steps: first, a small number of images of the healthy mandible were obtained by CT scans, and these data were saved in DICOM format.Then, a 3D model of the complete mandible was constructed based on the medical image processing software Mimics.Finally, voxelization was performed to process the model as a binary voxel grid.
CT scans were performed using a cone-beam X-ray computed tomography system, model i-CAT 17-19, manufactured by Imaging Sciences International.The CT scanning equipment conformed to the DICOM 3.0 protocol standard data.The tube voltage was set to 90 kV, the tube current was set to 10 mA, the scan time was set to 20 s, and the scan slice thickness was 0.25 mm.

The Method to Generate a 3D Voxel Mandible Model with Defect
(1) The design of the GRD Algorithm The defective mandible 3D models (Sd) 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 generated randomly, and secondly, the rationality of the defects should be ensured.The GRD algorithm includes the following steps: CT scans were performed using a cone-beam X-ray computed tomography system, model i-CAT 17-19, manufactured by Imaging Sciences International.The CT scanning equipment conformed to the DICOM 3.0 protocol standard data.The tube voltage was set to 90 kV, the tube current was set to 10 mA, the scan time was set to 20 s, and the scan slice thickness was 0.25 mm.

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 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.
Appl.Sci.2023, 13, x FOR PEER REVIEW 6 of 16 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. Step 2: randomly generate a center point p(x0,y0,z0) within the threshold range.
Step 2.1: traverse all voxels whose value is equal to 1 in the model, calculate the distance L of these voxels to center point p, and remove the voxel when L is less than L(n).
Step 2.2: after traversing the entire model, if the number m of removed voxels is less than M(n), re-execute Step 2.
Step 3: save the model to the specified path as a 3D model of the simulated defect and visualize the model. (

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.Step 2: randomly generate a center point p(x0,y0,z0) within the threshold range.
Step 2.1: traverse all voxels whose value is equal to 1 in the model, calculate the distance L of these voxels to center point p, and remove the voxel when L is less than L(n).
Step 2.2: after traversing the entire model, if the number m of removed voxels is less than M(n), re-execute Step 2.
Step 3: save the model to the specified path as a 3D model of the simulated defect and visualize the model. (

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 After comparing the quality of the models, the 64 × 64 × 64 dimension with the best performance was selected.

The Design of the Improved 3D Unet Network Model
Unet [28] has become one of the most widely used models in the field of medical images.As an improvement of the classic Unet, 3D Unet is also widely used in the medical field.Aiming at the poor effect of the 3D Unet network in mandibular defect repair in previous studies (see Section 3.3 for details), a lightweight 3D Unet network was constructed (named 3D RDUnet).This network integrates a dilated convolution layer (Dilated Conv) between the encoder and decoder and integrates a residual structure (Resblock) into the encoder of the network.The dilated convolutional layer can expand the convolution receptive field without reducing the spatial resolution and ensures that 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 After comparing the quality of the models, the 64 × 64 × 64 dimension with the best performance was selected.

The Design of the Improved 3D Unet Network Model
Unet [28] has become one of the most widely used models in the field of medical images.As an improvement of the classic Unet, 3D Unet is also widely used in the medical field.Aiming at the poor effect of the 3D Unet network in mandibular defect repair in previous studies (see Section 3.3 for details), a lightweight 3D Unet network was constructed (named 3D RDUnet).This network integrates a dilated convolution layer (Dilated Conv) between the encoder and decoder and integrates a residual structure (Resblock) into the encoder of the network.The dilated convolutional layer can expand the convolution receptive field without reducing the spatial resolution and ensures that 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 After comparing the quality of the models, the 64 × 64 × 64 dimension with the best performance was selected.

The Design of the Improved 3D Unet Network Model
Unet [28] has become one of the most widely used models in the field of medical images.As an improvement of the classic Unet, 3D Unet is also widely used in the medical field.Aiming at the poor effect of the 3D Unet network in mandibular defect repair in previous studies (see Section 3.3 for details), a lightweight 3D Unet network was constructed (named 3D RDUnet).This network integrates a dilated convolution layer (Dilated Conv) between the encoder and decoder and integrates a residual structure (Resblock) into the encoder of the network.The dilated convolutional layer can expand the convolution receptive field without reducing the spatial resolution and ensures that 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

The Design of the Improved 3D Unet Network Model
Unet [28] has become one of the most widely used models in the field of medical images.As an improvement of the classic Unet, 3D Unet is also widely used in the medical field.Aiming at the poor effect of the 3D Unet network in mandibular defect repair in previous studies (see Section 3.3 for details), a lightweight 3D Unet network was constructed (named 3D RDUnet).This network integrates a dilated convolution layer (Dilated Conv) between the encoder and decoder and integrates a residual structure (Resblock) into the encoder of the network.The dilated convolutional layer can expand the convolution receptive field without reducing the spatial resolution and ensures that 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.

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.

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.

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.

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.

Evaluation Indicators
The dice similarity coefficient (DSC) and intersection-over-union ratio (IoU) were used to evaluate the performance of the model: (3) 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).
where TP, FP, and FN represent true positive, false positive, and false negative, respectively.

Mandibular Restoration and Implant Model Evaluation
Mandible reconstruction was performed on the divided eight test sets using four trained networks: 3D Unet, 3D RUnet, 3D DUnet, and 3D RDUnet.For each test set, the reconstruction-subtraction strategy was used to obtain the implant of the defect part according to Formula (1).The evaluation indices of the mandibular repair model obtained from four different network reconstructions and the evaluation indexes of the defect implant obtained after reconstruction-subtraction are shown in Table 2. Table 2 shows that 3D RUnet is superior to 3D Unet in mandible and implant indicators, indicating that incorporating the residual structure effectively improves the reconstruction performance of the model.However, compared 3D DUnet with 3D RUnet, only the mandible and implant precision (PPV) of 3D DUnet is superior to 3D RUnet, others indexes have no substantial improvement.Furthermore, compared with 3D Unet, there is even a considerable decrease in the recall rate (From 0.7315 to 0.6412).This shows that the dilated convolutional layer increases the trainable parameters but cannot improve the reconstruction performance of the network.
The indicators of 3D RDUnet are better than those of 3D RUnet and 3D DUnet.This result shows that incorporating residual structures and dilated convolutional layers can remarkably enhance the performance of the network.The mandible-related evaluation indices of 3D RDUnet are all above 0.97 (DCS: 0.9873, IoU: 0.9750, PPV: 0.985, Recall: 0.9897), and the implant-related indices are all above 0.65 (DCS: 0.8018, IoU: 0.6731, PPV: 0.7782, Recall: 0.8330).Compared with 3D Unet, 3D RUnet, and 3D DUnet, the improvement is obviously clear, which shows that 3D RDUnet substantially enhances the ability of the network to generate implants.
In all networks, the evaluation index of the implant is lower than that of the mandible.The main reasons are as follows: First, the defect part is a difficult part to reconstruct when the mandible is reconstructed, and contextual information is lacking.Especially when the volume of the defect is large, the reconstruction is likely to fail.Second, the implant is obtained by subtracting Formula (1), which is equivalent to adding the error of the mandibular reconstruction to the implant, resulting in a lower index.Finally, part of the surface of the implant must fit the defect, resulting in a complex, changeable shape, unlike the overall shape of the mandible.Inpainting these complex boundaries well, which is also the main source of implant errors, is difficult for the network.

Statistical Significance Analysis
We further analyzed whether the improvements of 3D RUnet, 3D DUnet, and the proposed 3D RDUnet were statistically significant for all indicators of the mandible and implants by means of t-tests. where X 2 are the mean and the estimated variance with respect to a metric from two trained models.n is the number of test cases.Table 3 shows the results.We adopt P T = 0.05 as the threshold to categorize whether the difference is significant.Comparing the results of 3DUnet with 3DRUnet, in the mandibular evaluation index, DCS and IoU were significantly improved (0.01 < p < 0.05), while PPV and Recall were not significantly improved (p > 0.05).In the implant evaluation index, IoU was extremely significantly improved (p < 0.01), and other indicators were significantly improved (0.01 < p < 0.05).
Comparing the results of 3DDUnet with 3DUnet, in the mandibular evaluation index, DCS and IoU lifting were not significant (p > 0.05), and PPV and IoU lifting were significant (0.01 < p < 0.05).In the implant evaluation index, DCS and IoU lifting were significant (0.01 < p < 0.05), and PPV and Recall lifting were extremely significant (p < 0.01).
Comparing the results of 3DDUnet with 3DRUnet, in the mandibular evaluation index, the difference in PPV was significant (0.01< p <0.05), and the difference in other indexes was extremely significant (p < 0.01).In the implant evaluation index, the difference in all indexes was extremely significant (p < 0.01).
Comparing the results of 3DRDUnet with 3DUnet, in all evaluation indicators, the improvement of mandibular PPV was not significant (p > 0.05), and the improvement of other indicators was extremely significant (p < 0.01).At the same time, in comparison with 3DRUnet, the same results were achieved.Comparing the results of 3DRDUnet with 3DDUnet, in all evaluation indicators, the improvement of mandibular PPV was significant (0.01 < p < 0.05), while the improvement of other indicators was extremely significant (p < 0.01).
So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.
It can be seen from Table 4 that the implant generated by the 3DUnet network fails to restore the shape of the real implant.The implant model occurs serious deformation and has a lot of noise.In contrast, the shape of the implant model generated by 3D RUnet and 3D DUnet is closer to the shape of the real implant, and the noise has been reduced to some extent, but it is still serious.The implant generated by 3D RDUnet has obvious improvement compared with the other three networks.Not only is the shape the closest to the real implant, but the noise is also significantly reduced.
In the process of generating the implant model by the 3DUnet network, it is difficult for the network to extract the global information of the shape and structure of the mandible, and it is also difficult to extract the shape information of the defect.As a result, when the network generates the mandible repair model, neither the overall shape of the mandible nor the shape of the defect can be restored.When performing the reconstruction-subtraction strategy to generate the implant, these errors appear as noise around the surface of the implant and at other locations away from the implant.
The residual structure in the 3D RUnet network enables the network to learn the local information of the defect more specifically, resulting in the network being able to restore the shape of the defect more accurately when generating the mandible repair model.However, the learning ability of the network for the overall information of the mandible is still insufficient.In the final implant model, the shape of the implant is closer to that of the real implant, and there is less noise around the implant surface, but there is still more noise in other parts farther from the implant.In contrast, the expanded convolutional layer in the 3D DUnet network can expand the receptive field of the convolution, enabling the network to learn more about the overall shape of the mandible rather than the shape of the defect.This results in the network being able to accurately reconstruct the overall shape of the mandible but difficult to restore the shape of the defect.Therefore, in the generated implant model, noise is generated less far away from the implant and more around the surface of the implant.

Mandibular defect
So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.

Visual Comparison of Different Defect-Generating Implants
So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.

Visual Comparison of Different Defect-Generating Implants
So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.

Visual Comparison of Different Defect-Generating Implants
So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.

Visual Comparison of Different Defect-Generating Implants
So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.

Visual Comparison of Different Defect-Generating Implants
So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.So, from the results in Table 3, it can be seen that for most of the indicators of the mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.mandible and implants, the 3D RDUnet performs better than 3DUnet, 3D RUnet, and 3D DUnet significantly.

Visualization
Table 4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.4 shows the performance of the implants generated by the four networks described in Section 3.1 for the defects of different positions and sizes.The first and second rows represent four kinds of defects with different positions and shapes and their real implants, and the third to sixth rows represent the performance of the four kinds of network-generated implants.

3D RDUnet
The residual structure and dilated convolutional layer are added to 3D RDUnet at the same time, and the generated implant is the closest to the real implant.Noise is significantly reduced, both around the implant surface and elsewhere.This shows that the residual structure and dilated convolutional layers in the network can be effective at the same time, improving the quality of the generated implants.Such a model requires only simple morphological processing to generate implants for defect repair by 3D printing, and it can meet the surgical requirements for mandibular defect repair.
We visualized the repaired mandible (S c ) obtained by the 3DRDUnet network and compared it with the complete mandible (S g ); the results are shown in Figure 8.The images on the left are the repaired mandibles (S c ), where the red areas are the predicted defect parts (I p ).The images on the right are the complete mandible (S g ), where the red areas are the real defect implant (I g ).

Conclusions
In this paper, the defect repair of the mandible is studied, and the deep learning method is applied to the automatic generation of mandibular defect implants.An algorithm that can generate random defects was designed, and a data set of mandible 3D mod- It can be seen that different defects in different mandibles have been successfully repaired, and the morphological structure of the normal mandible has been basically restored.The shape of the implant can match the shape of the defect, and the connection is relatively smooth, but there still appears to be some unevenness and noise.The volume of the implant is slightly smaller than that of the defect.In fact, the fit between the implant and the defect should not be too tight, lest the implant squeeze the healthy bone tissue and cause deformation.

Conclusions
In this paper, the defect repair of the mandible is studied, and the deep learning method is applied to the automatic generation of mandibular defect implants.An algorithm that can generate random defects was designed, and a data set of mandible 3D models was constructed on this basis.The classic 3DUnet network was improved, and the residual structure and dilated convolutional layer were incorporated to improve the quality of the implant model, and the influence of the residual structure and dilated convolutional layer on network performance was explored.The generated model can be 3D printed after simple morphological operations, which has practical value.
However, even with the synthetic data approach, the size of the dataset is still insufficient to support complex networks for training.In addition, when constructing the mandibular voxel model, the high-dimensional model produces sparsity, which will cause the generation defect algorithm to fail.This reason limits the size of the mandibular model dimensions and cannot generate higher-quality implant models.This study only discusses the shape and size of the implant model.For the mechanical strength of the implant, it needs to be verified by finite element experiments after determining the material properties of the implant [29].We will try to solve these problems in the future and conduct research on the mechanical strength of the implants.

Figure 1 .
Figure 1.Automatic generation method of mandibular defect repair model based on improved 3D Unet.

Figure 1 .
Figure 1.Automatic generation method of mandibular defect repair model based on improved 3D Unet.

Figures 4 -
6 are models of three different dimensions: 32 × 32 × 32, 64 × 64 × 64, and 128 × 128 × 128.The accuracy of the 32 × 32 × 32 dimension model is too low to meet the needs of the restoration.The 128 × 128 × 128 dimension model has improved accuracy compared with the 64 × 64 × 64 model, but the information inside the model is lacking, and a closed defect implant mode can not be obtained after executing the GRD algorithm.

Figure 3 .
Figure 3. Example of generating random defects.(a) Complete mandible.(b) Mandible after generating defect.Algorithm 1: GRD Algorithm Input: complete voxel (shape = [n,n,n]), n is the dimension of the voxel model.Output: defective voxel (shape = [n,n,n]).Step 1: set the coordinate thresholds x, y, and z of the defect center point (x∈[x1,x2], y∈[y1,y2], z∈[z1,z2]) and calculate the distance threshold L(n) and threshold M(n) on the total number of voxels removed.Step 2: randomly generate a center point p(x0,y0,z0) within the threshold range.Step 2.1: traverse all voxels whose value is equal to 1 in the model, calculate the distance L of these voxels to center point p, and remove the voxel when L is less than L(n).Step 2.2: after traversing the entire model, if the number m of removed voxels is less than M(n), re-execute Step 2.Step 3: save the model to the specified path as a 3D model of the simulated defect and visualize the model.

Figure 7 .
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.

Figure 7 .
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.

Figure 8 .
Figure 8.The Visualization of the repaired mandible 3D models.
4-6 are models of three different dimensions: 32 × 32 × 32, 64 × 64 × 64, and 128 × 128 × 128.The accuracy of the 32 × 32 × 32 dimension model is too low to meet the needs of the restoration.The 128 × 128 × 128 dimension model has improved accuracy compared with the 64 × 64 × 64 model, but the information inside the model is lacking, and a closed defect implant mode can not be obtained after executing the GRD algorithm.After comparing the quality of the models, the 64 × 64 × 64 dimension with the best performance was selected.

Table 3 .
p values among the evaluation metrics of the four approaches for statistical significance analysis.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.

Table 4 .
Visual comparison of different defect-generating implants.