Concordia University · COMP 472 · Artificial Intelligence

Click a face.
Read the emotion.

A convolutional neural network that classifies facial emotions in real time. Click any photo below to run the model.

Loading samples...
Sample faces
Or upload your own Results may vary for photos outside the training dataset
Detected emotion
Confidence breakdown
About this project

What it is

Built for COMP 472 at Concordia University. The goal was to design, train, and evaluate a convolutional neural network for facial emotion recognition from scratch, with no pretrained weights and no transfer learning. The model classifies faces into four categories: Angry, Engaged, Happy, and Neutral.

How it was trained

The CNN was trained on the FER2013 benchmark dataset with over 35,000 grayscale 48x48 facial images. The architecture uses three convolutional blocks with BatchNorm and LeakyReLU activations, followed by fully connected layers with dropout. Three variants were evaluated; this one performed best on validation.

How it is deployed

The trained PyTorch model was exported to ONNX format for serving. This cuts the runtime footprint from around 500MB to 50MB without changing model behaviour. The backend runs on Flask via Render and this frontend is hosted on Netlify.

Why the samples

The model performs most reliably on images from the FER2013 distribution it was trained on. The sample grid pulls directly from that dataset. You can still upload your own photo, but results will naturally be less consistent for real-world images.