Control your Tekken fighter using real-time upper body gestures captured through your webcam!
This project detects punches and body tilts using pose estimation powered by YOLOv8 Pose, triggering keypresses to control the game.
- 🥊 Punch Detection: Left and right punches using elbow-wrist-shoulder angles.
↔️ Tilt Detection: Move left or right based on upper body tilt.- 🔁 Real-time Detection using
YOLOv8andOpenCV. - ⌨️ Virtual Keypresses sent using the
keyboardmodule.
Coming soon!
A short clip will be added here showing punches and movements mapped to keyboard keys.
git clone https://github.com/yourusername/tekken-gesture-control.git
cd tekken-gesture-controlpip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu118
⚠️ For GPU support, make sure PyTorch is installed with CUDA.
mkdir models
wget https://github.com/ultralytics/assets/releases/download/v0.0.0/yolov8n-pose.pt -P models/Or place yolov8n-pose.pt manually inside the models/ directory.
Run the program in debug setup mode first to visualize detection:
python main.py- Press
qto exit setup mode. - To disable debug overlay and begin controlling with gestures, set
setup=Falseinmain.pyor modify the logic accordingly.
You can tweak the following settings in config.py:
KEY_MAP: Modify movement and attack keys- Angle thresholds for punch detection
- Device preference (CPU/GPU)
- Ultralytics YOLOv8
- OpenCV
- PyTorch
- You — for trying this out!