Models · Pose estimation

ViTPose / ViTPose++

ViTPose and ViTPose++ (base, small, large, huge): top-down 2D human pose with a plain vision transformer, from the weights published by the University of Sydney on Hugging Face. Apache-2.0.

stable Fork of huggingface/[email protected] · backends: portable, kernels

Checkpoint

Paper 2022 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 12.1 ms 1080x1920, fp16
vs the faster original 9.0× original fp16: 109 ms
Peak memory 295 MiB original: 828 MiB
Accuracy vs original fp32 ±0.0 kernels keypoint AP, COCO val2017 (76.3 original)

Use it

pip install fastforks

Lean install with only what this model needs: pip install fastforks-core

from fastforks import pose

model = pose.load("vitpose-base-simple")  # kernels on a supported GPU, else portable PyTorch
result = model(image, boxes=...)
result.keypoints  # also: keypoint_scores, boxes, scores
result.backend  # what ran: mode, device, dtype, kernels
fastforks bench vitpose-base-simple

Times the model on this machine. load(…, mode="portable") or mode="kernels" picks a backend; usage guide.

Speed and memory

Every backend on one GPU (RTX 5060 Ti 16 GB) and the same input, the authors’ code included. Kernels runs fp16. Portable runs fp16 on CUDA.

Input: synthetic, 1080x1920 (the task’s standard size)

BackenddtypeTime per call (ms)vs original fp16Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call; ≈ 88.1 ms of it CPU crop + decodefp32 1450.75×667 MiB/702 MiB0.40.15
Original fp16torch.autocast(fp16) around the call; transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call; ≈ 88.8 ms of it CPU crop + decodefp16 109–828 MiB/962 MiB0.10.17
Original fp32, network onlycrop and decode not timedfp32 56.91.9×667 MiB/682 MiB–0.24
Original fp16, network onlycrop and decode not timedfp16 20.35.4×828 MiB/962 MiB–0.38
Portable fp32fp32not measured ––––
PortableGPU crop 2.48 · network 16.7 · decode + map back 0.883 msfp16 18.16.0×312 MiB/342 MiB0.50.47
KernelsGPU crop 2.48 · network + decode 11.6 · map back 0.0870 msfp16 12.19.0×295 MiB/344 MiB0.50.51
Portable + torch.compile 16.06.8×590 MiB/622 MiB12 (build)–
TensorRT fp16network on person crops onlyfp16 9.3612×268 MiBenginenot comparable35 (build)–
TensorRT + our crop and decodeestimate: engine 9.36 + portable GPU crop 2.48 + decode 0.883 msfp16 12.78.6×–––

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-10 to 2026-11-16. First call, 3 warm-up, peak reset, median of 3 rounds x median of 5. Ratios divide two times of this table (same GPU, same input). Original fp16 is the authors’ own precision option, else torch.autocast. “Network only” times the original’s network on the same crops, batched as one call; the original rows above also include its own crop pipeline and decode, as ours do. The splits under Portable and Kernels come from a separate run that times each step on its own (synchronised in between); the TensorRT engine covers the network only, so its full call is an estimate with our crop and decode added. torch.compile and TensorRT: build time instead of load time. TensorRT memory (engine, not comparable) is the GPU memory the engine took, read from the driver because TensorRT allocates outside PyTorch, so it can't be compared with the PyTorch peaks of the other rows.

Other devices

DeviceBackenddtypems / callPeak memoryOutput vs referenceInput
Apple M1 Pro 16 GB MPS, torch 2.14.1, 2026-11-12Originalfp32254 2,270 MiB process–1080x1920
Portablefp16186 1,910 MiB processmatches1080x1920
Portablefp32196 2,073 MiB processmatches1080x1920
Kernelsfp16160 1,977 MiB processmatches1080x1920

CUDA memory is torch’s peak allocated / reserved; Apple has no such counter, so the Mac rows show the process footprint (weights, Python and torch included). “Output vs reference” compares the device’s output with the stored golden output under the card’s tolerance; – = not checked on that device. Kernels “not implemented” = no kernels for this model on that backend yet: it runs portable there.

Licence and weights

Commercial use allowed

Code
Apache-2.0 LICENSE
Weights
Apache-2.0 source
Training data

Our reading of the licences, not legal advice.

Weights

vitpose-base-simple-85375373.safetensors 344 MB· hosted on Hugging Face

fastforks downloads and checks these files on first use (fastforks download vitpose-base-simple).

Accuracy

The test set through the authors’ code and through ours: same checkpoint, same protocol. The distance between the original’s fp32 and fp16 runs is what half precision alone costs; our runs should stay within it.

COCO val2017

ground-truth person boxes, keypoint AP

Rundtypekeypoint AP ↑Δ keypoint AP vs fp32 originalimagesms / image
Original fp32fp3276.3 reference 5000 –
Original fp16fp1676.3 −0.1 5000 –
Portable fp32not measured
Portablefp1676.3 −0.1 5000 5.12
Kernelsfp1676.3 ±0.0 5000 4.47

Top-down on the ground-truth person boxes (non-crowd, at least one labelled keypoint), no flip test; people ranked by the mean of their 17 keypoint scores (not mmpose's rescoring and OKS-NMS), so not the papers' AP; pycocotools OKS AP; whole-body models scored on their 17 body keypoints. Original = the authors’ code, same checkpoint and protocol. Measured on original fp32, original fp16: RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-13; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 2241b095+unc, 2026-11-09.

Closeness to the original

Beyond the test-set scores: the raw output of ours against the original’s fp32 output on the same input, pixel by pixel. CPU, float32: max |diff| <= 0.005 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.13 and p99 <= 0.75 (absolute error of the output keypoints).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.005 not recorded
GPU default dtypes, mean |diff|≤ 0.13 0.0403
GPU default dtypes, p99 |diff|≤ 0.75 0.27042
gpu_min_score≤ 0.3 not recorded

Recorded for vitpose-base-simple on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-09, with these kernels: fvm_conv

Details

ViTPose (Xu et al. 2022): top-down 2D human pose with a plain ViT encoder and a light deconvolution (or bilinear) decoder; ViTPose++ trains one backbone on six pose datasets with per-dataset MLP experts. Takes person boxes (e.g. from `fastforks.detection`), crops each at 256 x 192 and returns the 17 COCO keypoints with DARK sub-pixel decoding. The portable `module()` maps crops to heatmaps.

Input / output
Input: one RGB image and a box per person. Output: keypoints with confidence scores for every person.
Input size
any H x W >= 32, padded to a multiple of 32; tested up to 3000x4000 (4,627 MiB allocated)
Options
  • fp32_accumulate=false
Outputs
keypoints, keypoint_scores, boxes, scores
Checkpoint
decoder="simple"
CUDA kernels
  • fvm_convfused convolutions for image classifiers
Apple (MPS)
pose_metalMetal: top-down pose decoders and crops. fp32, fp16
Full reference, generated from the repository

ViTPose and ViTPose++ (base, small, large, huge): top-down 2D human pose with a plain vision transformer, from the weights published by the University of Sydney on Hugging Face. Apache-2.0.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
vitpose-base-simplesynthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
145
109
18.1
12.1
16.0
9.36 (network on person crops only)
667 / 702
828 / 962
312 / 342
295 / 344
590 / 622
499 / 550
vitpose-basesynthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
139
105
17.8
12.0
16.4
8.88 (network on person crops only)
592 / 602
713 / 762
299 / 322
274 / 364
597 / 622
473 / 516
vitpose-plus-smallsynthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
120
104
7.83
6.05
7.54
3.39 (network on person crops only)
298 / 310
312 / 376
164 / 196
145 / 198
472 / 496
214 / 256
vitpose-plus-basesynthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
162
113
17.9
11.9
16.4
8.87 (network on person crops only)
729 / 742
918 / 1002
299 / 322
274 / 344
597 / 622
473 / 516
vitpose-plus-largesynthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
331
165
53.7
33.2
46.9
29.3 (network on person crops only)
2111 / 2144
2873 / 3004
1014 / 1062
706 / 764
1014 / 1062
1312 / 1338
vitpose-plus-hugesynthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
610
242
102
62.5
92.9
58.7 (network on person crops only)
4100 / 4124
5732 / 5846
1382 / 1424
1351 / 1406
1641 / 1682
2595 / 2654
Details
  • Original code: https://github.com/huggingface/transformers at v4.57.1
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: Apache-2.0
  • Licence evidence: https://huggingface.co/usyd-community/vitpose-base-simple (model card licence)
  • Training data: COCO 2017 (train, instance annotations), ImageNet-1k (ILSVRC 2012 classification) (COCO 2017 keypoints; the ViT was initialised from MAE ImageNet-1k pre-training)
    • vitpose-plus-small: COCO 2017 (train, instance annotations), AI Challenger human keypoints (2017), MPII Human Pose, AP-10K (animal pose), APT-36K (animal pose tracking), COCO-WholeBody, ImageNet-1k (ILSVRC 2012 classification) (ViTPose++: one backbone trained jointly on COCO, AI Challenger, MPII, AP-10K, APT-36K and COCO-WholeBody (one MLP expert per dataset), from MAE ImageNet-1k pre-training; only the COCO expert and head are used)
    • vitpose-plus-base: COCO 2017 (train, instance annotations), AI Challenger human keypoints (2017), MPII Human Pose, AP-10K (animal pose), APT-36K (animal pose tracking), COCO-WholeBody, ImageNet-1k (ILSVRC 2012 classification) (ViTPose++: one backbone trained jointly on COCO, AI Challenger, MPII, AP-10K, APT-36K and COCO-WholeBody (one MLP expert per dataset), from MAE ImageNet-1k pre-training; only the COCO expert and head are used)
    • vitpose-plus-large: COCO 2017 (train, instance annotations), AI Challenger human keypoints (2017), MPII Human Pose, AP-10K (animal pose), APT-36K (animal pose tracking), COCO-WholeBody, ImageNet-1k (ILSVRC 2012 classification) (ViTPose++: one backbone trained jointly on COCO, AI Challenger, MPII, AP-10K, APT-36K and COCO-WholeBody (one MLP expert per dataset), from MAE ImageNet-1k pre-training; only the COCO expert and head are used)
    • vitpose-plus-huge: COCO 2017 (train, instance annotations), AI Challenger human keypoints (2017), MPII Human Pose, AP-10K (animal pose), APT-36K (animal pose tracking), COCO-WholeBody, ImageNet-1k (ILSVRC 2012 classification) (ViTPose++: one backbone trained jointly on COCO, AI Challenger, MPII, AP-10K, APT-36K and COCO-WholeBody (one MLP expert per dataset), from MAE ImageNet-1k pre-training; only the COCO expert and head are used)
  • Options: fp32_accumulate = False (precision only)
  • Kernel libraries: fvm_conv
  • Variants: vitpose-base-simple, vitpose-base, vitpose-plus-small, vitpose-plus-base, vitpose-plus-large, vitpose-plus-huge
  • Outputs: keypoints, keypoint_scores, boxes, scores; label_set: coco-keypoints-17
  • Input size: any H x W >= 32, padded to a multiple of 32
  • Tested up to (portable, fp16, RTX 5060 Ti 16 GB): vitpose-base-simple 3000x4000 (4.5 GiB peak allocated, 4.8 reserved); vitpose-base 3000x4000 (4.5 GiB peak allocated, 4.8 reserved); vitpose-plus-small 3000x4000 (4.4 GiB peak allocated, 4.6 reserved); vitpose-plus-base 3000x4000 (4.5 GiB peak allocated, 4.8 reserved); vitpose-plus-large 3000x4000 (4.9 GiB peak allocated, 5.2 reserved); vitpose-plus-huge 3000x4000 (5.5 GiB peak allocated, 5.7 reserved)
  • vitpose-base-simple 1080x1920, first call: portable + torch.compile 12 s (cold Inductor cache), TensorRT fp16 35 s (ONNX + engine).
  • vitpose-base 1080x1920, first call: portable + torch.compile 11 s (cold Inductor cache), TensorRT fp16 36 s (ONNX + engine).
  • vitpose-plus-small 1080x1920, first call: portable + torch.compile 11 s (cold Inductor cache), TensorRT fp16 38 s (ONNX + engine).
  • vitpose-plus-base 1080x1920, first call: portable + torch.compile 11 s (cold Inductor cache), TensorRT fp16 35 s (ONNX + engine).
  • vitpose-plus-large 1080x1920, first call: portable + torch.compile 18 s (cold Inductor cache), TensorRT fp16 39 s (ONNX + engine).
  • vitpose-plus-huge 1080x1920, first call: portable + torch.compile 21 s (cold Inductor cache), TensorRT fp16 47 s (ONNX + engine).
  • vitpose-base-simple original (fp32) 1080x1920: transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-base-simple original 1080x1920: torch.autocast(fp16) around the call; transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-base original (fp32) 1080x1920: transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-base original 1080x1920: torch.autocast(fp16) around the call; transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-small original (fp32) 1080x1920: transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-small original 1080x1920: torch.autocast(fp16) around the call; transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-base original (fp32) 1080x1920: transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-base original 1080x1920: torch.autocast(fp16) around the call; transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-large original (fp32) 1080x1920: transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-large original 1080x1920: torch.autocast(fp16) around the call; transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-huge original (fp32) 1080x1920: transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-plus-huge original 1080x1920: torch.autocast(fp16) around the call; transformers 4.57.1 VitPoseImageProcessor (CPU crop) + VitPoseForPoseEstimation + post_process_pose_estimation, all in the timed call
  • vitpose-base-simple load / first call: original 0.15 s / 0.17 s, portable 0.4 s / 0.408 s, kernels 1.04 s / 0.41 s
  • vitpose-base load / first call: original 0.16 s / 0.328 s, portable 0.73 s / 0.369 s, kernels 0.71 s / 0.346 s
  • vitpose-plus-small load / first call: original 0.15 s / 0.119 s, portable 0.81 s / 0.461 s, kernels 1.09 s / 0.503 s
  • vitpose-plus-base load / first call: original 0.19 s / 0.121 s, portable 0.65 s / 0.345 s, kernels 1.1 s / 0.343 s
  • vitpose-plus-large load / first call: original 0.41 s / 0.166 s, portable 1.5 s / 0.412 s, kernels 1.63 s / 0.407 s
  • vitpose-plus-huge load / first call: original 0.65 s / 0.251 s, portable 2.69 s / 0.438 s, kernels 2.26 s / 0.397 s
  • Protocol, first call, 3 warm-up, peak reset, median of 3 rounds x median of 5

Measured

Top-down on the ground-truth person boxes (non-crowd, at least one labelled keypoint), no flip test; people ranked by the mean of their 17 keypoint scores (not mmpose's rescoring and OKS-NMS), so not the papers' AP; pycocotools OKS AP; whole-body models scored on their 17 body keypoints. Original = the original code named under Details, same checkpoint and protocol.

variantdatasetoriginal fp32original fp16portablekernelsnote
vitpose-base-simpleCOCO val2017, ground-truth person boxes, keypoint AP76.376.276.376.3
vitpose-baseCOCO val2017, ground-truth person boxes, keypoint AP76.476.476.476.4
vitpose-plus-smallCOCO val2017, ground-truth person boxes, keypoint AP76.876.876.876.8
vitpose-plus-baseCOCO val2017, ground-truth person boxes, keypoint AP78.678.678.678.6
vitpose-plus-largeCOCO val2017, ground-truth person boxes, keypoint AP80.680.680.580.5
vitpose-plus-hugeCOCO val2017, ground-truth person boxes, keypoint AP81.081.080.980.9

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 2241b095+uncommitted, 2026-11-09.

Parity

CPU, float32: max |diff| <= 0.005 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.13 and p99 <= 0.75 (absolute error of the output keypoints).

variantkernels error vs original, mean / p99GPU, torchkernels used
vitpose-base-simple0.0403 / 0.27042RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120
vitpose-base0.02513 / 0.17409RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120
vitpose-plus-small0.02359 / 0.11659RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120
vitpose-plus-base0.08143 / 0.49756RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120
vitpose-plus-large0.02603 / 0.09324RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120
vitpose-plus-huge0.01678 / 0.09697RTX 5060 Ti, torch 2.14.1+cu130fvm_conv@f1d064e539e1:sm_120

Example output

One fixed input through this checkpoint, the same for every model of the task (kernels · float16 · NVIDIA GeForce RTX 5060 Ti).

Input
Output
Astronaut Eileen Collins, input
Input · 100%

Input: Astronaut Eileen Collins, NASA (public domain).