Downloads · 30 days
0
ayzeksalimli/hand-tracking-drawing
hand-tracking-drawing is a machine learning model from ayzeksalimli. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Draw in the air with your hand, then view the drawing as a rotatable 3D object.
Downloads · 30 days
0
Access
Public
Updated Jul 26, 2026
Repo size
14.3 MB
Likes
0
Public
Click a slice to open those files.
.task7.8 MB · 54%
From the Hugging Face model README
Draw in the air with your hand, then view the drawing as a rotatable 3D object.
![]()
Uses the MediaPipe Hand Landmarker (models/hand_landmarker.task), which returns
21 keypoints per hand. Gestures are classified from ratios and joint angles between
those keypoints, so recognition is independent of hand size, distance, or handedness.
:(( for a secondKeys: S save, C clear, U undo, 1..6 color, [ / ] thickness,
SPACE 2D/3D, R reset view, K skeleton, D debug, H help, Q quit.
The 3D Drawing mode uses the YOLO depth model (models/yolo26s-depth.pt), which
returns a per pixel depth map in meters. Every drawn point takes its Z from the metric
depth under the fingertip, so moving the hand closer or further really draws into the
scene: the stroke is a 3D curve in space, not a flat picture placed on a board. The
first drawn point sets the zero plane, everything after that is relative to it.
Depth runs in a background thread, so tracking and drawing stay at camera speed.
Raw monocular depth flickers, so the pen does not follow it directly: the global scale drift of the map is cancelled against the static background, the fingertip depth goes through a one euro filter with a noise deadband and a speed limit, and the newest points of a stroke are low passed along the curve. A circle drawn without moving the hand comes out flat, while a deliberate push of 25 cm is kept in full.
By default strokes are colored by a depth gradient - warm near the camera, cool further
away. 1..6 switch to a solid color, G goes back to the gradient.
Gestures and keys are the same as in 2D, with two additions:
In 3D the fist rotates the drawing itself and two fists scale it, SPACE toggles
depth colors, R resets the view.
pip install -r requirements.txt
python src/main.py
Pick the mode in the menu, or skip it:
python src/main.py --no-menu --mode 3d
python src/main.py --no-menu --mode 3d --depth-size 448 --depth-every 1
by Salimli Ayzek (Салимли Айзек): https://mathematiclove.github.io