HumanSkeletonMixin
HumanSkeletonMixin is the pose-estimation primitive implemented in src/autopipeline/components/primitives/human_skeleton.py.
It is a narrow reusable helper for producing pose landmarks used by body-structure metrics.
Mixin
Constructor
Constructor Parameters
| Key | Default | Meaning |
|---|---|---|
static_mode | True | Run MediaPipe Pose in static-image mode. |
model_complexity | 0 | MediaPipe Pose model complexity. |
min_detection_confidence | 0.5 | Detection confidence threshold. |
The implementation always sets:
enable_segmentation=False
Methods
Public Methods
| Method | Purpose |
|---|---|
get_skeleton_np(image) | Run pose estimation and return landmark coordinates. |
Methods
Method Reference
get_skeleton_np(image: Image.Image)
Input
| Parameter | Meaning |
|---|---|
image | PIL image containing a person. |
Output
Returns:
np.ndarrayof pose landmarks with rows[x, y, z, visibility]Noneif no pose landmarks are found
The coordinates are normalized MediaPipe pose coordinates, not pixel-space coordinates.
Config
Minimal Integration Example
init_config:
static_mode: true
model_complexity: 1
min_detection_confidence: 0.5
Failure Mode
Failure Semantics
Soft-failure behavior:
- no pose landmarks -> returns
None
Initialization or MediaPipe runtime failures are not wrapped in a custom recovery layer.
Extension
Extension Notes
- Keep general-purpose pose extraction here.
- Keep metric-specific body alignment or scoring above this layer.
- If you add a new body metric, document whether it expects normalized landmarks or pixel-space landmarks after post-processing.