Experimental Modeling of Face Emotion Recognition Using Machine Learning Classification (SVM, KNN, Random Forest) and Deep Learning CNN
DOI:
https://doi.org/10.34148/teknika.v14i2.1232Keywords:
Facial Emotion Recognition, Machine Learning, Mental Health, Facial Expressions, Deep LearningAbstract
Facial Emotion Recognition (FER) is a technology that analyzes facial expressions to detect emotions, playing a growing role in psychology and Human-Computer Interaction. In Indonesia, mental health issues are rising, with emotional disorders increasing from 6.0% in 2013 to 9.8% in 2018. Over 19 million people aged 15+ were affected in 2018, a number likely worsened by the COVID-19 pandemic. Given the urgency of early detection, FER offers a non-invasive method to help identify mental health issues. It can support timely intervention and promote psychological well-being, especially in under-resourced settings. This study compares several Machine Learning (ML) and Deep Learning (DL) models—SVM, K-Nearest Neighbor, Random Forest, and Convolutional Neural Networks (CNN)—to classify facial emotions. The dataset used is the Facial Expression Recognition dataset by Jonathan Oheix from Kaggle. Images were preprocessed and used to train and evaluate each model. Traditional ML models relied on extracted features, while CNN learned features directly from images. Results show that CNN achieved the highest accuracy among the tested models. This suggests that FER, especially with CNN, can be a useful tool for early detection of emotional disorders in mental health contexts.
Downloads
References
[1] Y. Miao, H. Dong, J. Aljaam, and A. El Saddik, “A Deep Learning System for Recognizing Facial Expression in Real-Time,” ACM Transactions on Multimedia Computing, Communications, and Applications, vol. 15, pp. 1–20, May 2019, doi: 10.1145/3311747.
[2] N. Andalibi and J. Buss, “The Human in Emotion Recognition on Social Media: Attitudes, Outcomes, Risks,” in Conference on Human Factors in Computing Systems - Proceedings, Association for Computing Machinery, Apr. 2020. doi: 10.1145/3313831.3376680.
[3] B. Deepa and K. Ramesh, “Epileptic seizure detection using deep learning through min max scaler normalization,” Int J Health Sci (Qassim), pp. 10981–10996, May 2022, doi: 10.53730/ijhs.v6ns1.7801.
[4] A. A. Soebroto, “Buku Ajar AI, Machine Learning & Deep Learning,” 2019. [Online]. Available: https://www.researchgate.net/publication/348003841
[5] D. Sri Rahayu, J. Afifah, and S. Intan, “Classification of Diabetes Mellitus Using C4.5 Algorithm, Support Vector Machine (SVM) and Linear Regression Klasifikasi Penyakit Diabetes Melitus Menggunakan Algoritma C4.5, Support Vector Machine (SVM) dan Regresi Linear,” SENTIMAS: Seminar Nasional Penelitian dan Pengabdian Masyarakat, Aug. 2023. [Online]. Available: https://journal.irpi.or.id/index.php/sentimas
[6] H. Jurnal, R. Alfiatul Karima, and Z. Fatah, “Implementasi Metode K-Nearest Neighbor Untuk Klasifikasi Penyakit Paru-Paru Pada Anak,” Jurnal Ilmiah Multidisiplin Ilmu, Dec. 2024, doi: 10.69714/yx4smf68.
[7] D. Syaripudin, A. Walad, and F. Kesehatan dan Teknik, “Teknik Resampling Untuk Meningkatkan Nilai Akurasi Algoritma Random Forest Pada Data Prediksi Kecacatan Perangkat Lunak Resampling Technique To Increase The Accuracy Value Of Random Forest Algorithm On Software Defect Prediction Data,” JICN: Jurnal Intelek dan Cendikiawan Nusantara, vol. 1, no. 3, 2024, [Online]. Available: https://jicnusantara.com/index.php/jicn
[8] S. Maesaroh et al., Bahasa Pemrograman Python. 2024.
[9] D. V. Fakhriyani, Kesehatan Mental.
[10] Badan Penelitian dan Pengembangan Kesehatan, “Laporan Nasional Riskesdas 2018,” Jakarta, Jun. 2020. Accessed: Apr. 02, 2025. [Online]. Available: https://repository.badankebijakan.kemkes.go.id/id/eprint/3514/
[11] Khamelia and Karina Terry, “Masalah Psikologis 2 Tahun Pandemi COVID-19 di Indonesia,” Perhimpunan Dokter Spesialis Kedokteran Jiwa Indonesia. Accessed: Apr. 02, 2025. [Online]. Available: https://www.pdskji.org/home
[12] Y. Khaireddin and Z. Chen, “Facial Emotion Recognition: State of the Art Performance on FER2013,” May 2021.
[13] G. Simcock et al., “Associations between facial emotion recognition and mental health in early adolescence,” Int J Environ Res Public Health, vol. 17, no. 1, Jan. 2020, doi: 10.3390/ijerph17010330.
[14] M. A. Hasnul, N. A. A. Aziz, S. Alelyani, M. Mohana, and A. A. Aziz, “Electrocardiogram‐based emotion recognition systems and their applications in healthcare—a review,” Aug. 01, 2021, MDPI AG. doi: 10.3390/s21155015.
[15] Python, “Pickle - Python Object Serialization,” Python. Accessed: Jan. 05, 2025. [Online]. Available: https://docs.python.org/3/library/pickle.html.
[16] Gde Agung Brahmana Suryanegara, Adiwijaya, and Mahendra Dwifebri Purbolaksono, “Peningkatan Hasil Klasifikasi pada Algoritma Random Forest untuk Deteksi Pasien Penderita Diabetes Menggunakan Metode Normalisasi,” Jurnal RESTI (Rekayasa Sistem dan Teknologi Informasi), vol. 5, no. 1, pp. 114–122, Feb. 2021, doi: 10.29207/resti.v5i1.2880.
[17] Scikit-Learn, “LabelEncoder,” Scikit-Learn. Accessed: Dec. 31, 2024. [Online]. Available: https://scikit-learn.org/1.5/modules/generated/sklearn.preprocessing.LabelEncoder.html.
[18] Scikit-Learn, “PCA,” Scikit-Learn. Accessed: Dec. 31, 2024. [Online]. Available: https://scikit-learn.org/1.5/modules/generated/sklearn.decomposition.PCA.html.
[19] F. Aldi, F. Hadi, N. A. Rahmi, and S. Defit, “Standardscaler’s Potential in Enhancing Breast Cancer Accuracy Using Machine Learning,” Aug. 2023.
[20] Scikit-Learn, “Test Train Split,” Scikit-Learn. Accessed: Dec. 31, 2024. [Online]. Available: https://scikit-learn.org/1.5/modules/generated/sklearn.model_selection.train_test_split.html#sklearn.model_selection.train_test_split.
[21] Scikit-Learn, “Grid Search,” Scikit-Learn. Accessed: Dec. 31, 2024. [Online]. Available: https://scikit-learn.org/1.5/modules/generated/sklearn.model_selection.GridSearchCV.html.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 Teknika

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















