Lightweight CLI and Python API for spine-aware human pose estimation in the wild.
Project description
SpinePose Inference Library
Lightweight CLI and Python API for spine-aware human pose estimation in the
SpinePose is an inference library for spine-aware 2D human pose estimation in the wild. It provides a simple CLI and Python API for running inference on images and videos using pretrained models presented in our papers "Towards Unconstrained 2D Pose Estimation of the Human Spine" (CVPR Workshops 2025) and "SIMSPINE: A Biomechanics-Aware Simulation Framework for 3D Spine Motion Annotation and Benchmarking" (CVPR 2026). Our models predict the SpineTrack skeleton hierarchy comprising 37 keypoints, including 9 directly along the spine chain in addition to the standard body joints.
Getting Started
Recommended Python Version: 3.9–3.12
For quick spinal keypoint estimation, we release optimized ONNX models via the spinepose package on PyPI:
pip install spinepose
On Linux/Windows with CUDA available, install the GPU version:
pip install spinepose[gpu]
Using the CLI
usage: spinepose [-h] (--version | --input_path INPUT_PATH) [--vis-path VIS_PATH] [--save-path SAVE_PATH] [--mode {xlarge,large,medium,small}] [--nosmooth] [--spine-only]
SpinePose Inference
options:
-h, --help show this help message and exit
--version, -V Print the version and exit.
--input_path INPUT_PATH, -i INPUT_PATH
Path to the input image or video
--vis-path VIS_PATH, -o VIS_PATH
Path to save the output image or video
--save-path SAVE_PATH, -s SAVE_PATH
Save predictions in OpenPose format (.json for image or folder for video).
--mode {xlarge,large,medium,small}, -m {xlarge,large,medium,small}
Model size. Choose from: xlarge, large, medium, small (default: medium)
--nosmooth Disable keypoint smoothing for video inference (default: enabled)
--spine-only Only use 9 spine keypoints (default: use all 37 keypoints)
--model-version MODEL_VERSION
Model version to use. One of: 'latest', 'v2', 'v1' (default: latest)
For example, to run inference on a video and save only spine keypoints in OpenPose format:
spinepose --input_path path/to/video.mp4 --save-path output_path.json --spine-only
This automatically downloads the model weights (if not already present) and outputs the annotated image or video. Use spinepose -h to view all available options, including GPU usage and confidence thresholds.
Using the Python API
import cv2
from spinepose import SpinePoseEstimator
# Initialize estimator (downloads ONNX model if not found locally)
estimator = SpinePoseEstimator(device='cuda')
# Perform inference on a single image
image = cv2.imread('path/to/image.jpg')
keypoints, scores = estimator(image)
visualized = estimator.visualize(image, keypoints, scores)
cv2.imwrite('output.jpg', visualized)
Or, for a simplified interface:
from spinepose.inference import infer_image, infer_video
# Single image inference
results = infer_image('path/to/image.jpg', vis_path='output.jpg')
# Video inference with optional temporal smoothing
results = infer_video('path/to/video.mp4', vis_path='output_video.mp4', use_smoothing=True)
Release Notes
v2.0.2
- Added detector selection in CLI/API: use
--detector rfdetr|yolox(CLI) ordetector='rfdetr'|'yolox'(Python). - Integrated RF-DETR as an alternative detector with YOLOX-compatible inference interfaces.
v2.0.1
- Added model family selection in CLI/API.
- CLI: use
--model-version v1|v2|latest(for example,--model-version v1). - Python API: use
model_version='v1'|'v2'|'latest'(for example,SpinePoseEstimator(model_version='v1')). v1loads SpineTrack-trained models;v2andlatestload SIMSPINE-trained V2 models (latestis default).
Model Zoo
SpinePose V2
| Method | Training Data | SpineTrack | SIMSPINE | Usage | |||
|---|---|---|---|---|---|---|---|
| APB | ARB | APS | ARS | AUC | |||
| spinepose_v2_small | SpineTrack + SIMSPINE | 0.788 | 0.815 | 0.920 | 0.929 | 0.790 | --mode small --model-version v2 |
| spinepose_v2_medium | 0.821 | 0.846 | 0.928 | 0.937 | 0.798 | --mode medium --model-version v2 | |
| spinepose_v2_large | 0.840 | 0.862 | 0.917 | 0.927 | 0.803 | --mode large --model-version v2 |
SpinePose V1
| Method | Training Data | SpineTrack | SIMSPINE | Usage | |||
|---|---|---|---|---|---|---|---|
| APB | ARB | APS | ARS | AUC | |||
| spinepose_v1_small | SpineTrack | 0.792 | 0.821 | 0.896 | 0.908 | 0.611 | --mode small --model-version v1 |
| spinepose_v1_medium | 0.840 | 0.864 | 0.914 | 0.926 | 0.633 | --mode medium --model-version v1 | |
| spinepose_v1_large | 0.854 | 0.877 | 0.910 | 0.922 | 0.633 | --mode large --model-version v1 | |
| spinepose_v1_xlarge | 0.759 | 0.801 | 0.893 | 0.910 | - | --mode xlarge --model-version v1 |
Related Publications and Citations
If you use this work in your research, please cite the following related publications:
Towards Unconstrained 2D Pose Estimation of the Human Spine (CVSports @ CVPR 2025)
Abstract
We present SpineTrack, the first comprehensive dataset for 2D spine pose estimation in unconstrained settings, addressing a crucial need in sports analytics, healthcare, and realistic animation. Existing pose datasets often simplify the spine to a single rigid segment, overlooking the nuanced articulation required for accurate motion analysis. In contrast, SpineTrack annotates nine detailed spinal keypoints across two complementary subsets: a synthetic set comprising 25k annotations created using Unreal Engine with biomechanical alignment through OpenSim, and a real-world set comprising over 33k annotations curated via an active learning pipeline that iteratively refines automated annotations with human feedback. This integrated approach ensures anatomically consistent labels at scale, even for challenging, in-the-wild images. We further introduce SpinePose, extending state-of-the-art body pose estimators using knowledge distillation and an anatomical regularization strategy to jointly predict body and spine keypoints. Our experiments in both general and sports-specific contexts validate the effectiveness of SpineTrack for precise spine pose estimation, establishing a robust foundation for future research in advanced biomechanical analysis and 3D spine reconstruction in the wild.
SpineTrack Dataset
SpineTrack is available on HuggingFace. The dataset comprises:
-
SpineTrack-Real A collection of real-world images annotated with nine spinal keypoints in addition to standard body joints. An active learning pipeline, combining pretrained neural annotators and human corrections, refines keypoints across diverse poses.
-
SpineTrack-Unreal A synthetic subset rendered using Unreal Engine, paired with precise ground-truth from a biomechanically aligned OpenSim model. These synthetic images facilitate pretraining and complement real-world data.
To download:
git lfs install
git clone https://huggingface.co/datasets/saifkhichi96/spinetrack
Alternatively, use wget to download the dataset directly:
wget https://huggingface.co/datasets/saifkhichi96/spinetrack/resolve/main/annotations.zip
wget https://huggingface.co/datasets/saifkhichi96/spinetrack/resolve/main/images.zip
In both cases, the dataset will download two zipped folders: annotations (24.8 MB) and images (19.4 GB), which can be unzipped to obtain the following structure:
spinetrack
├── annotations/
│ ├── person_keypoints_train-real-coco.json
│ ├── person_keypoints_train-real-yoga.json
│ ├── person_keypoints_train-unreal.json
│ └── person_keypoints_val2017.json
└── images/
├── train-real-coco/
├── train-real-yoga/
├── train-unreal/
└── val2017/
All annotations are in COCO format and can be used with standard pose estimation libraries.
Evaluation
We benchmark SpinePose V1 models against state-of-the-art lightweight pose estimation methods on COCO, Halpe, and our SpineTrack dataset. The results are summarized below, with SpinePose models highlighted in gray. Only 26 body keypoints are used for Halpe evaluations.
| Method | Train Data | Kpts | COCO | Halpe26 | Body | Feet | Spine | Overall | Params (M) | FLOPs (G) | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AP | AR | AP | AR | AP | AR | AP | AR | AP | AR | AP | AR | |||||
| SimCC-MBV2 | COCO | 17 | 62.0 | 67.8 | 33.2 | 43.9 | 72.1 | 75.6 | 0.0 | 0.0 | 0.0 | 0.0 | 0.1 | 0.1 | 2.29 | 0.31 |
| RTMPose-t | Body8 | 26 | 65.9 | 71.3 | 68.0 | 73.2 | 76.9 | 80.0 | 74.1 | 79.7 | 0.0 | 0.0 | 15.8 | 17.9 | 3.51 | 0.37 |
| RTMPose-s | Body8 | 26 | 69.7 | 74.7 | 72.0 | 76.7 | 80.9 | 83.6 | 78.9 | 83.5 | 0.0 | 0.0 | 17.2 | 19.4 | 5.70 | 0.70 |
| SpinePose-s | SpineTrack | 37 | 68.2 | 73.1 | 70.6 | 75.2 | 79.1 | 82.1 | 77.5 | 82.9 | 89.6 | 90.7 | 84.2 | 86.2 | 5.98 | 0.72 |
| SimCC-ViPNAS | COCO | 17 | 69.5 | 75.5 | 36.9 | 49.7 | 79.6 | 83.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.2 | 0.2 | 8.65 | 0.80 |
| RTMPose-m | Body8 | 26 | 75.1 | 80.0 | 76.7 | 81.3 | 85.5 | 87.9 | 84.1 | 88.2 | 0.0 | 0.0 | 19.4 | 21.4 | 13.93 | 1.95 |
| SpinePose-m | SpineTrack | 37 | 73.0 | 77.5 | 75.0 | 79.2 | 84.0 | 86.4 | 83.5 | 87.4 | 91.4 | 92.5 | 88.0 | 89.5 | 14.34 | 1.98 |
| RTMPose-l | Body8 | 26 | 76.9 | 81.5 | 78.4 | 82.9 | 86.8 | 89.2 | 86.9 | 90.0 | 0.0 | 0.0 | 20.0 | 22.0 | 28.11 | 4.19 |
| RTMW-m | Cocktail14 | 133 | 73.8 | 78.7 | 63.8 | 68.5 | 84.3 | 86.7 | 83.0 | 87.2 | 0.0 | 0.0 | 6.2 | 7.6 | 32.26 | 4.31 |
| SimCC-ResNet50 | COCO | 17 | 72.1 | 78.2 | 38.7 | 51.6 | 81.8 | 85.2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.2 | 0.2 | 36.75 | 5.50 |
| SpinePose-l | SpineTrack | 37 | 75.2 | 79.5 | 77.0 | 81.1 | 85.4 | 87.7 | 85.5 | 89.2 | 91.0 | 92.2 | 88.4 | 90.0 | 28.66 | 4.22 |
| SimCC-ResNet50* | COCO | 17 | 73.4 | 79.0 | 39.8 | 52.4 | 83.2 | 86.2 | 0.0 | 0.0 | 0.0 | 0.0 | 0.3 | 0.3 | 43.29 | 12.42 |
| RTMPose-x* | Body8 | 26 | 78.8 | 83.4 | 80.0 | 84.4 | 88.6 | 90.6 | 88.4 | 91.4 | 0.0 | 0.0 | 21.0 | 22.9 | 50.00 | 17.29 |
| RTMW-l* | Cocktail14 | 133 | 75.6 | 80.4 | 65.4 | 70.1 | 86.0 | 88.3 | 85.6 | 89.2 | 0.0 | 0.0 | 8.1 | 8.1 | 57.20 | 7.91 |
| RTMW-l* | Cocktail14 | 133 | 77.2 | 82.3 | 66.6 | 71.8 | 87.3 | 89.9 | 88.3 | 91.3 | 0.0 | 0.0 | 8.6 | 8.6 | 57.35 | 17.69 |
| SpinePose-x* | SpineTrack | 37 | 75.9 | 80.1 | 77.6 | 81.8 | 86.3 | 88.5 | 86.3 | 89.7 | 89.3 | 91.0 | 88.9 | 89.9 | 50.69 | 17.37 |
For evaluation instructions and to reproduce the results reported in our paper, please refer to the evaluation branch of this repository:
git clone https://github.com/dfki-av/spinepose.git
cd spinepose
git checkout evaluation
The README in the evaluation branch provides detailed steps for setting up the evaluation environment and running the evaluation scripts on the SpineTrack dataset.
Citation
@InProceedings{Khan_2025_CVPRW,
author = {Khan, Muhammad Saif Ullah and Krau{\ss}, Stephan and Stricker, Didier},
title = {Towards Unconstrained 2D Pose Estimation of the Human Spine},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
month = {June},
year = {2025},
pages = {6171-6180}
}
SIMSPINE: A Biomechanics-Aware Simulation Framework for 3D Spine Motion Annotation and Benchmarking (CVPR 2026)
Abstract
Modeling spinal motion is fundamental to understanding human biomechanics, yet remains underexplored in computer vision due to the spine's complex multi-joint kinematics and the lack of large-scale 3D annotations. We present a biomechanics-aware keypoint simulation framework that augments existing human pose datasets with anatomically consistent 3D spinal keypoints derived from musculoskeletal modeling. Using this framework, we create the first open dataset, named SIMSPINE, which provides sparse vertebra-level 3D spinal annotations for natural full-body motions in indoor multi-camera capture without external restraints. With 2.14 million frames, this enables data-driven learning of vertebral kinematics from subtle posture variations and bridges the gap between musculoskeletal simulation and computer vision. In addition, we release pretrained baselines covering fine-tuned 2D detectors, monocular 3D pose lifting models, and multi-view reconstruction pipelines, establishing a unified benchmark for biomechanically valid spine motion estimation. Specifically, our 2D spine baselines improve the state-of-the-art from 0.63 to 0.80 AUC in controlled environments, and from 0.91 to 0.93 AP for in-the-wild spine tracking. Together, the simulation framework and SIMSPINE dataset advance research in vision-based biomechanics, motion analysis, and digital human modeling by enabling reproducible, anatomically grounded 3D spine estimation under natural conditions.
Citation
@InProceedings{Khan_2026_CVPR,
author = {Khan, Muhammad Saif Ullah and Stricker, Didier},
title = {SIMSPINE: A Biomechanics-Aware Simulation Framework for 3D Spine Motion Annotation and Benchmarking},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2026},
pages = {}
}
License
This project is released under the CC-BY-NC-4.0 License. Commercial use is prohibited, and appropriate attribution is required for research or educational applications.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spinepose-2.0.2.tar.gz.
File metadata
- Download URL: spinepose-2.0.2.tar.gz
- Upload date:
- Size: 43.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c47f52e34177fc0da74aaf20a9341d24ebfe553158dac054b4b4f4a97e5c9972
|
|
| MD5 |
89bf22cf590240765305fa408a2202a6
|
|
| BLAKE2b-256 |
d3a549d8031ee70307d509368dc019b358bdc78ff8aff66b16be33f6e7650a65
|
Provenance
The following attestation bundles were made for spinepose-2.0.2.tar.gz:
Publisher:
python-publish.yml on dfki-av/spinepose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spinepose-2.0.2.tar.gz -
Subject digest:
c47f52e34177fc0da74aaf20a9341d24ebfe553158dac054b4b4f4a97e5c9972 - Sigstore transparency entry: 1162768043
- Sigstore integration time:
-
Permalink:
dfki-av/spinepose@f0f378f898b8d7b3643e4b2b1a623bfb84568b26 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/dfki-av
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f0f378f898b8d7b3643e4b2b1a623bfb84568b26 -
Trigger Event:
release
-
Statement type:
File details
Details for the file spinepose-2.0.2-py3-none-any.whl.
File metadata
- Download URL: spinepose-2.0.2-py3-none-any.whl
- Upload date:
- Size: 43.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4633aa166bc540b0b2e1ae1b0e10822cd779647b29b76b0e9202839019af029a
|
|
| MD5 |
e6c888dafa3f4d8a4ff28a50aa0d34bf
|
|
| BLAKE2b-256 |
7f188dcb8cd66cca86545415a32193bde9ad02dcf4e2bb6218fd71a824715d9a
|
Provenance
The following attestation bundles were made for spinepose-2.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on dfki-av/spinepose
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
spinepose-2.0.2-py3-none-any.whl -
Subject digest:
4633aa166bc540b0b2e1ae1b0e10822cd779647b29b76b0e9202839019af029a - Sigstore transparency entry: 1162768111
- Sigstore integration time:
-
Permalink:
dfki-av/spinepose@f0f378f898b8d7b3643e4b2b1a623bfb84568b26 -
Branch / Tag:
refs/tags/v2.0.2 - Owner: https://github.com/dfki-av
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f0f378f898b8d7b3643e4b2b1a623bfb84568b26 -
Trigger Event:
release
-
Statement type: