File size: 2,798 Bytes
5880013
 
 
 
 
 
 
 
 
 
bb7e1e8
5880013
 
 
 
 
 
 
 
 
 
bb7e1e8
5880013
 
 
 
 
 
bb7e1e8
 
 
 
5880013
 
 
 
 
 
 
 
 
 
 
 
 
 
bb7e1e8
5880013
 
 
ce3bf35
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
license: apache-2.0
tags:
- executorch
- xnnpack
- pte
- on-device
- keypoint-detection
- pose-estimation
---
# rtmpose_m_animal — ExecuTorch

- **Source**: open-mmlab/mmpose RTMPose (rtmpose-m_simcc-ap10k_pt-aic-coco_210e-256x256-7a041aa1)
- **License**: Apache-2.0
- **Input**: [[1, 3, 256, 256]] — RGB, ImageNet norm, 256x256 crop around an animal (detect first, then crop and resize to this aspect)
- **Output**: SimCC pair: x [1,17,512] and y [1,17,512] — a 1-D distribution per keypoint per axis. Decode: keypoint k sits at (argmax(x[k]) / 2, argmax(y[k]) / 2) in crop pixels; the max value doubles as the confidence.

## Variants

All variants take and return fp32 tensors — swap the `.pte` file, keep your app code.

| build | file | size (MB) | parity vs fp32 eager (worst corr) | Mac median (ms)* |
|-----------|------|-----------|------------------------------------|------------------|
| fp32 | `rtmpose_m_animal_xnnpack_fp32.pte` | 54.5 | 1.000000 | 9.4 |

\*Mac arm64, single process, median of 10 — a reference point for relative cost
only, not a device number (torch eager fp32 on the same machine: 91.4 ms).

### Builds that did not earn a slot

- **Core ML (fp16, iOS) is not shipped**: measured in the units that matter for this model — fraction of keypoints landing within 4 px of fp32: median 0.9412 over 10 real images, worst 0.7647.

## Verification (executorch 1.4.0, torch 2.13.0)

Parity is measured against the fp32 eager model on real image input; `corr` is
the correlation over all elements of each output tensor.

| output | shape | max_abs_diff | corr |
|--------|-------|--------------|------|
| 0 | [1, 17, 512] | 2.783e-06 | 1.000000 |
| 1 | [1, 17, 512] | 7.629e-06 | 1.000000 |

XNNPACK delegate coverage (fp32): 93.9% (306/326 ops); ops left on the portable kernels: `dim_order_ops._to_dim_order_copy.default` x8, `aten.unsqueeze_copy.default` x3, `aten.split_with_sizes_copy.default` x3, `aten.sum.dim_IntList` x2, `aten.pow.Tensor_Scalar` x2, `aten.squeeze_copy.dims` x2

## Conversion

torch.export -> to_edge_transform_and_lower(partitioner) -> .pte
(conversion scripts: [executorch-models](https://github.com/john-rocky/executorch-models))

**Notes**: Top-down again: crop one animal first. AP-10K covers 54 mammal species; a general object detector's animal classes make a workable front end.

<!-- funnel:v1 -->

---

**More models in this format:** [ExecuTorch Model Zoo](https://huggingface.co/collections/mlboydaisuke/executorch-model-zoo-6a7ff328390b63075ffeae5e) — 31 models, each with the recipe that produced it.

**Want a different model on-device?** [Open a request](https://github.com/john-rocky/on-device-requests) — free, open weights only; the export and its measured numbers get published publicly.

<!-- /funnel:v1 -->