← All models

hand-landmark-detection · vision · MediaPipe · ~8 MB

HandLandmarker — 21 joints on every hand

MediaPipe's HandLandmarker finds hands in an image or video and returns 21 landmarks for each — every knuckle and fingertip — as normalized x/y/z coordinates, plus whether it's a left or right hand. It's a real downloadable .task model that runs on-device via WebAssembly (with a GPU delegate when available). Drop a photo or turn on your webcam.

At a glance

ModelMediaPipe HandLandmarker (Google)
RuntimeMediaPipe Tasks Vision (@mediapipe/tasks-vision) — .task bundle
Output21 landmarks per hand (x, y, z normalized), world landmarks, handedness
HandsUp to 2 by default (configurable)
DelegateGPU when a WebGPU/WebGL adapter exists, otherwise CPU (XNNPACK)
Download~8 MB .task file, cached by the browser after first load
LicenseApache-2.0 (Google MediaPipe)
Web APIsWebAssembly, Web Workers (off-thread inference), Canvas, getUserMedia, requestVideoFrameCallback, transferable ImageBitmap — all Baseline widely available

Run it

Pick a sample hand photo, drop your own, or use your webcam. The 21 landmarks and the hand skeleton are drawn straight onto the canvas.

Drop a hand photo here, or click to choose
Two hands, palm and back A hand making a peace sign A hand giving a thumbs up

See inside

Every hand comes back as 21 named landmarks — wrist, then four joints per finger from base to tip — each a normalized x, y (0–1 across the image) plus a relative depth z. Handedness ("Left"/"Right", from the camera's point of view) has its own confidence. Below is the raw list for the first detected hand — exactly what the model returned.

Detect a hand to see its 21 landmark coordinates.

Why it matters

Hand tracking used to need a depth camera or a native SDK. HandLandmarker turns "where are the fingers?" into a local function call in any browser — private, offline, and fast enough for a live camera on a phone.

Use cases

Basics

Landmark a sample hand and read all 21 coordinates — feel what the model returns.

Practical

A gesture-driven UI: count raised fingers and recognise simple hand signs, live.

Wild

Air-draw — pinch your finger and thumb to paint on the canvas with your webcam.

Multi-model

Hand + Pose together: full-body skeleton with detailed finger tracking on top.

How the API works

MediaPipe Tasks loads a .task bundle and gives you a landmarker you call per image or per video frame:

import { FilesetResolver, HandLandmarker } from "@mediapipe/tasks-vision";

const vision = await FilesetResolver.forVisionTasks(".../wasm");
const hand = await HandLandmarker.createFromOptions(vision, {
  baseOptions: {
    modelAssetPath: ".../hand_landmarker.task",  // ~8 MB
    delegate: "GPU",                              // or "CPU"
  },
  numHands: 2,
  runningMode: "IMAGE",                           // or "VIDEO"
});

const result = hand.detect(imageElement);
// result.landmarks  → [ [ {x,y,z} × 21 ], … ]  (normalized 0–1)
// result.handedness → [ [ { categoryName:"Right", score } ], … ]

This page loads the model through the showcase's shared auto-init loader and runs the landmarker inside a dedicated Web Worker — the main thread grabs each frame with createImageBitmap, transfers it to the worker (one frame in flight), and only draws the returned landmarks, so a live camera stays smooth. For the webcam it switches the task to VIDEO mode and calls detectForVideo per frame off the main thread.

References