Measured on device (edge-compat): Galaxy S26 · LiteRT 2.2.0 · GPU (ML Drift) · 5.71 ms p50 (2026-08-26); Galaxy S26 · LiteRT 2.2.0 · NPU (QNN/HTP) · 1.25 ms p50 (2026-08-26); Raspberry Pi 5 · LiteRT 2.2.0.dev20260804 · CPU/XNNPACK, 4 threads · 58.1 ms p50 (2026-08-31); browser · Chromium 151 on M4 Max · LiteRT.js 2.5.3 · WebGPU · 6.17 ms p50 · output matches CPU (2026-08-11). Record: https://github.com/john-rocky/edge-compat/blob/main/cards/rtmpose-hand/CARD.md

RTMPose-Hand — LiteRT (on-device 21-keypoint hand pose, fully-GPU)

RTMPose (mmpose, CSPNeXt + RTMCC/SimCC head) hand pose, converted to LiteRT and running fully on the CompiledModel GPU (ML Drift) on Android. The 21 standard hand keypoints (wrist + 4 joints × 5 fingers) for a single centered hand.

RTMPose-Hand — input | hand skeleton (on-device LiteRT GPU)

On-device (Pixel 8a, Tensor G3 — verified)

nodes on GPU 333 / 333 LITERT_CL (full residency)
inference ~4 ms (256×256)
size 28 MB (fp16)
accuracy device-vs-PyTorch SimCC corr 0.999, 21/21 keypoints
image[1,3,256,256] (ImageNet 0-255) →[GPU: CSPNeXt + RTMCC]→ simcc_x[1,21,512], simcc_y[1,21,512]

Minimal usage

Android (Kotlin, CompiledModel GPU)

val model = CompiledModel.create(context.assets, "rtmhand_fp16.tflite",
    CompiledModel.Options(Accelerator.GPU), null)
val inputs = model.createInputBuffers()
val outputs = model.createOutputBuffers()
inputs[0].writeFloat(chw)              // [1,3,256,256] mmpose mean/std (0-255 RGB), NCHW
model.run(inputs, outputs)
val simccX = outputs[0].readFloat()    // [1,21,512]
val simccY = outputs[1].readFloat()    // [1,21,512]; keypoint = argmax / 2

Python (desktop verification)

MEAN = np.array([123.675, 116.28, 103.53], np.float32)
STD  = np.array([58.395, 57.12, 57.375], np.float32)
import numpy as np
from PIL import Image
from ai_edge_litert.interpreter import Interpreter

img = Image.open("hand.jpg").convert("RGB").resize((256, 256))  # centered subject crop
x = ((np.asarray(img, np.float32) - MEAN) / STD).transpose(2, 0, 1)[None]

it = Interpreter(model_path="rtmhand_fp16.tflite"); it.allocate_tensors()
it.set_tensor(it.get_input_details()[0]["index"], x); it.invoke()
od = it.get_output_details()                                     # output 0 = simcc_x, 1 = simcc_y
sx = it.get_tensor(od[0]["index"])[0]                             # simcc_x [21,512]
sy = it.get_tensor(od[1]["index"])[0]                             # simcc_y [21,512]
kx, ky = sx.argmax(-1) / 2.0, sy.argmax(-1) / 2.0                 # 21 keypoints, px in 256x256
for i, (a, b) in enumerate(zip(kx, ky)):
    print(f"kp{i}: ({a:.1f}, {b:.1f})")

How it converts (litert-torch)

Identical RTMPose-family recipe (both numerically exact, no PixelShuffle since there's no neck):

  1. ScaleNorm (RMS) → SafeRMSNorm — fp16-overflow all-zero-head fix (scale x down by S=64 before squaring).
  2. GAU act@act BMM → broadcast-multiply + reduce-sum.

Result: banned ops NONE, all tensors ≤4D, tflite-vs-torch corr 1.0, device-vs-torch corr 0.999.

Preprocessing

Center-crop to square, resize to 256×256, ImageNet 0-255 normalize, NCHW. Top-down — one centered hand. SimCC argmax (÷ split=2) → pixel.

Performance

Measured on a Pixel 8a (Tensor G3, Android 16) with the standard TFLite benchmark_model tool — 10 warm-up runs then 50 timed runs, reported as the tool's mean.

Runtime Backend Graph on GPU Latency
LiteRT CompiledModel (LITERT_CL) GPU 333 / 333 ~4 ms
TFLite benchmark_model (TfLiteGpuDelegateV2) GPU (OpenCL) 333 / 333 21.7 ms
TFLite benchmark_model CPU (XNNPACK, 4 threads) — XNNPACK declined the graph

The two GPU rows are different runtimes, not a contradiction. The LITERT_CL figure is the one recorded when this model shipped, taken through LiteRT's own CompiledModel accelerator — the path the Kotlin sample app and the LiteRT API use. The TfLiteGpuDelegateV2 figure is the classic TFLite OpenCL delegate, measured with a tool anyone can download and re-run. They agree on how much of the graph the GPU takes; they disagree on speed, and the classic delegate is the slower of the two here. Read the TfLiteGpuDelegateV2 row as a reproducible floor, not as this model's speed on LiteRT.

XNNPACK declines these fp16 graphs — it reports failed to delegate DEPTHWISE_CONV_2D and then fails to allocate tensors — so there is no usable CPU number. Disabling XNNPACK falls back to reference kernels, which measured about 20× slower than the GPU on models of this size and would not represent CPU inference anyone would ship.

Snapdragon NPU (Hexagon)

The NPU is 4.56x faster than the GPU (1.25 ms against 5.71 ms) and loads 12.18x faster (117 ms against 1420 ms).

backend compiled inference (median / min) load
NPU (Hexagon v81) on-device JIT 1.25 ms / 1.23 ms 117 ms
GPU (Adreno) — 5.71 ms / 5.53 ms 1420 ms

Measured on a Samsung Galaxy S26 (Snapdragon 8 Elite Gen 5 / SM8850, Hexagon v81, Android 16) with LiteRT CompiledModel 2.2.0, one accelerator per process, 5 warm-up runs then N=50 timed runs, median reported. Every run held thermal status NONE throughout. Headroom 0.78–0.79, where 1.0 is the throttling threshold.

The NPU rows ran the published file unchanged. LiteRT compiled it for the Hexagon on the device at first load. That first compile took 1.0 s here. The load column above is the cached load every later run pays. Recipe and the runtime libraries it needs: NPU guide.

GPU wiring: GPU guide.

Raspberry Pi 5 (CPU)

Measured on a Raspberry Pi 5 Model B Rev 1.1 (8 GB, Raspberry Pi OS 64-bit) with the LiteRT benchmark_model tool from litert-cli-nightly 0.2.0.dev20260805: CPU inference (XNNPACK, 4 threads), 3 invocations per file of 10 warm-up plus 50 timed runs (the tool caps a phase at 150 s, so very slow graphs run fewer — the Runs column is the actual timed total). The latency is the median across invocations; the spread is the min–max over all timed runs. No thermal throttling occurred during these runs (vcgencmd get_throttled stayed 0x0).

File Inference (median) Spread (min–max) Runs Peak memory
rtmhand_fp16.tflite 58.1 ms 57.6–59.3 ms 150 138 MB

License

Apache-2.0. Upstream: open-mmlab/mmpose RTMPose-Hand.

Downloads last month
109
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including litert-community/RTMPose-Hand-LiteRT