Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 

Repository files navigation

โœจ Air Canvas ML Model

Author: Amrish Kumar


๐Ÿš€ Project Overview

Ever wished to capture your imagination by simply waving your finger in the air? Air Canvas ML brings your drawings to life, using real-time computer vision and machine learning to let you sketch in mid-air. No touchโ€”just gestures!


๐Ÿ› ๏ธ Technology Choices & Justification

  • Python: Fast prototyping, huge ecosystem for CV/ML.
  • OpenCV: Robust, industry-standard for real-time image/video processing and UI overlays.
  • MediaPipe: Google's advanced hand tracking framework, efficient and easy for gesture recognition.
  • NumPy: High-performance numerical operations for image arrays.
  • collections.deque: Fast and memory-efficient storage for stroke points.

Combining these, we deliver a smooth, interactive experience for air drawing!


๐ŸŽจ Features & UI Highlights

  • Modern Dark Mode Canvas
    Enhanced visibility and style for your sketches.

  • Sleek, Rounded Color Buttons with Live Highlight
    Intuitive color selection with animated borders, emoji icons, and easy visual feedback.

  • Clear Button with Animated Trash Icon
    Instantly erase your canvas with a single gesture.

  • Real-Time Hand Tracking Overlay
    See your detected hand landmarks live as a semi-transparent guide.

  • Dynamic Gesture Hints & Instructions
    Always know how to interactโ€”helpful overlays guide you.

  • Undo/Redo (optional)
    Go back and forth between recent strokes.


โœ‹ Gesture Recognition Logic

Air Canvas ML uses intelligent hand landmark tracking (via MediaPipe) to identify four main gestures:

Gesture How it Works
Draw Track the tip of the index finger (landmark 8). If away from thumb, record movement.
Pause (Lift) Thumb (landmark 4) close to index tip vertically (<30px): stops drawing, starts new stroke
Select Color Move fingertip into any top-bar zone:
- Blue: 160-255px
- Green: 275-370px
- Red: 390-485px
- Yellow: 505-600px
Clear Move fingertip into "Clear" button zone (40-140px): all strokes reset, canvas erased

๐Ÿ–ผ๏ธ User Interface Preview

UI Preview

Button Action Emoji/Icon
Blue Draw Blue ๐ŸŸฆ
Green Draw Green ๐ŸŸฉ
Red Draw Red ๐ŸŸฅ
Yellow Draw Yellow ๐ŸŸจ
Clear Erase Canvas ๐Ÿ—‘๏ธ

Current color is highlighted with a bright border!


๐Ÿ“ Getting Started

1. Install Dependencies

pip install -r requirements.txt

2. Run the App

python air canvas ml.py

Press Q to exit.


๐Ÿ“‹ Requirements

See requirements.txt for full details:

opencv-python
mediapipe
numpy

๐Ÿ“– License

MIT


๐Ÿ’ฌ Contact

Questions, feedback, or want to collaborate?
Find me on GitHub: Coderamrish


Bring your imagination to lifeโ€”draw without boundaries!

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages