|
Download README.md from fastforks/rtmo: direct link, hf CLI and curl.
- Browser
- Download file 9.19 kB
-
https://huggingface.co/fastforks/rtmo/resolve/main/README.md
- Command line
-
hf download hf://fastforks/rtmo/README.md
-
curl -L -o README.md https://huggingface.co/fastforks/rtmo/resolve/main/README.md
9.19 kB
| library_name: "fastforks" | |
| pipeline_tag: "keypoint-detection" | |
| license: "apache-2.0" | |
| tags: | |
| - "pose" | |
| - "pose-estimation" | |
| - "human-pose-estimation" | |
| - "keypoint-detection" | |
| - "cuda" | |
| - "pytorch" | |
| - "fastforks" | |
| - "fastforks-card" | |
| # RTMO (fastforks) | |
| RTMO (Lu et al. 2024): real-time one-stage multi-person 2D pose from OpenMMLab. A YOLOX-style CSPDarknet backbone, a hybrid encoder neck (one transformer layer on the coarsest map) and a head that predicts, per grid cell, a person score, a box and a pose vector; a dynamic coordinate classifier turns each kept pose vector into the 17 COCO keypoints over 1D bins that span the person's box. Takes the whole image without person boxes or a separate detector: the backbone runs once per image, while decoding and NMS depend on the detections. The image is letterboxed to 640 x 640 (416 x 416 for `rtmo-t`); vendored from mmpose (no mmpose / mmcv dependency). The portable `module()` maps the letterboxed image to the head's per-cell outputs (decoding and NMS stay outside). | |
| This repo is the model card only: it holds no weights. fastforks downloads the authors' weights from the links below and checks them against the SHA-256 in the model card. Code: <https://github.com/kleinicke/fastforks>. Kernels for the `kernels` backend: <https://huggingface.co/fastforks/kernels>. Original code: <https://github.com/open-mmlab/mmpose> at `5408bc76f5b8`. | |
| Task: pose. Tier: stable. Outputs: `keypoints`, `keypoint_scores`, `boxes`, `scores`. Backends: `portable`, `kernels`. | |
| Input: one RGB image and a box per person. Output: keypoints with confidence scores for every person. | |
| ## Variants | |
| Weights are the authors' files (not hosted here). SHA-256 shortened to 12 hex digits; the full hashes are in [`card.toml`](https://github.com/kleinicke/fastforks/blob/main/src/fastforks/pose/models/rtmo/card.toml). | |
| | variant | weights (author link) | SHA-256 | weights licence | commercial use | | |
| |---|---|---|---|---| | |
| | `rtmo-l@1` | [rtmo-l-body7-640x640.pth](https://download.openmmlab.com/mmpose/v1/projects/rtmo/rtmo-l_16xb16-600e_body7-640x640-b37118ce_20231211.pth) | `b37118cee39b` | Apache-2.0 | yes | | |
| | `rtmo-m@1` | [rtmo-m-body7-640x640.pth](https://download.openmmlab.com/mmpose/v1/projects/rtmo/rtmo-m_16xb16-600e_body7-640x640-39e78cc4_20231211.pth) | `39e78cc4afed` | Apache-2.0 | yes | | |
| | `rtmo-s@1` | [rtmo-s-body7-640x640.pth](https://download.openmmlab.com/mmpose/v1/projects/rtmo/rtmo-s_8xb32-600e_body7-640x640-dac2bf74_20231211.pth) | `dac2bf749bbf` | Apache-2.0 | yes | | |
| | `rtmo-t@1` | [rtmo-t-body7-416x416.pth](https://download.openmmlab.com/mmpose/v1/projects/rtmo/rtmo-t_8xb32-600e_body7-416x416-f48f75cb_20231219.pth) | `f48f75cbd59d` | Apache-2.0 | yes | | |
| ## Licence | |
| Original-code strings, recorded as they are (research-use package; check them before any other use). Code: Apache-2.0. Licence files: `LICENSE`. | |
| Training data: COCO 2017 (train, instance annotations), AI Challenger human keypoints (2017), CrowdPose, MPII Human Pose, sub-JHMDB (J-HMDB), Halpe-FullBody, PoseTrack 2018 (body7: COCO, AI Challenger, CrowdPose, MPII, sub-JHMDB, Halpe and PoseTrack18 keypoints; the CSPDarknet backbone starts from a YOLOX COCO detection checkpoint). | |
| Licence evidence: <https://github.com/open-mmlab/mmpose/blob/5408bc76f5b848cf925a0d1857899011d8c5b497/README.md#license> | |
| ## Input size | |
| any H x W >= 32, padded to a multiple of 32 | |
| Tested up to (portable, fp16, RTX 5060 Ti 16 GB): `rtmo-l` 3000x4000 (0.5 GiB peak allocated, 0.6 reserved); `rtmo-m` 3000x4000 (0.5 GiB peak allocated, 0.5 reserved); `rtmo-s` 3000x4000 (0.5 GiB peak allocated, 0.5 reserved); `rtmo-t` 3000x4000 (0.4 GiB peak allocated, 0.5 reserved) | |
| ## Speed and memory | |
| ### Pose, synthetic, 1080x1920 | |
| | model | time (ms): original fp32 | original | portable | kernels | kernels speed-up: vs original | vs portable | peak memory (MiB, allocated / reserved): original | portable | kernels | | |
| | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | |
| | `rtmo-l` | 17.1 | 21.4 | 10.8 | 8.30 | 2.1x | 1.3x | 800 / 824 | 208 / 226 | 208 / 228 | | |
| | `rtmo-m` | 14.3 | 17.0 | 8.71 | 6.85 | 2.1x | 1.3x | 422 / 462 | 166 / 190 | 166 / 212 | | |
| | `rtmo-s` | 11.4 | 15.5 | 7.48 | 6.27 | 1.8x | 1.2x | 228 / 252 | 142 / 160 | 142 / 180 | | |
| | `rtmo-t` | 11.3 | 13.3 | 7.62 | 6.31 | 1.8x | 1.2x | 118 / 122 | 121 / 136 | 121 / 156 | | |
| ### Startup and first call | |
| | model | load (s): original | portable | kernels | first call (s): original | portable | kernels | | |
| | --- | --- | --- | --- | --- | --- | --- | | |
| | `rtmo-l` | 0.55 | 0.36 | 1.52 | 0.06 | 0.24 | 0.16 | | |
| | `rtmo-m` | 0.37 | 0.22 | 1.43 | 0.08 | 0.43 | 0.24 | | |
| | `rtmo-s` | 0.27 | 0.12 | 1.37 | 0.08 | 0.41 | 0.26 | | |
| | `rtmo-t` | 0.26 | 0.11 | 1.38 | 0.32 | 0.41 | 0.28 | | |
| ### torch.compile and TensorRT | |
| | model | input | time: portable | compile | TensorRT fp16 | kernels | preparation: compile (cold first call) | ONNX + engine build | peak MiB (alloc / reserved): portable | compile | kernels | TensorRT (engine + torch) | | |
| | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | |
| | `rtmo-l` | 1080x1920 | 10.8 ms | 7.07 ms | 2.90 ms (network on person crops only) | 8.30 ms | 18.9 s | 39.6 s | 208 / 226 | 192 / 224 | 208 / 228 | 277 / 306 | | |
| | `rtmo-m` | 1080x1920 | 8.71 ms | 4.99 ms | 2.03 ms (network on person crops only) | 6.85 ms | 18.0 s | 39.4 s | 166 / 190 | 146 / 170 | 166 / 212 | 194 / 232 | | |
| | `rtmo-s` | 1080x1920 | 7.48 ms | 3.35 ms | 1.21 ms (network on person crops only) | 6.27 ms | 14.6 s | 36.7 s | 142 / 160 | 121 / 156 | 142 / 180 | 133 / 164 | | |
| | `rtmo-t` | 1080x1920 | 7.62 ms | 3.30 ms | 0.886 ms (network on person crops only) | 6.31 ms | 15.6 s | 36.8 s | 121 / 136 | 111 / 134 | 121 / 156 | 112 / 150 | | |
| Fixed-size cells: time (ms) / peak allocated / peak reserved memory (MiB). | |
| Hardware, protocol and caveats: [benchmarks](https://github.com/kleinicke/fastforks/blob/main/docs/benchmarks.md) (RTX 5060 Ti 16 GB, sm_120). Original = the original code named above at the precision of portable (fp16, or `(fp32)` where fp16 is unsupported or not finite); original fp32 = its default fp32 run. Peak memory is the torch allocator's. | |
| ## Accuracy | |
| ### On public datasets | |
| Bottom-up on all 5,000 validation images, no ground-truth boxes; people ranked by their predicted person score, after model-specific decoding; pycocotools OKS AP. Bottom-up on the same every-tenth-image subset for all modes, ranked by predicted person score after model-specific decoding; pycocotools OKS AP. Original = the original code named under Details, same checkpoint and protocol. | |
| | variant | dataset | original fp32 | original fp16 | portable | kernels | note | | |
| |---|---|---|---|---|---|---| | |
| | `rtmo-t` | COCO val2017, predicted people, keypoint AP | 57.4 | 57.4 | 57.4 | 57.4 | | | |
| | `rtmo-t` | COCO val2017, every 10th image, predicted people, keypoint AP | 59.4 | 59.4 | 59.3 | 59.3 | | | |
| | `rtmo-s` | COCO val2017, predicted people, keypoint AP | 68.6 | 68.6 | 68.5 | 68.5 | | | |
| | `rtmo-s` | COCO val2017, every 10th image, predicted people, keypoint AP | 71.1 | 71.2 | 71.2 | 71.2 | | | |
| | `rtmo-m` | COCO val2017, predicted people, keypoint AP | 72.6 | 72.6 | 72.6 | 72.6 | | | |
| | `rtmo-m` | COCO val2017, every 10th image, predicted people, keypoint AP | 74.2 | 74.2 | 74.2 | 74.2 | | | |
| | `rtmo-l` | COCO val2017, predicted people, keypoint AP | 74.8 | 74.8 | 74.8 | 74.8 | | | |
| | `rtmo-l` | COCO val2017, every 10th image, predicted people, keypoint AP | 76.1 | 76.0 | 76.0 | 76.0 | | | |
| Measured on NVIDIA GeForce RTX 5060 Ti, torch 2.14.1+cu130, fastforks be54b8b0, 2026-11-11. | |
| ### Parity with the original code | |
| Every variant is checked against reference outputs of the original code at its pinned commit. CPU, float32: max |diff| <= 0.014 vs the original. GPU, float16 (the default), portable and kernels: mean |diff| <= 0.47 and p99 <= 9.8 (absolute error of the output `keypoints`). | |
| ## Limitations | |
| - module() exports the letterboxed-image network and raw per-cell head outputs; coordinate decoding and NMS remain outside the exported graph. | |
| - Float16 and float32 can retain different people near the score threshold. | |
| ## Usage | |
| ```python | |
| from fastforks import pose | |
| model = pose.load("rtmo-l") # mode="auto": the preferred backend from recorded measurements | |
| result = model("photo.jpg", boxes=[[x0, y0, x1, y1]]) # one box per person, or a fastforks.detection result | |
| result.keypoints, result.keypoint_scores # [P, K, 2] input pixels, [P, K] | |
| result.backend # what ran, e.g. Backend(mode='portable', device='cuda:0', dtype='float16') | |
| ``` | |
| Install with `pip install fastforks` (see <https://github.com/kleinicke/fastforks>). Other variants: `rtmo-l`, `rtmo-m`, `rtmo-s`, `rtmo-t`. | |
| ## Kernels backend | |
| `pose.load("rtmo-l", mode="kernels")` runs our CUDA kernels (`cudnn_hacc`, `fvm_conv`, `fvm_extra`, `fvm_mb`, `fvm_r3`). It needs a prebuilt kernel for your GPU architecture (downloaded from <https://huggingface.co/fastforks/kernels> on first use) and a recent NVIDIA driver; if there is none it raises `BackendUnavailableError` with the reason and never falls back silently. `mode="auto"` picks `kernels` when it can run and logs the choice. | |
| <!-- staged from fastforks 1cbf1671 (2026-11-15) --> | |