*2.3. Image Identification*

In order to obtain a more scientific and reliable experimental model, the project first divides the original tooth images into a training set and a validation set according to the ratio of 4:1, as shown in Table 1. According to the transfer learning theory, the separated tooth images are cut and preprocessed according to symptoms and are then classified into the database. After that, the number of diseased teeth in the training set was expanded using horizontal and vertical mirror flips to increase the number of datasets and make it consistent with the number of normal teeth in the training set as listed in Table 2. The expanded dataset is only used to train various classification network models of CNN. It would not be used in the validation set data.

**Table 1.** Data Classification of the periapical image after preprocessing.



**Table 2.** Data distribution of the original periapical image from clinical.

#### 2.3.1. CNN Model

In terms of deep learning, this proposal uses the tools in Matlab that support transfer learning for software development. The software environments and the hardware environments used in the proposal are listed in Table 3. To speed up the training efficiency of the CNN model, this study uses AMD R7-5800H CPU, Nvidia GeForce RTX 3070 GPU and DDR4 3200 16GB DRAM in terms of hardware performance. The architecture of each layer of the model takes AlexNet as the example of this research, as shown in Table 4. In the input stage of the model, the real training set and test set are put into the ratio of 4:1. The CNN model is trained through the classified dataset. Then, the purpose of adding a test set is to check whether the training effect deviates from the subsequent validation accuracy, thus making the experimental results more rigorous.

**Table 3.** The hardware and software platform.


**Table 4.** The input and output of AlexNet model.



**Table 4.** *Cont.*

After deep learning, images from the validation set are randomly imported into the model. The model classifies the images according to the feature results obtained from the previous training and creates a confusion matrix by calculation to get the classification results and the accuracy of the model.

#### 2.3.2. Adjust Hyperparameter

In the training phase, the setting of hyperparameters determines the success of the model. Each parameter represents a different meaning such as the number of layers of the neural network, the loss function, the size of the convolution kernel and the learning rate. This study describes the three modified parameters, including Initial Learning Rate, Max Epoch and Mini Batch Size. In addition, the detailed information of each parameter is listed in Table 5.

**Table 5.** Hyperparameters in CNN model.


#### *A. Initial Learning Rate*

In machine deep learning, the learning rate is a tuning parameter in the optimization algorithm. This means that the model needs an appropriate parameter which is the learning rate to get the best point of convergence. If the model has difficulty converging, it is most likely caused by the use of a too large learning rate. On the contrary, the convergence rate is too slow, which makes the model easy to overfit. Therefore, it is very important to choose an appropriate learning rate. After multiple tests on tooth images, the ideal learning rate is 0.0001.

#### *B. Max Epoch*

When an integrated database has passed through the CNN and has returned once, the whole process is referred to as an Epoch. However, if the Epoch is too large, it needs to be broken up into smaller pieces. With the increase of Epoch, the number of weight updates in the neural networks is also increased. The curve changed from under-fitting to over-fitting in the process of training. In general, if a CNN model has an appropriate

increase in Epoch, it will lead to a better accuracy and in turn will also add training time. After repeated testing, choosing 50 as the Epoch value in each CNN model was determined by the control variable method.

*C. Mini Batch Size*

Mini Batch Size is a subset of the training set. Usually, the weights are updated and the gradient which is from the loss function is evaluated. In general, it affects the convergence of the optimization algorithm and how much memory is used in the calculation. Within a reasonable range, when the Batch Size is larger, the descending direction is more accurate and the oscillation is smaller. However, if it exceeds this range, the Batch Size is too large and local optimization or memory overflow may occur. Mini Batch Size introduces larger randomness making it difficult to achieve convergence. In this research, adjusting the approximate Mini Batch Size value to 64 can produce an ideal training result.

### **3. Results**

This chapter presents the performance results of the proposed CNN model algorithm and compares it with the methods proposed in [20,23]. The proposed method for advanced symptom enhancement is also analyzed. The comparison of the image processing effect of the dataset with the results of the three CNN networks is presented for further discussion of the results.

One significant goal of this research is to enable the system to be employed in therapeutic settings. Figure 8 depicts the most common clinical workflow nowadays. Manual identification by doctors and the establishment of cumbersome medical records is a timeconsuming process. The purpose of the system in this proposal is to obtain objective data for physicians prior to diagnosis and therapy after the patient takes the PA film, as shown in Figure 9.

**Figure 9.** The flow chart of using this system.

In terms of model accuracy, this study uses the network input validation set for evaluation. The predictions obtained from the monitoring model are compared with the correct answers from the images to obtain the accuracy of the CNN. Table 6 presents the detailed training process of AlexNet and this is illustrated in Figures 10 and 11. The confusion matrix and truth table according to the network model are shown in Table 7.


**Table 6.** AlexNet training process.

**Figure 10.** The accuracy of Alexnet model in test set which is black line and training set which is blue line during training process.

**Figure 11.** The accuracy of Alexnet model in test set (black line) and training set (orange line) during loss training process.


**Table 7.** The confusion matrix of AlexNet training result.

Figure 12 shows the training process of this paper using the symptom enhancement technique at different stages. From the results, it can be seen that when the number of iterations increases, the three curves representing different preprocessing methods all show an upward trend in accuracy. The blue line is using the Gaussian high-pass filter and discoloration at the suspected lesion, the gray line is only discoloring the lesion without using the filter, and the orange line is the no enhancement technique. The experimental results show that although all three curves show an upward trend, the results of the enhanced two curves, the blue line and the gray line, are significantly higher than the unprocessed curves. This means that preprocessing has a significant impact on the verification accuracy. In addition, the model accuracy of the technique combining the Gaussian high-pass filter with discoloration at the lesion is about 1% and 5% higher than the other two methods. These results show that the method proposed in this paper can improve the final accuracy of the model.

**Figure 12.** Comparison of the accuracy of AlexNet's training process for the unprocessed image, applied Gaussian high pass filter and without filter.

The technology proposed in this study is applied to clinical image judgment. Figure 13 shows the image used as the target image for clinical image judgment of symptoms. Figure 13 shows the two tooth X-rays in the red frame. The left side is the normal healthy tooth while the one on the right side is the apical diseased tooth. After implementing this technology, the classification accuracy results obtained according to the model are listed in Table 8. The accuracy of the image classification results after enhancement in this work is higher than that before disease enhancement. In clinical medicine, excellent medical quality requires high-precision judgment. The image recognition ability of CNN is exceptional. The results show that the recognition using the proposed method in this study are all above 90%.

**Table 8.** Comparison of the clinical data and the resulting image.


From the research results listed in Table 9, the diagnostic accuracy of AlexNet for apical lesions can reach 96.21% which is higher than the other three models in the literature. This presents a significant improvement of more than 3% compared with 92.91% in [23] which also uses the same AlexNet architecture. Furthermore, the results of the apical lesion detection technique proposed in this paper are in stark contrast to the 75.53% accuracy reported in the tooth identification study in [20]. The research results show that the method proposed in this work is very effective and successful for apical lesions. Furthermore, it can be shown that enhancing symptoms through image preprocessing improves classification accuracy.

**Table 9.** Image recognition accuracy obtained from a different CNN model.


#### **4. Discussion**

In this proposal, the apical slices of multiple teeth are cut into pictures of a single tooth before training to improve the accuracy of these models. However, in the process of image cropping, this study discovered that the cutting accuracy obtained for the image by adaptive thresholding is higher than the one obtained by simple binary processing which reduces the possibility that many images contain non-target areas. The improvement of the cutting accuracy can make the effect of symptom enhancement more and thus improve the accuracy of the model. In addition, this paper uses a different method in the preprocessing of image symptoms to increase the dark area of the possible lesion area which actually helps the model accuracy to increase to more than 96%. Compared to other papers, the Gaussian high-pass filter is a tool for residual noise area to reduce noise in other projects. Changing the color of the lesion area is a different approach, and learning the features in the movie is instinctive and easy in the machine learning step. In addition, this paper proposes a hypothesis, that is the enhancement of apical lesions. The lesion area was preprocessed

before importing the images into training. It can be found that the preprocessed images can further improve the recognition accuracy of CNN which is based on the premise of the quantity and quality of models and databases. The accuracy of the AlexNet model used in this research can reach up to 96.21%. Furthermore, the system's sensitivity and specificity on clinical apical radiographs were 98.5% and 93.9%, respectively.

#### **5. Conclusions**

The main purpose of this study is to achieve automatic and accurate diagnosis of apical teeth, and to help dentists improve treatment efficiency. The final experimental results show that the accuracy of AlexNet can reach 96.21% which provides confidence for this project to expand the research scope, improve the accuracy and realize the clinical medical application. In the future, the research team has formulated three objectives. Firstly, the project will continue to explore the possibility of identifying multiple symptoms and achieving the classification of different symptoms. Secondly, it will try to make the model more comprehensive and improve its accuracy. Thirdly, it will develop a GUI interface integrating the functions of picture cutting, disease strengthening and disease detection which can simplify the operation process and enhance the practicability of the plan at the same time.

**Author Contributions:** Conceptualization, Y.C. and W.-M.L.; Data curation, Y.C., W.-M.L.; Formal analysis, M.-L.C.; Funding acquisition, S.-L.C. and C.-A.C.; Methodology, T.-Y.C. and M.-L.C.; Resources, C.-A.C., S.-L.C. and P.A.R.A.; Software, S.-L.C., Y.-H.S., Y.-S.C., Y.-J.L. and Y.-R.L.; Supervision, C.-A.C. and S.-L.C.; Validation, Y.-H.S., Y.-S.C. and Y.-J.L.; Visualization, Y.-R.L. and P.A.R.A.; Writing—original draft, T.-Y.C.; Writing—review & editing, M.-L.C., C.-A.C. and P.A.R.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported by the Ministry of Science and Technology (MOST), Taiwan, under grant numbers of MOST-111-2221-E-033-041, MOST-111-2823-8-033-001, MOST-111-2622- E-131-001, MOST-110-2223-8-033-002, MOST-110-2221-E-027-044-MY3, MOST-110-2218-E-035-007, MOST-110-2622-E-131-002, MOST-109-2622-E-131-001-CC3, MOST-109-2221-E-131-025, MOST-109- 2410-H-197-002-MY3, and the National Chip Implementation Center, Taiwan.

**Institutional Review Board Statement:** Institutional Review Board Statement: Chang Gung Medical Foundation Institutional Review Board; IRB number: 202002030B0; Date of Approval: 2020/12/01; Protocol Title: A Convolutional Neural Network Approach for Dental Bite-Wing, Panoramic and Periapical Radiographs Classification; Executing Institution: Chang-Geng Medical Foundation Taoyuan Chang-Geng Memorial Hospital of Taoyuan; Duration of Approval: From 2020/12/1 To 2021/11/30; The IRB reviewed and determined that it is expedited review according to case research or cases treated or diagnosed by clinical routines. However, this does not include HIV-positive cases.

**Informed Consent Statement:** The IRB approves the waiver of the participants' consent.

**Data Availability Statement:** Data sharing not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**

