Real-time hand-sign recognition with jutsu combo detection and visual effects, built with Python, MediaPipe, and OpenCV.
- Live webcam hand tracking (21 MediaPipe landmarks)
- Finger-state extraction for 5 fingers
- Rule-based sign recognition (no model training)
- Temporal stabilization to reduce flicker
- Sequence detection for combo matching
- Visual jutsu effect overlays with fade timing
- Tora = index + middle up
- Ushi = open hand
- Ne = index only
- Inu = fist
- Tori = index + pinky up
- Ne -> Tora -> Inu: KATON - FIREBALL JUTSU
- Ushi -> Ne -> Tora: SHADOW CLONE JUTSU
- Tori -> Inu -> Ushi: CHIDORI
- main.py: App entry point and render loop
- hand_detector.py: Hand landmark detection + finger state extraction
- signs.py: Sign definitions and matching
- stabilizer.py: Temporal smoothing for stable sign confirmation
- sequence.py: Sign change sequence tracking
- combos.py: Combo definitions and lookup
- JUTSU_GUIDE.md: End-user guide for sign execution
- PROJECT_OVERVIEW.md: Detailed build notes and stage progression
- Python 3.11
- Webcam
Python packages:
- opencv-python
- mediapipe
- Create and activate virtual environment:
python -m venv venv
.\venv\Scripts\Activate.ps1- Install dependencies:
pip install opencv-python mediapipe- Run the app:
python main.py- Quit by pressing Q in the OpenCV window.
- Capture frame from webcam.
- Detect hand landmarks.
- Convert landmarks to [thumb, index, middle, ring, pinky] states.
- Match finger states to a known sign pattern.
- Stabilize sign over recent frames.
- Append only sign changes to a short sequence buffer.
- Match sequence against combo table and trigger effect.
- No camera feed:
- Change camera index in main.py from VideoCapture(0) to VideoCapture(1).
- Signs flicker:
- Improve lighting, reduce motion, and keep hand centered.
- Combo not triggering:
- Hold each sign long enough to stabilize before changing.
- Startup import errors:
- Ensure the virtual environment is active and dependencies are installed.
This repository now includes .gitignore entries for:
- venv and other local environments
- pycache and Python bytecode
- local .env files
- common editor/OS artifacts