AI-Hand-Tracking-on-CPU-in-Real-Time

Copyright ยฉ 2025 webdevpathiraja All rights reserved. This project is licensed under the MIT License.

๐Ÿซฒ๐Ÿผ๐Ÿ‘Œ๐ŸผReal-Time Hand Tracking with MediaPipe ๐Ÿคš๐Ÿผ๐Ÿ‘‹๐Ÿผ

This project uses MediaPipe and OpenCV to track hands in real-time using a webcam. It detects hand landmarks and draws them on the frame, displaying the tracking in a live video window. The hand landmarks are displayed as red dots, and the connections between the landmarks are drawn with green lines.

Prerequisites

To run this project, make sure you have the following Python libraries installed:

You can install these libraries using pip:

pip install opencv-python mediapipe

How to Run the Project ๐Ÿฆพ๐Ÿ”ฅ

  1. Clone this repository to your local machine:

     git clone https://github.com/webdevpathiraja/AI-Hand-Tracking-on-CPU-in-Real-Time.git
     cd AI-Hand-Tracking-on-CPU-in-Real-Time
    
  2. Install the necessary dependencies:

     pip install -r requirements.txt
    
  3. Run the script:

     python main.py
    

    This will open a webcam window showing the tracked hand landmarks. The landmarks will be drawn as red dots, and green lines will represent the connections between the landmarks.

  4. Press q to exit the program.

How It Works ๐Ÿ‘ท๐Ÿปโ€โ™€๏ธ๐Ÿชœ

Landmarks Information โญ•๏ธโŽ

Each hand has 21 landmarks, numbered from 0 to 20. Here are the main landmarks:

These landmarks are used to draw connections between each joint in the hand.