HandDetectionDrawing

Hand Detection & Gesture Drawing App

An AI-powered desktop application that allows you to draw on a digital canvas using hand gestures and control the interface with head movements. Built with Python, MediaPipe, OpenCV, and PyQt6.

🚀 Features

📦 Requirements

To run this project efficiently, you need the following Python packages:

🛠️ Installation Guide

Follow these steps to set up the project on your local machine:

1. Clone the Repository

git clone https://github.com/Amit123103/HandDetectionDrawing.git
cd HandDetectionDrawing

It’s best practice to use a virtual environment to manage dependencies.

Windows:

python -m venv .venv
.venv\Scripts\activate

macOS / Linux:

python3 -m venv .venv
source .venv/bin/activate

3. Install Dependencies

Install all required packages using pip:

pip install -r requirements.txt

▶️ How to Run

On Desktop (Windows/macOS/Linux)

Make sure you have a webcam connected. Run the following command:

python main.py

This will launch the application window.

On Cloud/Headless Servers (Render)

If deploying to a cloud service like Render, the app will automatically start in Server Mode (API only) to prevent crashing on headless systems.

🎮 Controls

Gesture Action
Index Finger Move Cursor
Pinch (Index + Thumb) Draw / Paint
Closed Fist Undo Last Stroke
Head Tilt Left Previous Color
Head Tilt Right Next Color
Head Nod Up Increase Brush Size
Head Nod Down Decrease Brush Size

📝 Troubleshooting