Skip to content

A Python-based computer vision system that uses MediaPipe Pose to recognize body gestures like jumping, crouching, hand-joining, and horizontal movement to control games like Subway Surfers or Temple Run without touching a keyboard!

Notifications You must be signed in to change notification settings

AppajiDheeraj/Subway-Surfers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

19 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ•น๏ธ Pose-Controlled Gesture Detection using MediaPipe

A Python-based computer vision system that uses MediaPipe Pose to recognize body gestures like jumping, crouching, hand-joining, and horizontal movement to control games like Subway Surfers or Temple Run without touching a keyboard!


๐ŸŽฎ Use Case: Play Games with Your Body!

This project is designed to be extended to play endless runner games using your body:

Game Gesture Action Triggered
Subway Surfers Jump Character jumps
Crouch Character rolls
Move Left/Right Character dodges
Temple Run Hands Joined Start or pause the game

๐Ÿ’ก With some automation via pyautogui, gestures can be mapped to keystrokes (e.g., jump = up arrow, crouch = down arrow).


๐Ÿ“ฆ Features

  • โœ… Real-time pose tracking using MediaPipe
  • ๐Ÿ‘ Hand gesture detection (joined / not joined)
  • โ†”๏ธ Horizontal movement detection (left / center / right)
  • ๐Ÿฆต Posture classification (jump / stand / crouch)
  • ๐Ÿ“ธ Webcam-based gesture recognition
  • ๐Ÿง  Easy integration with automation tools

๐Ÿงฐ Tech Stack

  • Python ๐Ÿ
  • OpenCV ๐ŸŽฅ
  • MediaPipe ๐Ÿ“
  • Matplotlib ๐Ÿ“Š
  • PyAutoGUI (optional for automation) โŒจ๏ธ

๐Ÿ”ง Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/pose-gesture-detection.git
    cd pose-gesture-detection
  2. Install required packages:

      pip install opencv-python mediapipe matplotlib pyautogui
  3. Run the Program

      python main.py

    This will:

    • Open your webcam

    • Detect pose and classify gestures

    • Optionally simulate key presses using gestures


๐Ÿ“ Project Structure

.
โ”œโ”€โ”€ subwaySurfers.py       # Main script to run the real-time system
โ”œโ”€โ”€ README.md              # Project documentation

๐Ÿ™Œ Credits

Built using:

  • MediaPipe Pose

  • OpenCV

  • PyAutoGUI

About

A Python-based computer vision system that uses MediaPipe Pose to recognize body gestures like jumping, crouching, hand-joining, and horizontal movement to control games like Subway Surfers or Temple Run without touching a keyboard!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages