Real-Time Facial Expression Detection Using YOLOv12
Abstract
This research focuses on the development of a real-time facial expression detection system using YOLOv12. The study utilizes a secondary dataset from Kaggle, consisting of 1000 images categorized into two classes: "Happy" and "Not Happy." The dataset undergoes preprocessing steps, including Gabor filter bank for key facial feature identification and geometric augmentation to enhance data quality. The YOLOv12 model is trained with 100 epochs, a batch size of 4, and the AdamW optimizer, achieving a mean Average Precision (mAP@0.5) of 0.89 for both expression classes. The system demonstrates real-time performance with an average processing speed of 15 FPS on CPU-based devices, adapting well to varying lighting conditions and angles, though accuracy decreases by 5-7% in low-light environments. The results highlight the model's potential applications in mental health, human-computer interaction, and security. Limitations include the restricted dataset and challenges with micro-expressions. Future work suggests expanding the dataset to include more expression classes and integrating post-processing models to reduce false positives.