Convolutional Neural Network Model for Accurate Emotion Detection in Facial Images
Main Article Content
Abstract
The objective of this work is to develop a lightweight convolutional neural network (CNN) architecture for facial emotion recognition using the FER2013 dataset. The model consisted of four convolutional blocks with an increasing number of filters, followed by fully connected layers for multi-class classification. Since the FER2013 dataset comprised grayscale facial images, no additional color transformations were required. Preprocessing was limited to pixel value normalization and data augmentation techniques—consistent with common practices in modern CNN models—aimed at improving the model's generalization capability. The proposed architecture achieved an accuracy of 67.49% and a macro F1-score of 65.64%, demonstrating competitive performance compared to previous approaches based on convolutional networks. A real-time facial emotion detection system was implemented using computer vision, enabling the automatic identification of emotions from camera-captured images. The project—including source code, execution instructions, and support for Windows and Linux—was made publicly available on GitHub, fostering reproducibility and the practical implementation of the model.
Article Details

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
When an author creates an article and publishes it in a journal, the copyright passes to the journal as part of the publishing agreement. Therefore, the journal becomes the owner of the rights to reproduce, distribute and sell the article. The author retains some rights, such as the right to be recognized as the creator of the article and the right to use the article for his or her own scholarly or research purposes, unless otherwise agreed in the publication agreement.
How to Cite
References
Z. Zeng, M. Pantic, G. I. Roisman, and T. S. Huang, “A survey of affect recognition methods: Audio, visual, and spontaneous expressions,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 31, no. 1, pp. 39–58, 2009, doi: 10.1109/TPAMI.2008.52.
S. Koelstra et al., “DEAP: A database for emotion analysis; Using physiological signals,” IEEE Trans. Affect. Comput., vol. 3, no. 1, pp. 18–31, Jan. 2012, doi: 10.1109/T-AFFC.2011.15.
S. Li and W. Deng, “Deep Facial Expression Recognition: A Survey,” IEEE Trans. Affect. Comput., vol. 13, no. 3, pp. 1195–1215, 2022, doi: 10.1109/TAFFC.2020.2981446.
C. A. Corneanu, M. O. Simón, J. F. Cohn, and S. E. Guerrero, “Survey on RGB, 3D, Thermal, and Multimodal Approaches for Facial Expression Recognition: History, Trends, and Affect-related Applications,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 38, no. 8, p. 1548, Aug. 2016, doi: 10.1109/TPAMI.2016.2515606.
B. du Boulay, “Artificial Intelligence in Education and Ethics,” Handb. Open, Distance Digit. Educ., pp. 93–108, Jan. 2023, doi: 10.1007/978-981-19-2080-6_6.
B. Chul and K. Id, “A Brief Review of Facial Emotion Recognition Based on Visual Information,” Sensors 2018, Vol. 18, Page 401, vol. 18, no. 2, p. 401, Jan. 2018, doi: 10.3390/S18020401.
P. Lucey, J. F. Cohn, T. Kanade, J. Saragih, Z. Ambadar, and I. Matthews, “The extended Cohn-Kanade dataset (CK+): A complete dataset for action unit and emotion-specified expression,” 2010 IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit. - Work. CVPRW 2010, pp. 94–101, 2010, doi: 10.1109/CVPRW.2010.5543262.
K. Zhang, Z. Zhang, Z. Li, and Y. Qiao, “Joint Face Detection and Alignment Using Multitask Cascaded Convolutional Networks,” IEEE Signal Process. Lett., vol. 23, no. 10, pp. 1499–1503, Oct. 2016, doi: 10.1109/LSP.2016.2603342.
R. Ranjan, C. D. Castillo, and R. Chellappa, “L2-constrained Softmax Loss for Discriminative Face Verification,” Jun. 2017, Accessed: Jul. 23, 2025. [Online]. Available: http://arxiv.org/abs/1703.09507
M. Arul Vinayakam Rajasimman, R. K. Manoharan, N. Subramani, M. Aridoss, and M. G. Galety, “Robust Facial Expression Recognition Using an Evolutionary Algorithm with a Deep Learning Model,” Appl. Sci. 2023, Vol. 13, Page 468, vol. 13, no. 1, p. 468, Dec. 2022, doi: 10.3390/APP13010468.
I. J. Goodfellow et al., “Challenges in representation learning: A report on three machine learning contests,” Lect. Notes Comput. Sci. (including Subser. Lect. Notes Artif. Intell. Lect. Notes Bioinformatics), vol. 8228 LNCS, no. PART 3, pp. 117–124, 2013, doi: 10.1007/978-3-642-42051-1_16.
L. Zahara, P. Musa, E. Prasetyo Wibowo, I. Karim, and S. Bahri Musa, “The Facial Emotion Recognition (FER-2013) Dataset for Prediction System of Micro-Expressions Face Using the Convolutional Neural Network (CNN) Algorithm based Raspberry Pi,” 2020 5th Int. Conf. Informatics Comput. ICIC 2020, Nov. 2020, doi: 10.1109/ICIC50835.2020.9288560.
B. Hasani and M. H. Mahoor, “Facial Expression Recognition Using Enhanced Deep 3D Convolutional Neural Networks,” IEEE Comput. Soc. Conf. Comput. Vis. Pattern Recognit. Work., vol. 2017-July, pp. 2278–2288, Aug. 2017, doi: 10.1109/CVPRW.2017.282.
A. M. Pascual et al., “Light-FER: A Lightweight Facial Emotion Recognition System on Edge Devices,” Sensors 2022, Vol. 22, Page 9524, vol. 22, no. 23, p. 9524, Dec. 2022, doi: 10.3390/S22239524.
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., vol. 10, no. 1, pp. 18–31, Jan. 2019, doi: 10.1109/TAFFC.2017.2740923.
K. Simonyan and A. Zisserman, “Very Deep Convolutional Networks for Large-Scale Image Recognition,” 3rd Int. Conf. Learn. Represent. ICLR 2015 - Conf. Track Proc., Sep. 2014, Accessed: Jul. 23, 2025. [Online]. Available: https://arxiv.org/pdf/1409.1556
Y. Tang, “Deep Learning using Linear Support Vector Machines,” Jun. 2013, Accessed: Jul. 23, 2025. [Online]. Available: https://arxiv.org/pdf/1306.0239
R. Pecoraro, V. Basile, and V. Bono, “Local Multi-Head Channel Self-Attention for Facial Expression Recognition,” Inf., vol. 13, no. 9, Nov. 2021, doi: 10.3390/info13090419.
H. Li, M. Sui, F. Zhao, Z. Zha, and F. Wu, “MVT: Mask Vision Transformer for Facial Expression Recognition in the wild,” Jun. 2021, Accessed: Jul. 23, 2025. [Online]. Available: http://arxiv.org/abs/2106.04520
W. Niu, K. Zhang, D. Li, and W. Luo, “Four-player GroupGAN for weak expression recognition via latent expression magnification,” Knowledge-Based Syst., vol. 251, p. 109304, Sep. 2022, doi: 10.1016/J.KNOSYS.2022.109304.
C. Wang, J. Zeng, S. Shan, and X. Chen, “Multi-Task Learning of Emotion Recognition and Facial Action Unit Detection with Adaptively Weights Sharing Network,” Proc. - Int. Conf. Image Process. ICIP, vol. 2019-September, pp. 56–60, Sep. 2019, doi: 10.1109/ICIP.2019.8802914.
S. Bhattacharya, H. Li, J. Xia, and W. Xu, “SimPPG: Self-supervised photoplethysmography-based heart-rate estimation via similarity-enhanced instance discrimination,” Smart Heal., vol. 28, p. 100396, Jun. 2023, doi: 10.1016/J.SMHL.2023.100396.
D. Revelo Luna, Face_Emotion. GitHub repository. [Online]. Available: https://github.com/DavidReveloLuna/Face_Emotion. Accessed: Jul. 23, 2025.
R. Zhang, “Making Convolutional Networks Shift-Invariant Again,” in Proc. 36th Int. Conf. Mach. Learn. (ICML), vol. 97, pp. 7324–7334, 2019.