A powerful real-time computer vision application that detects facial expressions and hand gestures using AI
Features • Installation • How It Works • Demo • Contact
|
|
Open your mouth 3 times rapidly within 2 seconds to:
- 🔊 Play a sound effect
- 🎬 Trigger a special 4-second animation
- 📹 Webcam
- 💻 Python 3.8 or higher
- 🖥️ Recommended: Intel i7 11th gen or equivalent
- 💾 Minimum 8GB RAM
# Clone the repository
git clone https://github.com/36go/face-game.git
cd face-game
# Install dependencies
pip install -r requirements.txt
# Run the application
python main.py| File | Description |
|---|---|
neutral.png |
Neutral expression image |
smile.png |
Smiling expression image |
sad.png |
Sad expression image |
angry.png |
Angry expression image |
jew.png |
Clasped hands image |
nien.png |
Special gesture image |
thumbs_up.gif |
Thumbs up animation |
oi.gif |
Mouth trigger animation |
sound.mp3 |
Sound effect |
The application uses MediaPipe and OpenCV to analyze your webcam feed in real-time:
- Face Detection: The system detects your face and analyzes facial landmarks to determine your expression
- Hand Tracking: Recognizes hand positions and gestures using 21 hand landmarks
- Expression Mapping: Displays corresponding images based on detected expressions and gestures
- Interactive Triggers: Special mouth movements trigger sound effects and animations
Controls:
- Press
Qto quit - The app opens two windows: Camera (live feed) and Expression (output display)
Gestures:
- Thumbs Up: Hold thumb up with fingers folded for 0.5 seconds
- Clasped Hands: Bring both hands together
- Mouth Trigger: Open mouth 3 times quickly (you'll see debug messages in console)
يستخدم التطبيق MediaPipe و OpenCV لتحليل فيديو الكاميرا في الوقت الفعلي:
- كشف الوجه: يكتشف النظام وجهك ويحلل معالم الوجه لتحديد تعبيرك
- تتبع اليد: يتعرف على مواضع اليد والإيماءات باستخدام 21 نقطة لمعالم اليد
- ربط التعبيرات: يعرض الصور المقابلة بناءً على التعبيرات والإيماءات المكتشفة
- المحفزات التفاعلية: حركات الفم الخاصة تؤدي إلى تشغيل المؤثرات الصوتية والرسوم المتحركة
التحكم:
- اضغط
Qللخروج - يفتح التطبيق نافذتين: الكاميرا (البث المباشر) و التعبير (عرض النتيجة)
الإيماءات:
- الإبهام لأعلى: ارفع إبهامك مع طي الأصابع لمدة 0.5 ثانية
- اليدين المتشابكتين: اجمع كلتا يديك معاً
- محفز الفم: افتح فمك 3 مرات بسرعة (سترى رسائل تصحيح في الكونسول)
The app displays different images based on your facial expressions in real-time.
- Hold a thumbs up gesture to see an animated GIF
- Clasp your hands together to trigger a special image
- Other gestures are automatically detected and displayed
Open your mouth 3 times within 2 seconds to play a sound and show a 4-second animation!
- ⚡ Processes every frame for smooth video
- 🎯 Uses MediaPipe's lightweight model (complexity=0)
- 👤 Maximum 1 face detection per frame
- 📐 640x480 resolution for balanced quality and performance
opencv-python
mediapipe
pillow
numpy
pygameThis project is licensed under the MIT License - see the LICENSE file for details.
- MediaPipe - Google's ML solution for hand and face detection
- OpenCV - Computer vision library
- PyGame - Sound playback functionality