โ† All models

keypoint-detection ยท vision ยท WASM ยท ~87 MB

ViTPose โ€” a plain transformer that finds 17 body keypoints

ViTPose skips the hand-built pose architecture: it's a plain Vision Transformer with a tiny decoder head. Give it a person and it emits one heatmap per keypoint โ€” the joint is simply the hottest cell. This is a top-down estimator (a different design from the MediaPipe PoseLandmarker): feed it a person box, get back 17 COCO keypoints and a skeleton, all on your device.

At a glance

Modelonnx-community/vitpose-base-simple
Task / classkeypoint-detection โ€” VitPoseForPoseEstimation
ArchitectureViT-Base backbone + classic decoder head โ†’ 17 keypoint heatmaps
OutputPer person: 17 COCO keypoints (x, y in image pixels) + a confidence each; raw 64ร—48 heatmaps
ApproachTop-down โ€” needs a person box (a full-image box, or one per person from a detector)
Quantizationq8 (8-bit) ONNX
BackendWebAssembly (runs anywhere; no WebGPU needed)
Download~87 MB, cached after first load
LicenseApache-2.0 (ViTPose, usyd-community / onnx-community export)
Web APIsWebAssembly, Web Workers, Canvas, FileReader โ€” all Baseline widely available

Run it

Pick a sample or drop a photo of a person, hit Detect pose, and the 17-point skeleton is drawn straight onto the canvas. The slider hides low-confidence joints.

Drop a photo of a person here, or click to choose
A person in a yoga warrior pose on a beach An athlete crouching to tie a shoe Football players on a pitch
0.30

See inside โ€” heatmap โ†’ arg-max

ViTPose doesn't regress coordinates directly. For each of the 17 keypoints it outputs a small 64ร—48 heatmap โ€” a probability surface over the person box โ€” and the keypoint is the arg-max (the single hottest cell), rescaled back to image pixels. The confidence is that peak value. Pick a joint to see its real heatmap and where the peak landed.

Detect a pose to see its keypoint heatmaps.

Why it matters

Pose estimation used to mean a depth camera or a cloud vision API. ViTPose shows that a plain transformer โ€” the same ViT family behind image classification โ€” is a state-of-the-art pose estimator with almost no task-specific machinery. That makes "where is this person's body?" a local function call, private and offline.

Use cases

Basics

Pose a person and read all 17 COCO keypoints, confidences, and the box ViTPose worked from.

Practical

Form & posture analysis โ€” compute joint angles (elbow, knee, back) and get plain-language feedback.

Wild

A stick-figure puppet: drop a photo and drive a clean skeleton avatar from the detected joints.

Multi-model

Detector โ†’ ViTPose: find every person with an object detector, then estimate each one's pose from its own crop.

How the API works

ViTPose isn't a one-line pipeline โ€” it's a model + image processor. You pass a person box; the processor crops and normalises, the model emits heatmaps, and the processor decodes them into keypoints:

import { AutoModel, AutoImageProcessor, RawImage } from "@huggingface/transformers";

const model = await AutoModel.from_pretrained(
  "onnx-community/vitpose-base-simple", { dtype: "q8" });        // ~87 MB, cached once
const processor = await AutoImageProcessor.from_pretrained(
  "onnx-community/vitpose-base-simple");

const image = await RawImage.read(url);
const boxes = [[[0, 0, image.width, image.height]]];             // [image][person][x,y,w,h]
const inputs = await processor(image, { boxes });
const { heatmaps } = await model(inputs);                         // [1, 17, 64, 48]
const [person] = processor.post_process_pose_estimation(heatmaps, boxes)[0];
// person.keypoints โ†’ [[x,y] ร— 17] in image pixels ยท person.scores โ†’ 17 confidences

This page runs exactly that in a Web Worker, and keeps the raw heatmaps tensor so "See inside" can show the arg-max decode. For multiple people, pass one box per person (see the multi-model demo).

References