Python, OpenCV, Scikit-learn, Flask, NumPy
2025
A facial emotion detection system that recognizes three expressions: angry (marah), sad (sedih), and happy (senang). Faces, eyes, and mouths are located with Haar Cascade classifiers, then 35 features are extracted from eye and mouth regions, texture, edges, histograms, and gradients.
The model is an ensemble of Random Forest and KNN trained on 317 images, reaching 70.31% accuracy, with the best results on the happy class (86% precision, 95% recall).
The model is served through a Flask web app with drag-and-drop upload. It shows the detected keypoints, a confidence score per emotion, and an explanation of why an emotion was predicted.