## 4 Results
### Testing Dataset  
Figure 5 shows the confusion matrix for each model variant, nano (Figure 5a), small (Figure 5b), medium (Figure 5c), large (Figure 5d), and extra-large (Figure 5e), tested on the testing dataset, which consists of 50 images, with 35 images from myopic eyes and 15 from healthy eyes. Table 4 reports the performance metric results for the variants of YOLOv8. It is evident that the nano and extra-large models perform similarly, as do the small and medium models. The best-performing model, balancing high accuracy, high recall, and F1 score with low computational time, is the nano variant, with an accuracy of 84%, recall of 97.1%, and F1 score of 89.5%. The large variant also performs well but with slightly lower results compared to the nano model, with an accuracy of 82%, recall of 91.4%, and F1 score of 87.7%  
YOLOv8 nano and YOLOv8 extra-large stand out for their overall best performance, with high scores in accuracy (84.0%), precision (82.9%), recall (97.1%), and F1 score (89.2%). YOLOv8 large excels in precision (84.2%) and specificity (60.0%), but its recall (91.4%) is lower, which could lead to a higher number of false negatives. YOLOv8 small and YOLOv8 medium show lower performance across nearly all metrics, with precision (77.3%) and specificity (33.3%) significantly lower. Since our goal is to minimize false negatives, such as in screening programs, YOLOv8 nano and YOLOv8 extra-large appear to be the best choices due to their excellent recall and F1 scores. The Shapiro-Wilk test revealed that accuracy, precision, F1 score, and specificity are normally distributed (\(p>0.05\)). The recall, on the other hand, is not (\(p<0.05\)). Since we had only one value per model, we used the Kruskal-Wallis test, which revealed no statistically significant differences in the performance metrics across the different models. In medicine, sensitivity (or recall) is crucial for minimizing false negatives and preventing misdiagnosis. Based on the sensitivity (97.1%) and considering the F1 score (89.2%), which provides a more balanced view of the model's performance, and taking into account the computation speed in performing the inference, we concluded that the best-performing model on the testing set is the nano variant of YOLOv8. To identify the best model for distinguishing between myopia and non-myopia efficiently, we calculated the ROC and AUC for the YOLOv8 models. Figure 6 shows the ROC curve comparison for models n, s, m, l, and xl, highlighting the AUC values. Models n and xl, as well as models s and m, perform equally. Therefore, we decided to plot the ROC for models n, s, and l.  
The ROC AUC was calculated for these three models to compare their discriminative ability. The models tested were n, s, and l. Below are the results of the comparisons in terms of AUC and their respective differences, calculated using a 95% confidence interval (CI) for the AUC difference with the bootstrapping method in Jupyter Lab. The difference between models n (AUC = 81.5%) and s (AUC = 83.4%) is not statistically significant as the confidence interval includes zero (observed difference \(-1.9\%\), CI: [\(-60.7\%\), 74.2%]). Similarly, for models n (AUC = 81.5%) and l (AUC = 77.6%), and s (AUC = 83.4%) and l (AUC = 77.6%), the differences are not statistically significant (observed differences of 3.9% and 5.8%, with CI of [\(-55.0\%\), 80.4%] and [\(-68.6\%\), 82.0%], respectively). The observed AUC differences between the models are small and not statistically significant as the \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **ACC** & **P** & **R** & **Sp** & **F1 Score** \\ \hline YOLOv8-nano & 0.840 & 0.829 & 0.971 & 0.533 & 0.892 \\ YOLOv8-small & 0.780 & 0.773 & 0.971 & 0.333 & 0.860 \\ YOLOv8-medium & 0.780 & 0.773 & 0.971 & 0.333 & 0.860 \\ YOLOv8-large & 0.820 & 0.842 & 0.914 & 0.600 & 0.877 \\ YOLOv8-extra-large & 0.840 & 0.829 & 0.971 & 0.533 & 0.892 \\ \hline \hline \end{tabular}
\end{table}