# Intelligent Healthcare Platform for Diagnosis of Scalp and Hair Disorders
## 3 Results
### Prediction of Scalp Lesion Using XAI  
We compared attention maps derived from the trained ViT-B/16 model and Grad-CAM maps derived from the trained EfficientNet-B6 model (Figure 5). Among the two tested CNN models, the EfficientNet-B6 model was selected instead of ResNet-152 for the comparison because the overall classification performance of the EfficientNet-B6 model was better (Figure 3). These XAI techniques can visualize which areas in the image are important when deep learning models predict the severity level of each scalp and hair disorder.  
Figure 5a shows a scalp image having multiple scalp and hair disorders: oiliness (severity level: 2), folliculitis (severity level: 3), and dandruff (severity level: 2). Class-discriminated localization heatmaps were derived using the EfficientNet-B6 model with Grad-CAM (Figure 5b-d) and the ViT-B/16 model with attention rollout technique (Figure 5e-g). The emphasized areas were different depending on the scalp hair disorders and XAI techniques. To classify the severity level of oiliness, both EfficientNet-B6 and ViT-B/16 models focused on shiny surface regions induced by excessive oil and greasy sebum (Figure 5b,e). To categorize the severity level of folliculitis, the EfficientNet-B6 model failed to localize the region (Figure 5c) while the ViT-B/16 model successfully highlighted  
Figure 5: Comparison of XAI visualization techniques. (**a**) Original scalp image with multiple scalp disorders. Class-discriminative localization heatmaps were derived using (**b–d**) trained EfficientNet-B6 model with Grad-CAM and (**e–g**) trained ViT-B/16 with attention rollout. The degree of importance was described from blue to red.  
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Model** & **Disorder** & **Accuracy (\%)** & **Precision (\%)** & **Recall (\%)** & **F1-Score (\%)** \\ \hline \multirow{8}{*}{ViT-B/16} & Dryness & 77.66 & 76.98 & 76.88 & 76.93 \\ \cline{2-6}  & Oliness & 69.07 & 69.67 & 70.62 & 70.14 \\ \cline{2-6}  & Erythema & 81.38 & 81.47 & 81.69 & 81.58 \\ \cline{2-6}  & Folliculitis & 82.32 & 82.28 & 82.63 & 82.46 \\ \cline{2-6}  & Dandruff & 77.09 & 79.34 & 79.25 & 79.29 \\ \cline{2-6}  & Hair loss & 82.34 & 83.06 & 83.04 & 83.05 \\ \cline{2-6} CNN with attention blocks [1] & Dandruff & 85.03 & N/A & N/A & N/A \\ \cline{2-6} YOLOv4 [21] & & 75.73 & 80.75 & 80.22 & 80.48 \\ \cline{2-6} Mask R-CNN [10] & & 79.29 & 80.62 & 78.85 & 79.73 \\ \cline{2-6} Triple ensemble model [22] & & 95.75 & N/A & N/A & 87.05 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Severity classification results of each scalp hair disorder by the trained ViT-B/16 model and other deep learning models.  
pustules and high inflammatory regions around hair pores (Figure 5f). To predict the severity level of dandruff, the EfficientNet-B6 model partially focused on the dandruff region (Figure 5d) whereas the ViT-B/16 model focused on the dandruff region where there was white keratin on the scalp. Overall, attention maps derived from the ViT-B/16 model with the attention rollout method were more similar to human intuition and a better localized relevant image region according to each disorder, compared to Grad-CAM maps with EfficientNet-B6. Accordingly, six ViT-B16 models trained by each scalp hair disorder and attention rollout technique were used to develop the 'Scalp checker' software.