## 4 Experiment Results
### Experimental Results  
As shown in Table 7; the original InceptionV4; EfficientNet and ViT models achieved accuracies of 95.31%, 96.59% and 91.17%, respectively; on the validation data. The InceptionV4 model with the DHS structure achieved an accuracy of 96.70%, demonstrating that the DHS improved validation performance. Furthermore, the InceptionV4 model with a defect-adaptive hierarchical structure and a customized loss function achieved a high accuracy of 97.39%, as indicated by the bold value in the table. This suggests that the customized loss function, which provides appropriate weights for the DHS, contributed to further improvements in the model's performance. Considering the hyperparameters and training times, the original InceptionV4 model had 82,304,076 hyperparameters and required 45 s of training time per epoch. The original EfficientNet model contained 169,226,088 hyperparameters and required 342 s per epoch for training. The InceptionV4 model with DHS had 160,830,540 hyperparameters and required 73 s per epoch. The model that included both DHS and the customized loss function retained the same number of hyperparameters and training time. In Table 7, a particularly noteworthy point is that the training time for EfficientNet is considerably longer, at 342 s per epoch, compared to other models. This implies that using larger datasets could significantly extend the overall training time, impacting the practical system implementation. On the other hand, the DHS-CNN model and its balanced weights variant maintain high accuracy while keeping training times relatively low. Specifically, the DHS-CNN with balanced weights model shows a high accuracy of 97.39% and a training time of 73 s per epoch, demonstrating an excellent balance between efficiency and performance. Therefore, when planning to apply a model to large datasets, it is crucial to select a model considering the optimal balance between training time and accuracy. Particularly, the DHS-CNN with balanced weights model, which offers high accuracy and a relatively low training time, could be a good candidate. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Models** & **Batch Size** & **Epoch** & **Loss Function** & **Optimizer** & **Learning Rate** \\ \hline InceptionV4 & 16 & 200 & & [PERSON] & 0.0005 \\ \hline EfficientNet & 16 & 200 & & [PERSON] & 0.0005 \\ \hline ViT & 16 & 200 & & & [PERSON] & 0.0005 \\ \hline DHS-CNN & 16 & 200 & & [PERSON] & 0.0005 \\ \hline DHS-CNN with balanced weights & 16 & 200 & & [PERSON] & 0.0005 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Experiment scenario. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Models** & \
\begin{tabular}{c} **Accuracy** \\ **(Validation)** \\ \end{tabular} & **Hyperparameters** &
\begin{tabular}{c} **Training Time** \\ **(Seconds/Epoch)** \\ \end{tabular} \\ \hline InceptionV4 & 95.31\% & 82,304,076 & 45 \\ EfficientNet & 96.59\% & 169,226,088 & 342 \\ ViT & 91.17\% & 177,495,564 & 57 \\ DHS-CNN & 96.70\% & 160,830,540 & 73 \\ DHS-CNN with balanced weights & **97.39\%** & 160,830,540 & 73 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Experiment results in training. As shown in Table 8, when comparing the performance metrics, both the InceptionV4 model with a defect-adaptive hierarchical structure and the one with a customized loss function outperform the original InceptionV4 and EfficientNet models. The numbers highlighted in bold represent the highest values in each metric. In terms of precision, the InceptionV4 model with the defect-adaptive hierarchical structure achieved the highest value (0.88614), and the model with the customized loss function also recorded a very high value (0.88038). This indicates that the positive predictions made by both models were highly accurate. The InceptionV4 model with a customized loss function applied to the defect-adaptive hierarchical structure achieved the highest recall (0.71318), indicating that the model correctly identified a substantial proportion of actual positive cases.