File size: 4,245 Bytes
35958aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
62
63
64
65
66
---
library_name: onnx
tags:
  - rtmo
  - mmpose
  - pose-estimation
  - keypoint-detection
  - coco
  - apache-2.0
  - onnx
  - inference4j
license: apache-2.0
pipeline_tag: keypoint-detection
datasets:
  - coco
---

# RTMO-L (COCO, 640) — ONNX

[RTMO-L](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmo), a one-stage real-time multi-person pose estimator from MMPose, trained on COCO only. One run returns every person's box and 17 body keypoints. Apache-2.0 code and weights, exported to ONNX with MMDeploy.

Exported for use with [inference4j](https://github.com/inference4j/inference4j), an inference-only AI library for Java.

## Original Source

- **Repository:** [OpenMMLab (MMPose)](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmo)
- **License:** apache-2.0

## Usage with inference4j

```java
try (PoseDetector detector = RtmoPoseDetector.l().build()) {
    List<Pose> poses = detector.detect(Path.of("people.jpg"));
    poses.forEach(p -> System.out.printf("person %.2f, left wrist at %s%n",
        p.person().confidence(), p.keypoint(CocoJoint.LEFT_WRIST)));
}
```

## Model Details

| Property | Value |
|----------|-------|
| Architecture | RTMO-L (CSPDarknet + hybrid encoder, dynamic coordinate classifier), 44.8M parameters |
| Task | Multi-person 2D pose estimation, 17 COCO keypoints |
| COCO AP | 72.4 (val2017, 640x640, single pass with MMPose's centred letterbox, as reported by the RTMO authors) |
| Input | `input`: `[batch, 3, 640, 640]` float32 (batch dynamic) |
| Pre-processing | Letterbox to the top-left corner: `r = min(640 / h, 640 / w)`, bilinear resize to `(int(w * r), int(h * r))`, pad right and bottom with 114. Raw 0-255 **BGR**, no mean/std, NCHW float32 |
| Output | `dets`: `[batch, N, 5]` = `x1, y1, x2, y2, score` per person; `keypoints`: `[batch, N, 17, 3]` = `x, y, score` per COCO-17 joint. Coordinates in 640 x 640 input pixels, rows sorted by score |
| Post-processing | NMS is in the graph (score > 0.1, class-agnostic IoU 0.65, at most 50 people). When fewer than 50 people are found, the graph appends one padding row with score 0 (box and keypoint scores), so keep rows with score > 0.1. Divide coordinates by `r` and clamp boxes to the image |
| Keypoint order | COCO-17: nose, left_eye, right_eye, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_knee, right_knee, left_ankle, right_ankle |
| ONNX opset | 11 |

## License

Code and weights: [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0), from [MMPose](https://github.com/open-mmlab/mmpose) by OpenMMLab (Lu et al., *RTMO: Towards High-Performance One-Stage Real-Time Multi-Person Pose Estimation*, arXiv:2312.07526, 2023). Training data: COCO (annotations CC BY 4.0; images remain under their Flickr terms).

## Provenance

| Part | Origin |
|------|--------|
| Code | [open-mmlab/mmpose](https://github.com/open-mmlab/mmpose) 1.3.2 (RTMO project), Apache-2.0 |
| Weights | [rtmo-l_16xb16-600e_coco-640x640-516a421f_20231211.pth](https://download.openmmlab.com/mmpose/v1/projects/rtmo/rtmo-l_16xb16-600e_coco-640x640-516a421f_20231211.pth) from the [RTMO model zoo](https://github.com/open-mmlab/mmpose/tree/main/projects/rtmo), config [rtmo-l_16xb16-600e_coco-640x640.py](https://github.com/open-mmlab/mmpose/blob/v1.3.2/configs/body_2d_keypoint/rtmo/coco/rtmo-l_16xb16-600e_coco-640x640.py), Apache-2.0 |
| ONNX export | Exported here (no upstream ONNX exists for the COCO-only checkpoints) |
| Training data | COCO 2017 train person keypoints only (annotations CC BY 4.0, images under Flickr terms). The CSPDarknet backbone is initialised from MMDetection's COCO-trained YOLOX-L weights (`yolox_l_8x8_300e_coco_20211126_140236-d3bd2b23.pth`) |
| Changes in this mirror | Exported with MMDeploy 1.3.1 (`pose-detection_rtmo_onnxruntime_dynamic.py`, opset 11) in a pinned environment: PyTorch 2.1.2, MMPose 1.3.2, mmcv 2.1.0, mmengine 0.10.4. Same graph layout as MMPose's official body7 `onnx_sdk` exports, except that the padding row scores 0 instead of repeating the last anchor's prediction. Weights unchanged apart from MMPose's `switch_to_deploy` (the neck's RepVGG blocks fused, anchor grid precomputed) |