A deep-learning emotion recogniser trained on FER2013, with a Streamlit UI for training / evaluation / inference.

👉 Repo: https://github.com/tinfll/Emotion


what

Section 10.3 homework: an FER2013 facial-emotion classifier with a full Streamlit UI (train / pause / resume / stop, live metrics, confusion matrix, ROC, inference), three CNN architectures + a Scikit-Learn baseline, and a "stylized / NPR" path for toon-shaded character art.

  • PyTorch CNNs: SimpleCNN, DeeperCNN, MiniResNet
  • Scikit-Learn logistic-regression baseline
  • Hyperparameters from the sidebar: optimizer, LR, weight decay, activation, dropout, batch size, epochs, augmentation, scheduler
  • Checkpointing: best / last / on-pause / on-stop
  • FER2013 preprocessing: grayscale + 48×48 + normalise + RandomFlip/Affine/Erasing

quick start

bash
pip install -r requirements.txt
python scripts/download_fer2013.py   # ~60 MB
streamlit run app.py                 # http://localhost:8501

Four tabs: Train, Evaluate, Predict, About.

stylised / NPR mode

FER2013 is photographic grayscale faces; cel-shaded renders look very different (flat shading, hard line art). The Predict tab's "Stylized / NPR mode" toggle applies histogram equalisation + a small Gaussian blur before the standard FER2013 transforms, which usually gives sensible readings on toon-shaded characters.

Full write-up, repo layout, and the experimental report → https://github.com/tinfll/Emotion