Real-time hand gesture recognition for air drawing with AI-powered heart detection.
Open terminal and run this command:
git clone https://github.com/dennisimoo/Air-Canvas.git && cd Air-Canvas && pip install -r requirements.txt && python app.pyThen open: http://localhost:5001
- Clone the repository:
git clone https://github.com/dennisimoo/Air-Canvas.git
cd Air-Canvas- Install dependencies:
pip install -r requirements.txt- Run the application:
python app.py- Open your browser to: http://localhost:5001
- Index finger: Draw in the air
- Fist: Clear the canvas
- Two fingers together: Pen up (stop drawing)
- High five (4+ fingers): Analyze drawing for hearts
- Python 3.8+
- Webcam access
- Modern browser (Chrome, Firefox, Safari)
- Real-time hand tracking with MediaPipe
- Air drawing with gesture controls
- AI heart detection using trained YOLOv8 model
- Dark/light mode toggle
- Works on desktop and mobile
For cloud deployment, the app uses browser camera access via WebRTC. Deploy to any platform that supports Flask:
- Railway
- Render
- Heroku
- DigitalOcean
Make sure to enable HTTPS for camera access in production.
- Frontend: HTML5 Canvas, MediaPipe JavaScript
- Backend: Flask, OpenCV, MediaPipe Python
- AI Model: YOLOv8 for heart detection
- Deployment: Docker ready
Camera not working?
- Ensure HTTPS in production
- Allow camera permissions in browser
- Check if webcam is being used by another app
Model not detecting hearts?
- Make sure
heart_detect.ptfile exists - Try drawing clearer heart shapes
- Check console for error messages
Made by Dennis Khylkouski