Instructions to use litert-community/MediaPipe-HandLandmarker-Full with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use litert-community/MediaPipe-HandLandmarker-Full with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
MediaPipe Hand Landmarker (Full)
Two-stage MediaPipe task bundle (hand_landmarker.task, 7.8 MB, FP16 weights) combining a palm detector and a 21-keypoint 3D hand landmark regression model for the MediaPipe Hand Landmarker (HandLandmarker) task across Web, Android, iOS, Python, and Flutter.
Documentation: MediaPipe Hand Landmarker Docs
Samples: Android · iOS · Python Colab · Web · Flutter
Try live: Web Demo
hand_landmarker.task packages both neural networks required by HandLandmarker into a single bundle:
- Palm detection model (
hand_detector.tflite): Single-shot detector that locates hands across the full input frame. - Hand landmarks model (
hand_landmarks_detector.tflite): Regresses 21 3D hand-knuckle coordinates in normalized image space, 21 3D metric-scale world coordinates (estimated via the articulated GHUM hand model), a hand-presence score, and subject handedness (Left/Right) on the cropped hand region.
Trained on approximately 30K real-world images alongside rendered synthetic hand poses over varied backgrounds. In VIDEO and LIVE_STREAM running modes, HandLandmarker reuses the previous frame's landmark bounding box to localize hands on subsequent frames and only re-triggers palm detection when hand presence or tracking confidence falls below threshold.
Handedness note: Left and Right handedness correspond to the subject's hands, not the viewer (mirrored selfie frames should be flipped or coordinates inverted).
21 Hand Landmark Indices
| ID | Landmark | ID | Landmark |
|---|---|---|---|
0 |
WRIST |
11 |
MIDDLE_FINGER_DIP |
1 |
THUMB_CMC |
12 |
MIDDLE_FINGER_TIP |
2 |
THUMB_MCP |
13 |
RING_FINGER_MCP |
3 |
THUMB_IP |
14 |
RING_FINGER_PIP |
4 |
THUMB_TIP |
15 |
RING_FINGER_DIP |
5 |
INDEX_FINGER_MCP |
16 |
RING_FINGER_TIP |
6 |
INDEX_FINGER_PIP |
17 |
PINKY_MCP |
7 |
INDEX_FINGER_DIP |
18 |
PINKY_PIP |
8 |
INDEX_FINGER_TIP |
19 |
PINKY_DIP |
9 |
MIDDLE_FINGER_MCP |
20 |
PINKY_TIP |
10 |
MIDDLE_FINGER_PIP |
Files
| File | Precision | Size | SHA-256 |
|---|---|---|---|
hand_landmarker.task |
float16 |
7.82 MB (7,819,105 B) | fbc2a30080c3c557093b5ddfc334698132eb341044ccee322ccf8bcf3607cde1 |
Companion Files in Repo Root
| File | Role | Size | SHA-256 |
|---|---|---|---|
Model Card Hand Tracking (Lite_Full) with Fairness Oct 2021.pdf |
Upstream Google model card (PDF) | 358.0 KB (358,044 B) | 43127ff8a92e22717f0d8c30dab3efef4641a29cbf50b15ae3de001be94ab76b |
Download
pip install -U huggingface_hub
hf download litert-community/MediaPipe-HandLandmarker-Full hand_landmarker.task --local-dir .
Inputs, Outputs, and Model Specifications
Bundle Contents (hand_landmarker.task)
| Bundled Member | Uncompressed Size | SHA-256 (prefix) |
|---|---|---|
hand_detector.tflite |
2.34 MB (2,339,878 B) | 945f713bc23570bd… |
hand_landmarks_detector.tflite |
5.48 MB (5,478,949 B) | 6acda74af3fbf40e… |
Sub-model hand_detector.tflite
- Embedded
TFLITE_METADATA: nameMulti Hand Detection· version1· authorMediaPipe· packed associated files:labels.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | input_1 |
[1, 192, 192, 3] |
float32 |
image — Input image to be detected — Normalization: mean=[0.0], std=[255.0] |
| Output | Identity |
[1, 2016, 18] |
float32 |
palm detection — regressed detected palm locations |
| Output | Identity_1 |
[1, 2016, 1] |
float32 |
scores — palm detection scores — Labels: labels.txt |
Sub-model hand_landmarks_detector.tflite
- Embedded
TFLITE_METADATA: nameHandLandmarkDetector· version1· authorMediaPipe· packed associated files:handedness.txt
| Direction | Tensor | Shape | Type | Notes |
|---|---|---|---|---|
| Input | input_1 |
[1, 224, 224, 3] |
float32 |
image — Input image to be detected. — Normalization: mean=[0.0, 0.0, 0.0], std=[255.0, 255.0, 255.0] |
| Output | Identity |
[1, 63] |
float32 |
landmarks — The hand landmarks in normalized coordinates. |
| Output | Identity_1 |
[1, 1] |
float32 |
presense score — The score of hand presence in the image. |
| Output | Identity_2 |
[1, 1] |
float32 |
handedness — The score of left or right handedness. — Labels: handedness.txt |
| Output | Identity_3 |
[1, 63] |
float32 |
world landmarks — The hand landmarks in world coordinates. |
Use with MediaPipe Tasks
Python Quickstart
pip install -U mediapipe huggingface_hub
import mediapipe as mp
from huggingface_hub import hf_hub_download
model_path = hf_hub_download(
repo_id="litert-community/MediaPipe-HandLandmarker-Full",
filename="hand_landmarker.task",
)
BaseOptions = mp.tasks.BaseOptions
HandLandmarker = mp.tasks.vision.HandLandmarker
HandLandmarkerOptions = mp.tasks.vision.HandLandmarkerOptions
VisionRunningMode = mp.tasks.vision.RunningMode
options = HandLandmarkerOptions(
base_options=BaseOptions(model_asset_path=model_path),
running_mode=VisionRunningMode.IMAGE,
num_hands=2,
)
with HandLandmarker.create_from_options(options) as runner:
mp_image = mp.Image.create_from_file("input.jpg")
result = runner.detect(mp_image)
for handedness, landmarks in zip(result.handedness, result.hand_landmarks):
side = handedness[0].category_name
wrist = landmarks[0]
print(f"{side} hand: wrist=({wrist.x:.3f}, {wrist.y:.3f}, {wrist.z:.3f})")
Cross-Platform Guides & Samples
- Task overview & options: Hand Landmarker documentation
- Platform setup guides: Python · Web / JavaScript · Android (Kotlin / Java) · iOS (Swift) · Flutter (Dart)
- Runnable sample apps: Web Demo · Web Source · Android · iOS · Python Notebook · Flutter
Latency Benchmarks
End-to-end MediaPipe Task pipeline average latency reported by the Hand Landmarker documentation:
| Model Variant | Device | CPU Latency | GPU Latency |
|---|---|---|---|
| HandLandmarker (full) | Pixel 6 | 17.12 ms | 12.27 ms |
Intended Use, Limitations, and Fairness
Summarized from the bundled Model Card Hand Tracking (Lite_Full) with Fairness Oct 2021.pdf (Oct 2021):
- Intended applications: Predicting 2D screen and 3D world landmarks on prominently displayed hands in smartphone or webcam images and video streams for mobile AR, gesture recognition, and hand-control interfaces.
- Out-of-scope uses:
- Any form of surveillance or identity recognition is explicitly out of scope and not enabled by this technology.
- Human life-critical decisions.
- Counting hands in crowds, or predicting landmarks on hands wearing gloves, holding occluding objects, or covered by heavy decorations (jewelry, tattoos, henna).
- Known limitations: Trained on finite real and synthetic datasets; blur, heavy self-occlusion, low light, and low-end camera noise increase landmark error (with error smallest near the rigid palm/MCP joints and largest at the fingertips).
- Fairness evaluation (Full model summary): Measured via palm-size-normalized Mean Absolute Error (MNAE) on 2D screen landmarks:
- 14 UN geographic subregions (700 images, 50/region): average MNAE 10.09% ± 1.73% (range 6.10%–13.00%, vs. 6.0% human inter-annotator baseline).
- 6 Fitzpatrick skin-tone types (420 images): average MNAE 5.08% ± 0.72% (range 4.53%–6.21%, vs. 3.8% human inter-annotator baseline).
- Perceived gender: average MNAE 4.80% (female) and 5.38% (male). Refer to the bundled PDF model card for full regional and demographic breakdowns.
Provenance
Every model binary in this repository is byte-identical (unmodified weights, metadata, and .task bundle archive bytes) to the official artifact served by Google from storage.googleapis.com/mediapipe-models.
| Repo File | Upstream URL | GCS Generation | Upstream Last-Modified |
Pinned Bucket Version |
|---|---|---|---|---|
hand_landmarker.task |
hand_landmarker.task |
1682480005356399 |
Wed, 26 Apr 2023 03:33:25 GMT | /1/ |
License and Citation
- License:
apache-2.0— Stated as Apache License, Version 2.0 in the bundled upstream Google model-card PDF.
Citation
@article{zhang2020mediapipehands,
title = {MediaPipe Hands: On-device Real-time Hand Tracking},
author = {Zhang, Fan and Bazarevsky, Valentin and Vakunov, Andrey and Tkachenka, Andrei and Sung, George and Chang, Chuo-Ling and Grundmann, Matthias},
journal = {arXiv preprint arXiv:2006.10214},
year = {2020},
url = {https://arxiv.org/abs/2006.10214}
}