keypoint-detection Β· vision Β· WASM Β· ~13 MB
YOLOv8-pose is a single-stage pose estimator: one forward pass over the whole image returns a box, a confidence, and 17 COCO keypoints for every person at once β so it poses a whole crowd without a separate detector. That's a different design from the top-down ViTPose demo (which needs a person box per crop) and from MediaPipe BlazePose. At ~13 MB it runs on the universal WebAssembly/CPU path β no WebGPU, no cloud, all on your device.
| Model | Xenova/yolov8n-pose β ONNX export of Ultralytics YOLOv8n-pose |
|---|---|
| Task | keypoint-detection β single-stage detector + pose head |
| Architecture | YOLOv8n backbone/neck + a pose head β one [1, 56, 8400] tensor (4 box + 1 conf + 17Γ3 keypoints per anchor) |
| Output | Per person: a box, a confidence, and 17 COCO keypoints (x, y in image pixels + a visibility each) |
| Approach | Bottom-up single-stage β finds and poses every person in one pass (multi-person, no separate detector) |
| Quantization | fp32 (onnx/model.onnx) β decoded with Non-Max-Suppression |
| Runtime | onnxruntime-web (raw ONNX Runtime Web) β no transformers.js YOLO class exists |
| Backend | WebAssembly (runs anywhere; no WebGPU needed) |
| Download | ~13 MB, cached after first load |
| License | AGPL-3.0 (Ultralytics YOLOv8 β same family/license as the built YOLOv10 & YOLO11 demos) |
| Web APIs | WebAssembly, Web Workers, OffscreenCanvas, Canvas, FileReader β all Baseline widely available |
Pick a sample or drop a photo, hit Detect poses, and every person's 17-point skeleton is drawn straight onto the canvas. The sliders set the confidence threshold and toggle boxes.
Before Non-Max-Suppression, YOLOv8 scores 8400 anchor points across three grids. This heatmap is the person-confidence over the largest 80Γ80 grid β literally where the network "sees" a body. Bright cells become the boxes that survive NMS; per-person keypoint confidences are on the right.
| person | score | visible joints |
|---|
A single-stage pose model turns "where is everyone and how are they standing?" into one cheap, private, offline function call. Because detection and pose are fused, a crowded scene costs one pass, not one-per-person β ideal for real-time and mobile.
Pose everyone in a photo and read each person's box, confidence, and 17 COCO keypoints.
Form & posture coach β compute joint angles (elbow, knee, back) and get plain-language feedback.
A stick-figure puppet studio: drive clean skeleton avatars from any photo β or go live with your webcam.
Pose β CLIP: pose everyone, crop each person, and let CLIP zero-shot label what they're doing.
There's no transformers.js YOLO class, so this page runs the ONNX graph directly with onnxruntime-web and does the two pieces a pipeline would own β letterbox in, decode + NMS out:
import * as ort from "onnxruntime-web";
const session = await ort.InferenceSession.create(modelBytes); // ~13 MB, cached once
// letterbox the image to 640Γ640 (aspect-preserving pad, /255, CHW, RGB) β Float32Array
const input = new ort.Tensor("float32", chw, [1, 3, 640, 640]);
const { output0 } = await session.run({ images: input }); // [1, 56, 8400]
// per anchor: [0..3]=box cx,cy,w,h Β· [4]=conf Β· [5..55]=17Γ(x,y,visibility), all in 640 space
// filter by conf, run Non-Max-Suppression, then unpad/unscale back to source pixels.
This page runs exactly that in a Web Worker (with the letterbox on an OffscreenCanvas), and returns the raw objectness grid so "See inside" can show the pre-NMS detections. Multiple people come out of the single pass automatically.