[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nkegke/emotion-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-Time Emotion Recognition Demo

This is a demo which takes input face or body from webcam and predicts the following emotions:


  • Face

Neutral, Happiness, Sadness, Surprise, Frustration, Fear, Disgust


  • Body

Positive, Neutral, Negative


Prerequisites

Install the required packages below:

pip3 install torch torchvision torchaudio
pip install opencv-python
pip install mediapipe
pip install gdown

How to run

Webcam Input:

python demo.py INPUT

where INPUT = { face , body }.

Optionally, apply medical face mask, by running:

python demo.py INPUT mask

How it works

The Face Mesh detection step is optional for body input.

The face MobileNetV2 model is trained on the AffectNet dataset, whereas the body MobileNetV2 model is trained on the BoLD dataset.