# Detection of Cavities from Dental Panoramic X-ray Images Using Nested U-Net Models
## 3 Results and Analysis
### Quantitative Validation  
The model was trained on the dataset before cropping the images with a test size of 0.1. The result showed that the IoU was good during the training process but very low during the testing phase. The ground truth of the uncropped panoramic images had a large space of black color (background) and a small spot of white color (cavity). Due to \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt}} \hline \hline
**Metrics** & **Formula** & **Definition** \\ \hline Mean Squared Error (MSE) & \(\frac{1}{N}\sum_{i}^{N}(Y_{i}-\widehat{Y}_{i})^{2}\) & (1) \\  & & Function that determines how much the values that were predicted and those that were observed differ. \\ \hline Intersection over Union (IoU) & \(\frac{TP}{TP+FN+FP}\) & (2) \\  & & It is used to identify which members are similar and which are distinct; this index calculates the degree of similarity between two groups of members. \\ \hline Dice & \(\frac{2\times\text{Area of overlap}}{\text{Total area}}\) & It is used to assess how closely a predicted segmentation mask and the ground truth segmentation mask resemble each other. \\ \hline Accuracy & \(\frac{TP+TN}{TP+TN+TP+FN}\) & (2) \\  & & It is determined by the number of correctly predicted data points. \\ \hline \hline \end{tabular}  
* \(N\) refers to the number of data points, \(Y_{i}\) to the observed values and \(\widehat{Y}_{i}\) to the predicted values. 2 TP refers to true positives, TN to true negatives, FP to false positives, and FN to false negatives.  
\end{table} 
Table 2: A brief overview of the performance metrics used in the model evaluation. \begin{table}
\begin{tabular}{p{113.8 pt} p{113.8 pt}} \hline \hline
**Hyperparameters** & **Value** \\ \hline Learning rate & 0.0001 \\ \hline Optimizer & Adam \\ \hline Activation function & gelu \\ \hline Regularizers & No \\ \hline Early Stopping & No \\ \hline Batch size & 4 \\ \hline Dropout & 0.4 \\ \hline Dense activation function & ReLU \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The details of the hyperparameters used in the evaluation of the models. this, the accuracy was low in the cavity detection model because the accuracy dealt with the background as \"True Positive\"; therefore, the accuracy for this model performance was unreasonably high. To address this problem, the dataset was cropped to obtain an image with only the tooth that has a cavity. After training the model with sizes of the test set of 0.1 and 0.2 from the dataset, the result showed that the IoU was good during the training process but low during the testing phase. The Dice coefficient was very good during the training process but very low during the testing. Accuracy was good during both the training and the testing process. The model was trained in numerous splitting conditions to check the performance and obtain the best results. Table 3 illustrates the split size of the dataset during the experiments. These extensive experiments showed that the data-splitting process did not affect or enhance the result of the model performance. In this study, the performance is dependent on the type of dataset and the target lesion for detection. The dental panoramic image is more difficult to analyze than another type of dental X-ray. The panoramic radiograph contains shadows that are reflections of various structures and organs, such as the lips. It also contains dark spots, such as spots in the roots. Those shadows and spots confused the training process and affected the model's performance. Additionally, the quality of panoramic X-rays is essential for accurately detecting cavities or any lesions. Some panoramic X-rays are poor quality, making it difficult to detect abnormal lesions. Table 4 presents the performance results of U-Net, U-Net++, and U-Net 3+ in the training, validation, and test sets with an 80-10-10% split of the dataset (Train: 4296, Val: 68, Test: 68). Figures 6-8 illustrate the results in the training and validation of the dataset with an 80-10-10% split and using different U-Net family models.