# Dhad--A Children's Handwritten Arabic Characters Dataset for Automated Recognition
## 7 Results
### Experiment One--Pre-Trained CNN Models
Figures 6 and 7 present the confusion matrices for the trained models on the Dhad and Hijja datasets, respectively. These matrices serve as pivotal tools for gauging the models' class-specific performances and identifying potential areas of misclassification. \begin{table}
\begin{tabular}{l c c c c c} \hline \hline  & **Training Loss** & **Training Accuracy** & **Validation Loss** & **Validation Accuracy** \\ \hline \multicolumn{5}{c}{Dhad Dataset} \\ \hline MobileNet & 0.0691 & 0.9796 & 0.2278 & 0.9396 \\ DenseNet121 & 0.0941 & 0.9717 & 0.2357 & 0.9342 \\ ResNet50 & 0.0371 & 0.9908 & 0.2810 & 0.9289 \\ \hline \multicolumn{5}{c}{Hijja Dataset} \\ \hline MobileNet & 0.1035 & 0.9722 & 0.4466 & 0.8774 \\ DenseNet121 & 0.1154 & 0.9680 & 0.4359 & 0.8920 \\ ResNet50 & 0.0674 & 0.9838 & 0.5419 & 0.8789 \\ \hline \end{tabular}
\end{table} 
Table 2: Training performance of pre-trained models on Dhad and Hijja datasets. Figure 5: Training accuracy and loss curves for pre-trained models on Hijja dataset. Figure 6: _Cont._  
In the context of the Dhad dataset, a detailed examination reveals MobileNet's commendable class-wise equilibrium, characterized by minimal misclassifications across various categories. Notably, there's a discernible pattern of misclassification, where 12% of the \"yaa\" samples are erroneously categorized as \"t\"aa\" and 10% of the \"hamzah\" samples are mislabeled as \"ayen\". Such misclassifications likely stem from the intricate visual similarities inherent to these characters, underscoring the inherent challenges of handwritten character recognition tasks. Turning our attention to the Hijja dataset, DenseNet121 emerges as the model with the most consistent overall performance. However, a deeper dive into the confusion matrix reveals a higher incidence of misclassifications. Two salient observations include the misclassification of 10% of \"lam\" samples as \"ayen\" and 7% of \"hamzah\" instances being inaccurately labeled as \"waw\". Such misclassifications further emphasize the intricacies and challenges posed by handwritten Arabic character recognition, necessitating continuous refinement and optimization strategies for enhanced accuracy. Figure 8 provides an insightful glimpse into the inner workings of the trained models through layer visualizations, shedding light on their training efficacy and decision-making processes. The two visualization techniques employed, Grad-CAM and SmoothGrad, serve distinct purposes in elucidating model behaviour. While Grad-CAM accentuates the pivotal regions within images that significantly influenced predictions, SmoothGrad offers a more granular perspective by pinpointing the specific pixels most instrumental in the decision-making process. Figure 6: Confusion matrix for pre-trained models on Dhad dataset. (**a**) ResNet50, (**b**) MobileNet, and (**c**) DenseNet121. Figure 7: _Cont._  
Figure 8: Layer visualizations for DenseNet121 model on Dhad dataset samples. Figure 7: Confusion matrix for pre-trained models on Hijja dataset. (**a**) ResNet50, (**b**) MobileNet, (**c**) DenseNet121. Upon meticulous examination of the visualizations, certain patterns and discrepancies come to the fore. Notably, for characters such as \"faa\" and \"jeem\", the models appear adept at capturing and leveraging the character-relevant pixels, indicative of robust training and feature extraction capabilities. However, a discernible shortfall becomes evident in the case of the \"yaa\" character. Here, the model seemingly overlooks or inadequately emphasizes crucial pixels during the prediction phase, suggesting potential areas for model refinement or additional training data augmentation to enhance accuracy and consistency. Figures 9 and 10 present the AUC curves, offering a comprehensive overview of the discriminatory power and overall performance of the pre-trained models on the Dhad and Hijja datasets, respectively. AUC serves as a robust metric, encapsulating the model's ability to distinguish between different classes.