RTMO-ORT — RTMO pose on pure ONNX Runtime
Minimal, fast RTMO (person detection + 2D pose) inference with no heavy frameworks. One tiny Python class, three simple CLIs, and ready-to-download ONNX models.
If this saves you time, please consider starring the repo — it really helps.
Install (two ways)
A) pip (recommended)
# CPU
pip install "rtmo-ort[cpu]"
# GPU (uses onnxruntime-gpu if present)
pip install "rtmo-ort[gpu]"
B) From source
git clone https://github.com/namas191297/rtmo-ort.git
cd rtmo-ort
python -m venv .venv && source .venv/bin/activate # optional
pip install -e ".[cpu]" # or ".[gpu]"
Python ≥ 3.8. Works on Linux/macOS/Windows.
Get models
This repo ships a helper to fetch ONNX files into models/….
# fetch a specific release tag (e.g., v0.1.0)
./get_models.sh v0.1.0
# or omit to use the default in the script
./get_models.sh
You can also download individual models manually (see table below).
By default, the CLIs look in models/. To change that, set RTMO_MODELS_DIR=/path/to/models.
Models table (direct downloads)
Each file should be placed at models/<name>/<name>.onnx.
Example: models/rtmo_s_640x640_coco/rtmo_s_640x640_coco.onnx.
Replace
v0.1.0with your chosen tag if needed.
Use the CLIs
All commands accept the same presets and thresholds:
--model-type {tiny,small,medium,large}(default:small)--dataset {coco,crowdpose,body7,body7_crowdpose}(default:coco)--no-letterbox(disable square letterbox; default is letterbox on)--score-thr,--kpt-thr,--max-det--device {cpu,cuda}--onnx /path/to/model.onnx(overrides presets)--models-dir /path/to/models(default:models)
Image
rtmo-image --model-type small --dataset coco \
--input path/to/in.jpg --output out.jpg --device cpu
Video
rtmo-video --model-type small --dataset coco \
--input in.mp4 --output out.mp4 --device cuda
Webcam
rtmo-webcam --model-type small --dataset coco --device cpu
# pick another camera:
# rtmo-webcam --cam 1
Python API
import cv2
from rtmo_ort import PoseEstimatorORT
onnx = "models/rtmo_s_640x640_coco/rtmo_s_640x640_coco.onnx"
pe = PoseEstimatorORT(onnx, device="cpu", letterbox=True)
img = cv2.imread("assets/demo.jpg")
boxes, kpts, scores = pe.infer(img)
vis = pe.annotate(img, boxes, kpts, scores)
cv2.imwrite("vis.jpg", vis)
Outputs
boxes:[N,4]in xyxykpts:[N,K,3]with(x,y,score)per keypointscores:[N]person scores
Notes and tips
- NMS is fused inside the ONNX models. Do not run NMS again.
- Letterbox vs. stretch. Letterbox (default) preserves aspect ratio and generally matches training; stretching (
--no-letterbox) may reduce accuracy but can be fine for quick demos. - Keypoints count. COCO = 17; CrowdPose = 14; Body7 is coarse. Some Body7 exports use 17-dim outputs for compatibility; semantics remain coarse.
- GPU provider. If you installed
onnxruntime-gpu, use--device cuda. If CUDA isn’t found, ONNX Runtime falls back to CPU. - Codecs. If
rtmo-videofails to write a file, trymp4v,XVID, or install OS-level codecs.
Project structure
rtmo_ort/
├─ estimator.py # PoseEstimatorORT (ONNX Runtime + postprocess + drawing)
├─ cli.py # rtmo-image / rtmo-video / rtmo-webcam
└─ __init__.py
models/ # place ONNX files here (or use --onnx)
get_models.sh # fetches model files for a given tag
If you want something specific, open an issue.
Contributing & support
Issues and pull requests are welcome. If you found this useful, star the repo and consider sharing a short demo clip — it helps others discover it.
- Website: namasbhandari.in
- Repo: https://github.com/namas191297/rtmo-ort
- Issues: https://github.com/namas191297/rtmo-ort/issues
- License: Apache-2.0
Metadata
Release files for rtmo-ort 0.1.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rtmo_ort-0.1.0.post1.tar.gz | 8.3 kB | Without provenance | Details for rtmo_ort-0.1.0.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rtmo_ort-0.1.0.post1-py3-none-any.whl | Python 3 | none | any | Details for rtmo_ort-0.1.0.post1-py3-none-any.whl |
Total release size: 20.1 kB
Release files / rtmo_ort-0.1.0.post1.tar.gz
| Download URL | rtmo_ort-0.1.0.post1.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dab94ada57abccc4a898380fcaf3510d2d15759f034c7528db0d2f6b1144fe5e
|
|
BLAKE2b-256 checksum How to use checksums |
43e92eee2e14770d29ae7dadf433709c9c67c20ef75ae1676ed6974fd95db7e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Release files / rtmo_ort-0.1.0.post1-py3-none-any.whl
| Download URL | rtmo_ort-0.1.0.post1-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fd71980d2762555f5ce159be9193cd1dd82d8e45af1462b8091bc10b795555c
|
|
BLAKE2b-256 checksum How to use checksums |
fd14551a1922c37b6dcebc3c1ff57c2a3f5f73e2304542aeb5005485beacc6b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.9.23
|
Security for rtmo-ort 0.1.0.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.