A real-time facial expression detection system that matches your expressions to character images. Detects 3 expressions: happy, sad, and angry.
- Python 3.8+
- Webcam
- Character images for expressions
Install dependencies:
pip install -r requirements.txt-
Add your character images to the
images/directory -
Edit
expressions.jsonto map images to expressions:
{
"happy": ["happy.png"],
"sad": ["sad.png"],
"angry": ["angry.png"]
}- Run the program:
python expression_matcher.py- Make facial expressions to see matching images
- Press 's' to save a screenshot
- Press 'q' to quit
--images <dir>: Specify image directory (default: images)--mapping <file>: Specify mapping file (default: expressions.json)
Built with OpenCV, DeepFace, and TensorFlow