IMPLEMENTATION OF A LIGHTWEIGHT YOLOV8N-DEEPFACE FRAMEWORK FOR DESKTOP-BASED FACIAL EMOTION RECOGNITION
DOI:
https://doi.org/10.61677/jth.v4i1.888Keywords:
Facial emotion recognition, YOLOv8n, DeepFace, desktop application, computer visionAbstract
Facial Emotion Recognition (FER) is an important computer vision task because facial expressions provide visual cues for identifying human affective states. However, FER remains challenging in real-world conditions due to illumination variation, head pose, occlusion, image quality, and ambiguous facial expressions. This study aims to develop and evaluate a lightweight desktop-based FER application by integrating YOLOv8n as the face detection component and DeepFace as the emotion classification framework. The application was developed using Python, OpenCV, CustomTkinter, Pillow, and multithreading to support image upload and camera-based processing without freezing the graphical interface. The system focuses on four emotion classes, namely happy, sad, neutral, and angry. The proposed workflow consists of image resizing, face detection, facial region extraction, emotion classification, label filtering, and desktop-based output visualization. Evaluation was conducted in two stages: preliminary application testing using ten selected facial expression images and benchmark testing using a balanced FER-2013 subset consisting of 400 images from four target classes. The preliminary evaluation showed that eight out of ten images were classified consistently with human interpretation, producing an initial application accuracy of 80%. The benchmark evaluation achieved an accuracy of 76.4%, with macro-averaged precision of 0.74, macro-averaged recall of 0.73, and macro-averaged F1-score of 0.73. The results indicate that the YOLOv8n–DeepFace framework is feasible for lightweight desktop-based FER implementation, although ambiguous angry and neutral expressions remain difficult to distinguish. This framework is useful for applied computer vision education, prototype development, and preliminary FER deployment studies.
References
Alshammari, A., & Alshammari, M. E. (2024). Emotional Facial Expression Detection Using YOLOv8. Engineering, Technology & Applied Science Research, 14(5), 16619–16623. https://doi.org/10.48084/etasr.8433
Goodfellow, I. J., Erhan, D., Carrier, P. L., Courville, A., Mirza, M., Hamner, B., Cukierski, W., Tang, Y., Thaler, D., Lee, D.-H., Zhou, Y., Ramaiah, C., Feng, F., Li, R., Wang, X., Athanasakis, D., Shawe-Taylor, J., Milakov, M., Park, J., … Bengio, Y. (2015). Challenges in Representation Learning: A Report on Three Machine Learning Contests. Neural Networks, 64, 59–63. https://doi.org/10.1016/j.neunet.2014.09.005
Li, S., & Deng, W. (2020). Deep Facial Expression Recognition: A Survey. IEEE Transactions on Affective Computing, 13(3), 1195–1215. https://doi.org/10.1109/TAFFC.2020.2981446
Lucey, P., Cohn, J. F., Kanade, T., Saragih, J., Ambadar, Z., & Matthews, I. (2010). The Extended Cohn-Kanade Dataset ({CK+}): A Complete Dataset for Action Unit and Emotion-Specified Expression. IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, 94–101. https://doi.org/10.1109/CVPRW.2010.5543262
Mollahosseini, A., Hasani, B., & Mahoor, M. H. (2019). AffectNet: A Database for Facial Expression, Valence, and Arousal Computing in the Wild. IEEE Transactions on Affective Computing, 10(1), 18–31. https://doi.org/10.1109/TAFFC.2017.2740923
Pham, T. D., Nguyen, H. T., & Tran, T. T. (2023). {CNN}-Based Facial Expression Recognition with Simultaneous Consideration of Model Accuracy and Computational Cost. Sensors, 23(24), 9658. https://doi.org/10.3390/s23249658
Serengil, S. I., & Ozpinar, A. (2021). HyperExtended LightFace: A Facial Attribute Analysis Framework. 2021 International Conference on Engineering and Emerging Technologies (ICEET), 1–4. https://doi.org/10.1109/ICEET53442.2021.9659697
Sun, W., Zhao, H., & Jin, Z. (2018). A Visual Attention Based {ROI} Detection Method for Facial Expression Recognition. Neurocomputing, 296, 12–22. https://doi.org/10.1016/j.neucom.2018.03.034
Terven, J., & Cordova-Esparza, D. M. (2023). A Comprehensive Review of {YOLO} Architectures in Computer Vision: From {YOLOv1} to {YOLOv8} and {YOLO-NAS}. Machine Learning and Knowledge Extraction, 5(4), 1680–1716. https://doi.org/10.3390/make5040083
Tutuianu, G. I., Liu, Y., Alamaki, A., & Kauttonen, J. (2024). Benchmarking Deep Facial Expression Recognition: An Extensive Protocol with Balanced Dataset in the Wild. Engineering Applications of Artificial Intelligence, 136, 108983. https://doi.org/10.1016/j.engappai.2024.108983
Venkatesan, R., Shirly, S., Selvarathi, M., & Jebaseeli, T. J. (2023). Human Emotion Detection Using DeepFace and Artificial Intelligence. Engineering Proceedings, 59(1), 37. https://doi.org/10.3390/engproc2023059037
Wang, K., Peng, X., Yang, J., Meng, D., & Qiao, Y. (2020). Region Attention Networks for Pose and Occlusion Robust Facial Expression Recognition. IEEE Transactions on Image Processing, 29, 4057–4069. https://doi.org/10.1109/TIP.2019.2956143
Wang, Y., Song, W., Tao, W., Liotta, A., Yang, D., Li, X., Gao, S., Sun, Y., Ge, W., Zhang, W., & Zhang, W. (2022). A Systematic Review on Affective Computing: Emotion Models, Databases, and Recent Advances. Information Fusion, 83-84, 19–52. https://doi.org/10.1016/j.inffus.2022.03.009
Yan, J., Zheng, W., Cui, Z., & Song, P. (2018). A Joint Convolutional Bidirectional {LSTM} Framework for Facial Expression Recognition. IEICE Transactions on Information and Systems, E101.D(4), 1217–1220. https://doi.org/10.1587/transinf.2017EDL8208
Zhang, K., Huang, Y., Du, Y., & Wang, L. (2017). Facial Expression Recognition Based on Deep Evolutional Spatial-Temporal Networks. IEEE Transactions on Image Processing, 26(9), 4193–4203. https://doi.org/10.1109/TIP.2017.2689999
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 JTH: Journal of Technology and Health

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.




