keypoint-detection ยท vision ยท WASM ยท ~87 MB
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.
| Model | onnx-community/vitpose-base-simple |
|---|---|
| Task / class | keypoint-detection โ VitPoseForPoseEstimation |
| Architecture | ViT-Base backbone + classic decoder head โ 17 keypoint heatmaps |
| Output | Per person: 17 COCO keypoints (x, y in image pixels) + a confidence each; raw 64ร48 heatmaps |
| Approach | Top-down โ needs a person box (a full-image box, or one per person from a detector) |
| Quantization | q8 (8-bit) ONNX |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~87 MB, cached after first load |
| License | Apache-2.0 (ViTPose, usyd-community / onnx-community export) |
| Web APIs | WebAssembly, Web Workers, Canvas, FileReader โ all Baseline widely available |
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.
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.
| # | keypoint | confidence |
|---|
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.
Pose a person and read all 17 COCO keypoints, confidences, and the box ViTPose worked from.
Form & posture analysis โ compute joint angles (elbow, knee, back) and get plain-language feedback.
A stick-figure puppet: drop a photo and drive a clean skeleton avatar from the detected joints.
Detector โ ViTPose: find every person with an object detector, then estimate each one's pose from its own crop.
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).