Pose QML (sidepose)
QML-friendly, headless pose processing with simple anchors for overlaying items on people, bones, and faces.
Sample outputs
Quick screencasts of the overlay running on sample videos:
- Single person: sample_outputs/out_single_person.mp4
- Two people: sample_outputs/out_multi.mp4
Features
- Headless
PoseProcessor(QObject) for frames fromVideoOutput/camera. - QML anchors:
PoseKeypointAnchor,PoseBoneAnchor,PoseFaceAnchorto position any QML item. PoseSpacewrapper auto-computes mapping (likeVideoOutput.contentRect) so anchors just work.- Multi-platform model cache with automatic download of MediaPipe pose models.
Requirements
- Python 3.10+
- PySide6 (Qt 6)
- MediaPipe Tasks (via the
mediapipePython package)
Install deps (example):
python3 -m pip install -U pip
pip install PySide6 mediapipe numpy
Quick start (minimal demo)
Run the example app:
python3 -m example.main
What it does:
- Plays
example/sample.mp4in aVideoOutput. - Starts
PoseProcessorand overlays keypoints, bones, and a face mask using anchors insidePoseSpace. - On first run, downloads the default model (
pose_landmarker_full.task) into a cache.
Publishing (maintainers)
This project ships wheels and sdists via GitLab CI:
- Create a tag for TestPyPI (e.g., v0.2.0-rc1) to trigger the testpypi job.
- Create a tag like v0.2.0 to enable the manual PyPI publish job.
- Provide CI variables: TWINE_USERNAME (usually token), TWINE_PASSWORD_TESTPYPI, TWINE_PASSWORD_PYPI.
Automatic model handling
You don’t need to specify a model path. If modelAssetPath is empty:
- Sidepose defaults to
pose_landmarker_fulland downloads it the first time. - You can override with a name (
pose_landmarker_lite|full|heavy), a local path, or a URL (file://,https://).
Cache location:
- Env override:
SIDEPOSE_CACHE_DIR. - Windows:
%LOCALAPPDATA%/sidepose/models(fallback:%USERPROFILE%/AppData/Local/sidepose/models). - macOS:
~/Library/Caches/sidepose/models. - Linux:
$XDG_CACHE_HOME/sidepose/modelsor~/.cache/sidepose/models.
Minimal QML snippet
import QtQuick
import QtQuick.Window
import QtMultimedia
import Pose 1.0
import "../sidepose/qml/Pose"
Window {
width: 1280
height: 720
visible: true
VideoOutput {
id: view
anchors.fill: parent
fillMode: VideoOutput.PreserveAspectFit
}
MediaPlayer {
id: player
source: Qt.resolvedUrl("sample.mp4")
autoPlay: true
loops: MediaPlayer.Infinite
videoOutput: view
}
PoseProcessor {
id: pose
videoSink: view.videoSink
backend: "mediapipe"
useGpu: true
}
PoseSpace {
anchors.fill: parent
processor: pose
Repeater {
model: 33
delegate: PoseKeypointAnchor {
processor: pose
keypoint: index
Rectangle {
anchors.centerIn: parent
width: 6; height: 6; radius: 3
color: "#FF4081"
}
}
}
Repeater {
model: 12
delegate: PoseBoneAnchor {
processor: pose
bone: index
height: 4
Rectangle {
anchors.fill: parent
color: "#40C4FF"
radius: 2
}
}
}
PoseFaceAnchor {
processor: pose
strategy: Pose.FaceStrategy.EyesEars
rotationFrom: Pose.FaceRotation.EarLine
scaleFactor: 1.0
Image {
anchors.fill: parent
source: Qt.resolvedUrl("face_mask.png")
fillMode: Image.PreserveAspectFit
}
}
}
}
Troubleshooting
- If the model fails to load, check your internet connection on first run, or set
SIDEPOSE_CACHE_DIRto a writable directory. - If QML types aren’t found, ensure
register_qml_types()is called in your runner (example/main.py does this). - For CPU fallback when GPU init fails, the processor automatically retries; see logs for details.
License
MIT
Metadata
Release files for sidepose 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sidepose-0.0.1.tar.gz | 53.2 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sidepose-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.3 MB
Release files / sidepose-0.0.1.tar.gz
| Download URL | sidepose-0.0.1.tar.gz |
|---|---|
| Size | 53.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69d8101e08df8203199071773f7f30eb8c3dc3e00821071f5ab5688fbfd91386
|
|
BLAKE2b-256 checksum How to use checksums |
2716de1fa8b5696e61ec703b8c26c259a298dc7b060475664f1297903a47016a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|
Release files / sidepose-0.0.1-py3-none-any.whl
| Download URL | sidepose-0.0.1-py3-none-any.whl |
|---|---|
| Size | 99.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e3f97df37560c17fcc0e5c44d40954d7b9fa0ef1b5020d67b219b7a9bbc7911
|
|
BLAKE2b-256 checksum How to use checksums |
1653cc6bdab142f531ca3ee4eb69efaeb33dff858dfdcb63281fc64ca262f9d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.18
|