◉ Pulse
Satwik-2005 avatar
#24 today

Satwik-2005/AI-Based-Air-Drawing-and-Learning

Python AI #mediapipe #opencv

An AI-powered air drawing and learning system that enables users to draw in the air using hand gesture recognition and computer vision, providing an interactive and touch-free learning experience.

Last active 3 months ago Created Aug 5, 2026
Stars
7
Today
+7
Forks
1
Quality
90/100
Momentum
19

README

Fetched from GitHub on Nov 16, 2026, 3:42 PM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to Satwik-2005/AI-Based-Air-Drawing-and-Learning and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

AI-Based Air Drawing & Learning System

An interactive, AI-powered web application that allows users to draw mathematical problems either virtually in the air using hand gestures via a webcam, or on a 2D digital canvas. The system captures the drawings, recognizes the handwriting, and provides detailed, step-by-step mathematical solutions using the advanced Google Gemini AI engine.


🚀 Key Features

1. 🖐️ Virtual Draw (Webcam Mode)

  • Real-time Gesture Tracking: Uses OpenCV and MediaPipe Hand Landmarking to track hand movements.
  • On-screen UI Controls: Select drawing colors (Blue, Green, Red, Yellow) or clear the canvas by hovering your index finger over visual buttons.
  • Smart Pen Mechanics: Draw seamlessly by pointing your index finger. Pause drawing/raise the pen by bringing your thumb and index finger close together (pinching gesture).
  • AI Analysis: Capture your air drawings and send them to Google Gemini for real-time mathematical analysis.

2. 🎨 AI Board (Digital Canvas Mode)

  • Interactive 2D Sketchpad: Draw directly on the screen using a mouse, stylus, or trackpad on an HTML5 canvas.
  • Customization Tools: Adjust brush sizes, select any color from a color picker, or use the eraser tool.
  • AI Problem Solver: Write complex math equations or draw questions, then click Solve Problem to get step-by-step guidance.

3. 🧠 Gemini AI Integration

  • Powered by the state-of-the-art gemini-2.0-flash model.
  • High-accuracy OCR (Optical Character Recognition) for handwritten text/symbols.
  • Step-by-step educational explanations tailored for easy learning.

📂 Project Structure

├── Air-Canvas-with-ML/         # Legacy folder
└── air_drawing/
    ├── main.py                 # Flask server, OpenCV/MediaPipe pipeline & Gemini API integration
    ├── static/                 # Static assets (CSS styles & client-side JavaScript)
    │   ├── css/
    │   │   ├── ai_board.css    # Styles for AI Board UI
    │   │   └── index.css       # Styles for main layout and Virtual Draw UI
    │   └── ai_board.js         # Canvas rendering, toolbar events, and API fetch calls
    └── templates/              # HTML views
        ├── index.html          # Main page hosting the webcam Virtual Draw feed
        └── ai_board.html       # AI Board whiteboard interface

🛠️ Tech Stack

  • Backend: Python, Flask
  • Computer Vision: OpenCV, MediaPipe
  • Generative AI: Google GenAI SDK (gemini-2.0-flash)
  • Frontend: HTML5 Canvas, CSS3, JavaScript (ES6)

⚙️ Setup & Installation

Prerequisites

  • Python 3.8 or higher installed on your machine.
  • A working webcam (required for the Virtual Draw gesture mode).
  • A Google Gemini API Key. Get one from the Google AI Studio.

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/pranav-kumar-080/Ai_Based_Air_Drawing_Learning_System.git
    cd Ai_Based_Air_Drawing_Learning_System

    (Or navigate to your cloned repository folder)

  2. Install Dependencies: Install the required Python packages using pip:

    pip install flask opencv-python mediapipe numpy google-generativeai python-dotenv pillow
  3. Configure Environment Variables: Create a file named .env in the air_drawing directory (or the root directory where you launch the application) and add your Google Gemini API key:

    GOOGLE_API_KEY=your_actual_gemini_api_key_here
  4. Run the Application: Navigate into the air_drawing directory and start the Flask development server:

    cd air_drawing
    python main.py
  5. Access the App: Open your web browser and navigate to: http://127.0.0.1:5000


💡 How to Use

Virtual Draw Mode:

  1. Click the Start button to turn on your webcam feed.
  2. Hold up one hand. You will see MediaPipe skeleton tracking lines overlaying your hand.
  3. Move your index finger to draw.
  4. Pinch your thumb and index finger together to lift the pen and stop drawing.
  5. Hover your index finger over the top menu headers to change colors or clear the canvas.
  6. Once you've drawn a problem (e.g., 2 + 2 = ?), click Solve to see the solution under Recognition Result.

AI Board Mode:

  1. Click AI Board in the navigation bar.
  2. Select your brush size and color.
  3. Draw or write your question on the canvas using your mouse or touchscreen.
  4. Click Solve Problem to let the Gemini model analyze and display a structured step-by-step answer.
Rendered by GitHub from the repository’s README. Scroll to read the full file.

First trending

Aug 6, 2026

first spotted on the list

Best rank

#24

highest position reached

Appearances

1

times on the trending list

Star velocity

0.07

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot

Not enough snapshots yet — check back soon.

Rank history

position on trending · lower is better

Not enough snapshots yet — check back soon.

Language breakdown

by bytes of code
Python 41.8%
  • Python 9 KB 41.8%
  • CSS 4 KB 20.1%
  • HTML 4 KB 19.8%
  • JavaScript 4 KB 18.2%

3D card for your website

Live HTML card with a pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/Satwik-2005/AI-Based-Air-Drawing-and-Learning" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="Satwik-2005/AI-Based-Air-Drawing-and-Learning — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

Satwik-2005/AI-Based-Air-Drawing-and-Learning stars badge
Markdown
[![Satwik-2005/AI-Based-Air-Drawing-and-Learning](https://www.notionpulse.cc/api/badge/Satwik-2005/AI-Based-Air-Drawing-and-Learning.svg)](https://www.notionpulse.cc/repo/Satwik-2005/AI-Based-Air-Drawing-and-Learning)
HTML
<a href="https://www.notionpulse.cc/repo/Satwik-2005/AI-Based-Air-Drawing-and-Learning"><img src="https://www.notionpulse.cc/api/badge/Satwik-2005/AI-Based-Air-Drawing-and-Learning.svg" alt="Satwik-2005/AI-Based-Air-Drawing-and-Learning stars badge" /></a>

Repository of the Day

#24 Repository of the Day

Repository of the Week

#24 Repository of the Week

Repository of the Month

#24 Repository of the Month