totes-emosh / README.md
drdeception
feat: six-emotion replication challenge — totes-emosh EmotionMap build
0d27c43
|
Raw
History Blame Contribute Delete
2.89 kB

A newer version of the Gradio SDK is available: 6.19.0

Upgrade
metadata
title: Totes Emosh
emoji: 
colorFrom: yellow
colorTo: indigo
sdk: gradio
sdk_version: 6.15.2
app_file: app.py
pinned: false
short_description: Pose six basic emotions. See what the classifier reads.

totes-emosh

LittleMonkeyLab toy app for facial-expression recognition. A six-emotion replication challenge: pose each of the six basic emotions (happy, sad, fear, disgust, anger, surprise), the classifier reads each attempt, and you leave with a single-page EmotionMap PDF.

What this does

Companion app to Week 3 Part 4 of the Goldsmiths MSc in Psychology — Emotion in Action. Built around a single-person replication of Porter and ten Brinke (2008): can you fake an emotional expression on demand, and how well does a state-of-the-art classifier read each attempt? Two output formats: Face (your face crops) and Wireframe (anonymised landmark meshes — face-free).

Codewright fork of the original LittleMonkeyLab/All_a_bit_emotional Space, slimmed to static images only. The dynamic video pipeline now lives elsewhere.

Setup

git clone <url>
cd totes-emosh
uv venv
uv pip install -r requirements.txt
uv run python app.py

requirements.txt is preserved for HuggingFace Space deployment. pyproject.toml is the codewright-canonical dependency manifest for local development.

Deployment

This repo is designed to deploy directly as a HuggingFace Space (the YAML frontmatter above is the Space config). The face landmarker and classifier use the modern mediapipe.tasks API, which runs on both Apple Silicon (local dev) and the Linux x86-64 Spaces runtime unchanged.

Model assets

No model weights are committed to this repo. All weights download on first request:

  • FER_static_ResNet50_AffectNet.pt from HuggingFace (ElenaRyumina/face_emotion_recognition), driven by config.toml and app/model.py.
  • face_landmarker.task (MediaPipe Face Landmarker bundle, ~3 MB) from storage.googleapis.com/mediapipe-models/ on first inference.

Cold-start latency from these downloads is a few seconds on the ResNet50 weights and trivial on the landmarker bundle.

Runtime expectations

CPU inference on a free HF Space (~2 vCPU, 16 GB RAM):

  • MediaPipe Face Landmarker: ~10 ms / frame
  • ResNet50 static classifier: ~50–100 ms / frame

Status

Active. Original LittleMonkeyLab/All_a_bit_emotional Space remains live and unchanged; this is the new canonical six-emotion build under its own slug (LittleMonkeyLab/totes-emosh).

Provenance

Cloned from LittleMonkeyLab/All_a_bit_emotional via hf download on 2026-06-03; substantially rebuilt 2026-06-05/07. See DEVLOG.md for the iteration trail.

Credit

Created by Dr. Gordon Wright — A LittleMonkeyLab caper. Part of the Goldsmiths MSc in Psychology, Week 3 Part 4.