Models · Pose estimation

HRNet

HRNet (w32, w48; 256x192 and 384x288): top-down 2D human pose with a high-resolution CNN and heatmap decoding, the COCO checkpoints of OpenMMLab's mmpose. Apache-2.0.

stable Fork of open-mmlab/mmpose@5408bc7 · backends: portable, kernels

Checkpoint

Paper 2019 Added in 0.2.0 Evaluated with 0.2.0

Kernels, RTX 5060 Ti 16 GB 9.75 ms 1080x1920, fp16
vs the faster original 18.0× original fp32: 176 ms
Peak memory 155 MiB original: 270 MiB
Accuracy vs original fp32 +1.0 kernels keypoint AP, COCO val2017 (75.5 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("hrnet-w32")  # 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 hrnet-w32

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 fp32Peak memory
allocated / reserved
Load (s)First call (s)
Original fp32mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed callfp32 176–270 MiB/324 MiB5.40.46
Original fp16torch.autocast(float16) around the call; mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed callfp16 1900.93×336 MiB/398 MiB0.50.38
Portable fp32fp32not measured ––––
Portablefp16 20.38.7×195 MiB/238 MiB0.50.36
Kernelsfp16 9.7518×155 MiB/194 MiB1.30.26
Portable + torch.compile 9.9418×178 MiB/214 MiB21 (build)–
TensorRT fp16network on person crops onlyfp16 5.1834×126 MiBenginenot comparable26 (build)–

Measured on RTX 5060 Ti 16 GB, torch 2.14.1+cu130, 2026-11-11 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. 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-12Originalfp32304 2,014 MiB process–1080x1920
Portablefp16122 1,675 MiB processmatches1080x1920
Portablefp32141 1,748 MiB processmatches1080x1920
Kernelsfp16not implemented–1080x1920

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

hrnet-w32-coco-256x192.pth 122 MB· hosted on OpenMMLab

fastforks downloads and checks these files on first use (fastforks download hrnet-w32).

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 fp32fp3275.5 reference 5000 –
Original fp16fp1675.5 +0.0 5000 –
Portable fp32not measured
Portablefp1676.5 +1.0 5000 –
Kernelsfp1676.5 +1.0 5000 –

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-11; portable, kernels: RTX 5060 Ti, torch 2.14.1+cu130, fastforks 87e1be16, 2026-11-11.

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| <= 4.6e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.32 and p99 <= 4.8 (absolute error of the output keypoints).

CheckToleranceMeasured
CPU fp32, max |diff|≤ 0.000046 not recorded
GPU default dtypes, mean |diff|≤ 0.32 0
GPU default dtypes, p99 |diff|≤ 4.8 0.00003
gpu_min_score≤ 0.3 not recorded

Recorded for hrnet-w32 on RTX 5060 Ti, torch 2.14.1+cu130, 2026-11-11, with these kernels: cudnn_haccfvm_convfvm_extrafvm_mbfvm_r3

Details

HRNet (Sun et al. 2019): top-down 2D human pose with a high-resolution CNN that keeps a 1/4-scale branch through the whole network and repeatedly exchanges features with three coarser parallel branches; a 1 x 1 conv on the finest branch gives one heatmap per keypoint, decoded as its maximum moved a quarter heatmap pixel towards the larger neighbour. The mmpose COCO checkpoints (w32 / w48, 256 x 192 and 384 x 288) return the 17 COCO keypoints. Takes person boxes (e.g. from `fastforks.detection`) and crops each at the network size; vendored from mmpose (no mmpose / mmcv dependency). 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 (470 MiB allocated)
Options
  • flip_test=false· changes the output
Outputs
keypoints, keypoint_scores, boxes, scores
CUDA kernels
  • cudnn_haccconvolutions with fp16 accumulation (cuDNN)
  • fvm_convfused convolutions for image classifiers
  • fvm_extrafused transformer row operations (rotary split, SwiGLU with LayerNorm)
  • fvm_mbfused MBConv blocks (MobileNet and EfficientNet families)
  • fvm_r3further fused classifier blocks
Apple (MPS)
fp32, fp16
Full reference, generated from the repository

HRNet (w32, w48; 256x192 and 384x288): top-down 2D human pose with a high-resolution CNN and heatmap decoding, the COCO checkpoints of OpenMMLab's mmpose. Apache-2.0.

Commercial use: yes.

variantinputbackendtime (ms)peak memory (MiB, allocated / reserved)
hrnet-w32synthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
176
190
20.3
9.75
9.94
5.18 (network on person crops only)
270 / 324
336 / 398
195 / 238
155 / 194
178 / 214
216 / 254
hrnet-w32-384synthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
216
190
39.2
19.7
19.6
10.7 (network on person crops only)
682 / 762
653 / 760
341 / 414
250 / 294
211 / 234
296 / 320
hrnet-w48synthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
200
206
32.0
15.6
21.2
9.46 (network on person crops only)
879 / 1022
440 / 462
262 / 302
222 / 262
245 / 282
346 / 388
hrnet-w48-384synthetic (1080x1920)original (fp32)
original
portable
kernels
portable + torch.compile
TensorRT fp16
276
245
70.7
34.2
46.0
22.3 (network on person crops only)
841 / 928
1014 / 1082
408 / 458
317 / 360
278 / 300
427 / 454
Details
  • Original code: https://github.com/open-mmlab/mmpose at 5408bc76f5b8
  • Code licence: Apache-2.0 (permissive); files: LICENSE
  • Weights licence: Apache-2.0
  • Licence evidence: https://github.com/open-mmlab/mmpose/blob/5408bc76f5b848cf925a0d1857899011d8c5b497/README.md#license
  • Training data: COCO 2017 (train, instance annotations), ImageNet-1k (ILSVRC 2012 classification) (COCO 2017 keypoints; the HRNet backbone was initialised from ImageNet-1k classification weights)
  • Options: flip_test = False
  • Kernel libraries: cudnn_hacc, fvm_conv, fvm_extra, fvm_mb, fvm_r3
  • Variants: hrnet-w32, hrnet-w32-384, hrnet-w48, hrnet-w48-384
  • 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): hrnet-w32 3000x4000 (0.5 GiB peak allocated, 0.5 reserved); hrnet-w32-384 3000x4000 (0.7 GiB peak allocated, 0.8 reserved); hrnet-w48 3000x4000 (0.5 GiB peak allocated, 0.6 reserved); hrnet-w48-384 3000x4000 (0.8 GiB peak allocated, 0.9 reserved)
  • hrnet-w32 1080x1920, first call: portable + torch.compile 21 s (cold Inductor cache), TensorRT fp16 26 s (ONNX + engine).
  • hrnet-w32-384 1080x1920, first call: portable + torch.compile 21 s (cold Inductor cache), TensorRT fp16 26 s (ONNX + engine).
  • hrnet-w48 1080x1920, first call: portable + torch.compile 21 s (cold Inductor cache), TensorRT fp16 27 s (ONNX + engine).
  • hrnet-w48-384 1080x1920, first call: portable + torch.compile 23 s (cold Inductor cache), TensorRT fp16 28 s (ONNX + engine).
  • hrnet-w32 original (fp32) 1080x1920: mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w32 original 1080x1920: torch.autocast(float16) around the call; mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w32-384 original (fp32) 1080x1920: mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w32-384 original 1080x1920: torch.autocast(float16) around the call; mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w48 original (fp32) 1080x1920: mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w48 original 1080x1920: torch.autocast(float16) around the call; mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w48-384 original (fp32) 1080x1920: mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w48-384 original 1080x1920: torch.autocast(float16) around the call; mmpose 1.3.2 inference_topdown (CPU cv2 crop, network, heatmap decode; flip_test off), all in the timed call
  • hrnet-w32 load / first call: original 0.45 s / 0.383 s, portable 0.25 s / 0.564 s, kernels 2.53 s / 0.285 s
  • hrnet-w32-384 load / first call: original 0.42 s / 0.225 s, portable 0.25 s / 0.567 s, kernels 2.04 s / 0.254 s
  • hrnet-w48 load / first call: original 0.72 s / 0.225 s, portable 0.72 s / 0.351 s, kernels 1.76 s / 0.199 s
  • hrnet-w48-384 load / first call: original 0.53 s / 0.242 s, portable 0.39 s / 0.355 s, kernels 2.16 s / 0.212 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
hrnet-w32COCO val2017, ground-truth person boxes, keypoint AP75.575.576.576.5
hrnet-w32-384COCO val2017, ground-truth person boxes, keypoint AP76.776.777.677.7
hrnet-w48COCO val2017, ground-truth person boxes, keypoint AP76.576.676.776.7
hrnet-w48-384COCO val2017, ground-truth person boxes, keypoint AP77.077.077.777.6

Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks 87e1be16, 2026-11-11.

Parity

CPU, float32: max |diff| <= 4.6e-05 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.32 and p99 <= 4.8 (absolute error of the output keypoints).

variantkernels error vs original, mean / p99GPU, torchkernels used
hrnet-w320.0 / 3e-05RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
hrnet-w32-3840.10128 / 2.15711RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
hrnet-w480.0 / 3e-05RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c:sm_120
hrnet-w48-3840.20784 / 3.15067RTX 5060 Ti, torch 2.14.1+cu130cudnn_hacc@cudnn92400, fvm_conv@f1d064e539e1:sm_120, fvm_extra@3208ce525a91:sm_120, fvm_mb@720dd3f29bf7:sm_120, fvm_r3@f54eb890e23c: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).