Real-time hand tracking and annotation using a webcam. The script uses MediaPipe Tasks API for landmark detection, OpenCV for video capture/display, and NumPy for image processing.
- Real-time hand landmark detection (up to 2 hands)
- Handedness labeling (Left / Right)
- Live video annotation overlay
Example of real-time output (mirored webcam view):
- Python 3.9+ (required for MediaPipe Tasks API compatibility)
- Webcam (built-in or external)
Install dependencies:
pip install -r requirements.txtOr manually:
pip install mediapipe opencv-python numpyThis repository already includes the required model file:
hand_landmarker.task
If you want to download the latest version manually, use the official MediaPipe model page: https://ai.google.dev/edge/mediapipe/solutions/vision/hand_landmarker/index#models
python hand-track.py- ESC: Exit the application.