# Detection of Periapical Lesions on Panoramic Radiographs Using Deep Learning
## 3 Results  
Our proposed solution consisted of two main CNNs: PRA detector and lesion classifier. First, the entire panoramic radiograph was used as an input to the presented system. Then the detection model (i.e., detector) was used to process the panoramic radiograph to localized and define the boundaries of each PRA by a bounding box. Finally, the PRAs extracted by the system, were fed them to the PL Classifier. The PL Classifier in turn classified each cropped PRA as Periapical Lesion (PL) or Healthy (H). To automate the process of periapical lesion localization and classification, our proposed solution combined the detection and classification models as shown in Figure 1. The system final output was an image showing the periapical lesion on the OPG. Our proposed detector identified the PRAs using a custom function based on the model aster R-RCNN. We tested two strategies to train our detector. In the first strategy (method 1) we only included unhealthy PRA (PL) for the training, while for the second strategy (method 2) we included both healthy (H) and unhealthy (PL). We trained for 1000 iterations and evaluated the detection performance of both methods based on Average Precision (AP) calculated at intersection-over-union (IOU) =0.5 on a test set of 143 images. Method 1 achieved AP50 of 38.5% while method 2 achieved AP50 of 74.95% at iteration 1000. We observed that training the detector on PRAs including H and PL classes achieved faster convergence and higher detection rates. We therefore adopted this approach in our further experiments. The proposed system then cropped and normalized all predicted bounding boxes that were then submitted to the classifier model. Figure 2 shows one example of the output of the detection model. The detector was able to adapt to the size and extension of the periapical region automatically depending on the size and extension of the roots and the lesions. This was demonstrated by the high AP50 of the algorithm. Each periapical area was labeled independently regardless of whether it was found on single rooted or multi rooted teeth. The periapical lesion classifier was responsible to label the bounding box of each detected PRAs as PL or H using a fine-tuned CNN. We trained and validated three classification models (VGG16, Inception v3, and Xception) on a balanced subset of the original dataset consisted of 3249 PRAs. As a baseline, all models were initialized from the ImageNet pre-trained weights and trained for 50 epochs. We calculated the accuracy, sensitivity, and specificity on a test set of 707 PRA to assess the performance of these classifiers at epoch 50 as shown in Table 2. Our findings showed that Inception v3 outperformed both VGG16 and Xception in all metrics. Therefore, we selected Inception v3 as the classification model in the proposed architecture. We resumed training until convergence. Figure 3 shows Inception v3's learning curves and error rates, where it shows that the model converged on epoch 100. The final performance results of the Inception model are shown in Table 3. In this test evaluating the performance of the final model, a total of 312 PRAs were successfully classified as H, and 282 PRAs were successfully classified as PL. While 48 PRAs were incorrectly classified as PL and 65 PRAs were incorrectly labelled as H. The classifier accuracy, sensitivity, and specificity were 84, 81, and 86, respectively. Figure 3: Graph depicting the learning curves and error rates of the Inception v3 model we used to classify the periapical areas. The graph shows the training accuracy (Train Acc. ), the training loss (Train Loss), the validation accuracy (Val. Acc.) and the validation loss (Val. Loss) as a function of epochs. Training and validation loss decreased over time and stabilized at epoch 100. Training and validation accuracy on the other hand increased over time and stabilized at epoch 100. This indicated the convergence of the model after 100 epochs.