A real-time computer vision application that matches your facial expressions and hand gestures to famous internet memes using MediaPipe's face and hand detection.
Point your webcam at yourself, make different facial expressions and hand gestures, and watch as the app finds the meme that best matches your expression in real-time! The matched meme appears side-by-side with your camera feed.
- Real-time Face Detection: Uses MediaPipe Face Landmarker to track 478 facial landmarks
- Hand Gesture Detection: Tracks hand positions to distinguish similar expressions (e.g., Leo's cheers vs Disaster Girl's smirk)
- Advanced Expression Analysis:
- Eye openness (surprise, wide eyes)
- Eyebrow position (raised, furrowed)
- Mouth shape (smiling, open, concerned)
- Hand gestures (raised hands, fist pumps)
- Smart Matching Algorithm: Weighted similarity scoring with exponential decay for accurate matching
- 6 Iconic Memes: Carefully selected for diverse expressions and high detection quality
- Python 3.11
- Webcam
- Clone the repository:
git clone
cd make_me_a_meme- Install dependencies:
pip install mediapipe opencv-python numpy- Run the application:
python3 main.pyThe first time you run it, the app will automatically download the required MediaPipe models (~7MB total).
-
Run
python3 main.py -
Your webcam will activate
-
Make different expressions and gestures:
- Angry face → Angry Baby
- Smirk (no hands) → Disaster Girl
- Smirk + hand on chin → Gene Wilder
- Smile + raised hand → Leonardo DiCaprio
- Wide eyes/staring → Overly Attached Girlfriend
- Happy + fist pump → Success Kid
-
Press 'q' to quit
- Uses MediaPipe Face Landmarker (478 landmarks per face)
- Uses MediaPipe Hand Landmarker (21 landmarks per hand, up to 2 hands)
- Detects facial features and hand positions in real-time
For each frame, the app calculates:
- Eye features: Openness, symmetry
- Eyebrow features: Height, position relative to eyes
- Mouth features: Openness, width ratio, elevation
- Hand features: Number of hands, raised/lowered position
- Expression scores: Surprise, smile, concern, cheers
- Compares your features against pre-loaded meme features
- Uses weighted exponential decay scoring
- Higher weights for distinctive features (cheers score: 30 points, hand_raised: 25 points)
- Finds the best match and displays it alongside your video feed
Feel free to:
- Add more memes (with hand gestures for better accuracy!)
- Improve the matching algorithm
- Enhance the UI
- Optimize performance
This project is for educational and entertainment purposes.
- MediaPipe: Google's ML framework for face and hand detection
- Meme Images: Fair use, iconic internet memes
- OpenCV: Open source computer vision library
- Add more memes (target: 10-15)
- GUI for meme selection
- Save matched screenshots
- Expression history/statistics
- Multiple face support
- Custom meme upload via UI
- Performance optimizations
- Mobile app version