Facial Expression Recognition Using CNN and SVM
摘要
Facial Expression Recognition (FER) is crucial in applications such as human-computer interaction, medical diagnostics, and social robotics. This study presents an emotion recognition system combining Convolutional Neural Networks (CNNs) and Support Vector Machines (SVMs) for classifying seven emotions (anger, neutral, disgust, fear, happiness, sadness, and surprise) using the CK+, FER13, and a combined CK+ and FER13 dataset. A pre-trained VGG16 model was employed as a feature extractor, followed by an SVM with an RBF kernel for classification. The CK+ dataset demonstrated the highest performance with a validation accuracy of 97.97%, an overall F1 score of 0.98, perfect precision (1.00), recall (1.00) for emotions like fear, happiness, and surprise. In contrast, FER13 showed limitations with a validation accuracy of 42.71%, the lowest precision (0.15) and recall (0.14) for the neutral class, and an overall F1 score of 0.42. The combined dataset improved recognition with a validation accuracy of 84.40%, an F1 score of 0.85, and high precision (0.92) for surprise. These results highlight the robustness of the CK+ dataset while revealing challenges in neutral emotion recognition across datasets which could be improved in future by attention mechanisms, targeted data augmentation, and transfer learning.