Analyzing human emotions from facial images using machine learning

Document Type : Research Paper

Authors
Department of Computer Engineering, Faculty of Engineering and Technology,Shahid Ashrafi Esfahani University, Isfahan, Iran.
10.22075/ijnaa.2025.37902.5478
Abstract
In recent years, human emotion analysis based on facial images has become one of the most important research areas in the fields of machine vision and human-computer interaction. In this paper, a machine learning-based framework is presented to identify the main emotions (happiness, sadness, anger, surprise, fear, disgust, and indifference) from human facial images. Feature extraction algorithms such as Histogram of Oriented Gradients (HOG) and classification algorithms such as SVM, KNN, and deep neural networks were used. Experimental results on the FER2013 database show that the proposed method has high accuracy in emotion classification. In the field of image processing and machine vision, face analysis, especially in the field of emotion recognition, is a technical and research challenge. Several factors, such as variation in individual facial features, lighting changes, camera position, and image resolution, can affect the accuracy of emotion analysis systems. Also, some emotions naturally have a similar appearance and their separation requires algorithms with high learning power and resolution. A novel hybrid framework is proposed for emotion recognition from facial images, integrating traditional handcrafted features (HOG) with deep learning-based features (CNN). The key contributions of this study are as follows: (1) the introduction of a hybrid feature fusion strategy that leverages the complementary strengths of classical and deep methods, (2) a comparative evaluation of classification algorithms (SVM, KNN, DNN) using the FER2013 dataset, and (3) demonstrable improvements in classification accuracy over baseline models, achieving up to 78% accuracy. This comprehensive approach highlights the effectiveness of combining traditional and modern techniques for robust and real-time emotion recognition. This study shows that combining classical and modern methods can significantly increase the accuracy of emotion recognition.
Keywords

[1] J. Chen, Y. Song, and J. Liu, Facial expression recognition with visual context attention and local‑global feature fusion, Pattern Recogn. Lett. 138 (2020), 276-282.
[2] B. Hasani and M.H. Mahoor, Facial expression recognition using enhanced deep 3D convolutional neural networks, Proc. IEEE Conf. Comput. Vision Pattern Recogn. Workshops, 2017, pp. 30-40.
[3] A.G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam, Mobilenets: Efficient convolutional neural networks for mobile vision applications, arXiv preprint arXiv:1704.04861 (2017).
[4] H. Jiang, H. Zhang, and J. Wu, Robust facial expression recognition using deep fusion of local and global features, Neurocomputing 330 (2019), 186-194.
[5] D. Kollias, A. Schulc, E. Hajiyev, and S. Zafeiriou, Analysing affective behavior in the first ABAW competition, IEEE Int. Conf. Comput. Vision Workshops, 2019, pp. 1-10.
[6] S. Li and W. Deng, Deep facial expression recognition: A survey, IEEE Trans. Affect. Comput. 13 (2020), no. 3, 1195-1215.
[7] A. Mollahosseini, B. Hasani, and M.H. Mahoor, AffectNet: A database for facial expression, valence, and arousal computing in the wild, IEEE Trans. Affect. Comput. 10 (2017), no. 1, 18-31.
[8] M. Tan and Q. Le, Efficientnet: Rethinking model scaling for convolutional neural networks, Int. Conf. Machine Learn., PMLR, 2019, pp. 6105-6114.
[9] K. Zhang, Z. Zhang, and Z. Li, Facial expression recognition via deep learning with attention mechanism, Neurocomputing 333 (2019), 505-518.

Articles in Press, Corrected Proof
Available Online from 15 September 2026

  • Receive Date 28 April 2025
  • Revise Date 16 June 2025
  • Accept Date 19 June 2025