An open API service indexing awesome lists of open source software.

https://github.com/krishbharadwaj5678/handdrive

Control Hill Climb Racing using hand gestures with real time webcam detection. Open your hand to accelerate, close your fist to stop and reverse the car.
https://github.com/krishbharadwaj5678/handdrive

artificial-intelligence computer-vision cvzone game-automation game-development gesture-recognition github hill-climbing machine-learning mediapipe mediapipe-hands opencv pyautogui python python-game python3

Last synced: 27 days ago
JSON representation

Control Hill Climb Racing using hand gestures with real time webcam detection. Open your hand to accelerate, close your fist to stop and reverse the car.

Awesome Lists containing this project

README

          

# ✋ HandDrive

Welcome to **HandDrive**, a Python based computer vision project that lets you control the car in **Hill Climb Racing** using hand gestures.

![HandDriveDemo](https://github.com/KrishBharadwaj5678/HandDrive/raw/main/HandDriveDemo.gif)

## 🧠 Features

| Feature | Description |
| ---------------------------------------- | ------------------------------------------------------------------ |
| đŸ–ī¸ **Real time hand gesture detection** | Uses **MediaPipe** for fast and efficient hand tracking |
| 🚗 **Intuitive gesture controls** | đŸ–ī¸ **Open Hand** – Triggers the **Accelerate** command
✊ **Closed Hand** – Triggers the **Brake** command |
| đŸ•šī¸ **Game automation** | Designed for **Hill Climb Racing** |
| đŸ–Ĩī¸ **Webcam based control** | No additional hardware required - just a webcam |
| đŸŽ¯ **Accurate finger detection** | Performs well even under varied lighting conditions |
| 🔄 **Hands free experience** | Play the game without touching keyboard or mouse |
| 📊 **Real-time visual feedback** | Displays hand landmarks and gesture detection live |

---

## đŸ› ī¸ Tech Stack

| Technology | Description |
| ------------------------------------------------------- | ---------------------------------------------- |
| 🐍 **Python 3** | Core programming language used for the project |
| 🤖 **MediaPipe** | Real time hand and finger tracking |
| đŸ–Ĩī¸ **OpenCV** | For webcam access and image/video processing |
| 🧰 **CVZone** | Simplifies working with OpenCV and MediaPipe |
| 🎮 **pyautogui** | Simulates keyboard presses to control the game |

---

## 🚀 How It Works

1. đŸ–ī¸ **Open Hand (All fingers extended)**
→ Simulates pressing the **accelerate** key to move the car **forward**.

2. ✊ **Closed Fist (All fingers folded)**
→ Simulates pressing the **brake** key to **stop** the car and move it **backward**.

---

## đŸ“Ļ Installation

### 1ī¸âƒŖ Clone the Repository

```bash
git clone https://github.com/KrishBharadwaj5678/HandDrive.git
```

### 2ī¸âƒŖ Navigate to the Folder

```bash
cd HandDrive
```

### 3ī¸âƒŖ Install the Dependencies

```bash
pip install -r requirements.txt
```

### 4ī¸âƒŖ Run the Project

```bash
python main.py
```

---

## Contributing 🤝

Want to contribute? Here's how:

1. 🍴 Fork the repository.
2. đŸŒŋ Create a new branch (`git checkout -b feature-name`).
3. âœī¸ Make your changes and commit them (`git commit -am 'Add feature-name'`).
4. 🚀 Push to your branch (`git push origin feature-name`).
5. 🔄 Submit a pull request to merge into the main branch.