My bachelor thesis consists of an automated system for detecting and analyzing student moods in e-learning environments through facial expression recognition. The research addresses a critical gap in online education: the inability of instructors to gauge student engagement and emotional states in real-time.
Through the use of Action Units (AUs), a facial coding system developed by Paul Ekman, the system identifies subtle facial muscle movements that indicate different emotional states. Unlike traditional emotion recognition systems that focus on basic emotions (happiness, anger, sadness, disgust, fear, neutral), this project specifically targets mood states relevant to learning contexts: engaged, confused, frustrated, bored, drowsy, and looking away.
Developed at Università degli studi di Bari Aldo Moro under the supervision of Prof. Stefano Ferilli and Prof. Berardina De Carolis, the project combines computer vision, machine learning, and real-time processing to create a practical tool for monitoring student engagement during online classes.
This project provided comprehensive experience across multiple domains of artificial intelligence and software engineering. The most significant technical learning came from implementing and comparing five different machine learning algorithms for classification tasks, understanding their strengths, weaknesses, and appropriate use cases.
Working with the Py-Feat library for facial feature extraction taught me about the complexity of facial action coding systems and the computational challenges of real-time video processing. I learned to optimize performance using CUDA acceleration, achieving approximately 100 predictions per minute on GPU-enabled hardware compared to significantly slower CPU-only processing.
Dataset management proved to be one of the most crucial aspects of the project. I learned practical techniques for handling imbalanced datasets through resampling strategies, combining multiple data sources (DAiSEE and Student Engagement datasets), and implementing data cleaning pipelines. The importance of balanced training data became evident when initial models consistently predicted only the majority class.
The project deepened my understanding of evaluation metrics beyond simple accuracy, including precision, recall, balanced accuracy, and k-fold cross-validation. I learned that model selection requires considering multiple factors: performance metrics, computational efficiency, real-time processing requirements, and interpretability.
Integrating the WoMan framework for workflow modeling exposed me to declarative process mining and First-Order Logic representations. Although this approach required significantly more training data than initially anticipated, it provided insights into alternative methodologies for pattern recognition in sequential data.
I also gained experience in building user-facing applications that combine complex backend processing with intuitive interfaces. The real-time mood detection GUI required careful consideration of performance optimization, user feedback mechanisms, and robust error handling.
The thesis represents the end of my bachelor in data science journey, and was a good introduction to the topics I later refined and expanded during my master course.

