Views
No views yet
pip install spineposepip install spinepose[gpu]spinepose -i /path/to/image_or_video -o /path/to/outputspinepose -h for detailed usage options.1import cv2
2from spinepose import SpinePoseEstimator
3
4# Initialize estimator (downloads ONNX model if not found locally)
5estimator = SpinePoseEstimator(device='cuda')
6
7# Perform inference on a single image
8image = cv2.imread('path/to/image.jpg')
9keypoints, scores = estimator.predict(image)
10visualized = estimator.visualize(image, keypoints, scores)
11cv2.imwrite('output.jpg', visualized)1from spinepose.inference import infer_image, infer_video
2
3# Single image inference
4infer_image('path/to/image.jpg', 'output.jpg')
5
6# Video inference with optional temporal smoothing
7infer_video('path/to/video.mp4', 'output_video.mp4', use_smoothing=True)1<PROJECT_DIR>/
2├─ data/
3│ ├─ spinetrack/
4│ ├─ coco/
5│ └─ halpe/
6└─ checkpoints/
7 ├─ spinepose-s_32xb256-10e_spinetrack-256x192.pth
8 ├─ spinepose-m_32xb256-10e_spinetrack-256x192.pth
9 ├─ spinepose-l_32xb256-10e_spinetrack-256x192.pth
10 └─ spinepose-x_32xb128-10e_spinetrack-384x288.pthteacher and student weights, with only the student used during inference. Exported ONNX checkpoints only contain the student.| 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 |
1git lfs install
2git clone https://huggingface.co/datasets/saifkhichi96/spinetrackwget to download the dataset directly:1wget https://huggingface.co/datasets/saifkhichi96/spinetrack/resolve/main/annotations.zip
2wget https://huggingface.co/datasets/saifkhichi96/spinetrack/resolve/main/images.zipannotations (24.8 MB) and images (19.4 GB), which can be unzipped to obtain the following structure:1spinetrack
2├── annotations/
3│ ├── person_keypoints_train-real-coco.json
4│ ├── person_keypoints_train-real-yoga.json
5│ ├── person_keypoints_train-unreal.json
6│ └── person_keypoints_val2017.json
7└── images/
8 ├── train-real-coco/
9 ├── train-real-yoga/
10 ├── train-unreal/
11 └── val2017/[!WARNING] A small number of annotations in the synthetic subset are corrupted.
We recommend avoiding their use until the updated labels are released in the next dataset version.
1@InProceedings{Khan_2025_CVPR,
2 author = {Khan, Muhammad Saif Ullah and Krau{\ss}, Stephan and Stricker, Didier},
3 title = {Towards Unconstrained 2D Pose Estimation of the Human Spine},
4 booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
5 month = {June},
6 year = {2025},
7 pages = {6171-6180}
8}