A CNN-based classifier that reads a face and predicts its emotional expression in real time, wrapped in a Flask backend built to be dropped into a larger application rather than run as a one-off script.
Dataset and preprocessing
Training data came from Kaggle's face-expression-recognition collection, pulled in via kagglehub. Before anything hit the model, images went through resizing, normalization, and augmentation, with the noisiest, mislabeled-looking samples filtered out — cheap preprocessing decisions that mattered more for final accuracy than most architecture tweaks did.
Model architecture
A convolutional neural network handles both feature extraction and classification in one pipeline, with stacked conv layers learning increasingly abstract facial features before a dense head maps them to expression classes.
Getting to real time
Accuracy on its own wasn't the goal — the model had to run against a live video feed. That constraint shaped the architecture as much as the dataset did: it needed to be light enough to hold 30 FPS with inference consistently under 200ms, which ruled out a lot of the heavier, deeper nets that would have squeezed out a couple more accuracy points at the cost of latency.