Skip to content

feat: optional MediaPipe subject scoring path - #182

Open
laurentketterle-hub wants to merge 2 commits into
mergeos-bounties:masterfrom
laurentketterle-hub:feature/mediapipe-score-path
Open

feat: optional MediaPipe subject scoring path#182
laurentketterle-hub wants to merge 2 commits into
mergeos-bounties:masterfrom
laurentketterle-hub:feature/mediapipe-score-path

Conversation

@laurentketterle-hub

@laurentketterle-hub laurentketterle-hub commented Aug 9, 2026

Copy link
Copy Markdown

Closes #34

Optional MediaPipe subject score path

Adds the optional vision path for subject scoring while keeping the toy path as the offline default.

Changes

  • score_subject_against_pose now auto-detects image inputs (.jpg / .png / .webp ...) and routes them through the optional MediaPipe landmark extraction.
  • When the vision extra is not installed, extraction fails, or no person is detected, the function falls back to the synthetic toy vector so scoring still works offline (the toy path remains the default for JSON subjects).
  • cli.py: the score command documents image support and auto-extraction.
  • Results now carry an extractor tag (json-toy / mediapipe / toy-fallback) plus extraction_error on fallback.

Tests (acceptance: fallback tests)

  • tests/test_score_fallback.py covers every branch: JSON toy default, MediaPipe-unavailable fallback, no-person fallback, successful extraction, and unknown-pose KeyError.

All tests pass locally (pytest: 47 passed, 5 skipped).

…rgeos-bounties#34)

- Cover all branches of score_subject_against_pose: JSON toy default,
  MediaPipe-unavailable fallback, no-person fallback, and success path.
- Remove the dead use_mediapipe parameter and hoist the numpy import so
  the module passes ruff (F401/F821).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[200 MRG] Feature: optional MediaPipe subject score path

2 participants