# Attention-Guided Network Model for Image-Based Emotion Recognition
## 3 Results
### Model Performance  
Figure 7 shows that the attention-integrated models significantly outperformed the base model. The neutral class showed the weakest performance in the attention-guided networks with a mean of 58.32%, 57.95%, and 58.53% for each of the AGFER, SEFFR, and CBAMFER models, respectively, while the remaining emotion classes had greater than 90% classification accuracy. The proposed AGFER model had a mean accuracy of 89.19% \(\pm\) 0.75, matching the performance of the SEFER and CBAMFER models with 88.73% \(\pm\) 0.91 and 89.77% \(\pm\) 0.70, respectively. The base model's low performance was recorded with a mean of 19.76% \(\pm\) 2.49 over all emotion classes and the five segments.  
To assess the ability to generalize, the trained models were tested against the independent FACES dataset. Table 2 shows the results separated according to the different age groups present. The model integrated with the proposed AGFER attention block performed the best out of the different trained models, achieving a mean classification of 46.50% \(\pm\) 1.39. The AGFER model outperformed the others with increases of 27.97%, 6.02%, and 1.19% compared to the base, SEFER, and CBAMFER models, respectively. The young age group had the highest mean classification accuracy across each of the models, except for the base case. It is important to note that the models were entirely naive to the FACES dataset.  
In Figures 8 and 9, the confusion matrices for the AGFER (a) and CBAMFER (b) models are depicted for the OULU-CASIA validation and FACES dataset over all five segments combined (summed). The matrix reveals the struggle of the models to classify the neutral class, where a strong misclassification of the fear class in the OULU-CASIA validation set was observed. For the confusion matrix of the FACES datasets, the models were misclassifying fear as surprise.  
\begin{table}
\begin{tabular}{l c c c c} \hline
**Emotion** & \multicolumn{2}{c}{**OULU-CASIA**} & \multicolumn{2}{c}{**FACES**} \\ \hline  & **Original** & \
\begin{tabular}{c} **After Image** \\ **Pre-Processing** \\ \end{tabular} & **Original** &
\begin{tabular}{c} **After Image** \\ **Pre-Processing** \\ \end{tabular} \\ \hline Anger & 1790 & 1315 & 342 & 292 \\ Disgust & 1633 & 1195 & 342 & 292 \\ Fear & 1796 & 1503 & 342 & 303 \\ Happiness & 1668 & 1502 & 342 & 338 \\ Neutral & N/A & 1219 & 342 & 330 \\ Sadness & 1668 & 1200 & 342 & 317 \\ Surprise & 1701 & 1365 & N/A & N/A \\ Total & 10,379 & 9299 & 2052 & 1872 \\ \hline \end{tabular}
\end{table}
Table 1: Class distribution of both OULU-CASIA and FACES datasets before and after Image Pre-Processing.  
Figure 8: Confusion matrix results from the five segments for the OULU-CASIA validation set on the (**a**) AGFER model and (**b**) CBAMFER model. Blank boxes are equivalent to 0 or no predictions.  
\begin{table}
\begin{tabular}{l c c c c} \hline
**Age Group** & **AGFER** & **Base** & **SEFER** & **CBAMFER** \\ \hline Young & **49.60 \(\pm\) 0.95** & 17.35 \(\pm\) 0.45 & 43.95 \(\pm\) 8.89 & 48.81 \(\pm\) 3.36 \\ Middle-aged & **48.50 \(\pm\) 1.30** & 18.07 \(\pm\) 0.43 & 41.80 \(\pm\) 7.57 & 46.57 \(\pm\) 4.71 \\ Old & **41.40 \(\pm\) 1.92** & 20.17 \(\pm\) 0.50 & 35.70 \(\pm\) 4.66 & 40.56 \(\pm\) 6.92 \\ Mean & **46.50 \(\pm\) 1.39** & 18.53 \(\pm\) 0.46 & 40.48 \(\pm\) 7.04 & 45.31 \(\pm\) 5.00 \\ \hline \end{tabular}
\end{table}
Table 2: Mean classification accuracy (%) with the FACES dataset for all emotions across each segment for each model. Values in bold represent the best performance of the stride dimension.  
Figure 7: Mean classification accuracy for each emotion and the mean of all emotion classes of the OULU-CASIA validation dataset over the five segments for each model. The error bars represent the standard deviation over the five segments.