Skip to content

Promote _pose_estimator._get_model_path to a public helper #360

Closed

Description

@alexarje

_posetools.extract_pose_landmarks reuses the MediaPipe model download/cache via the private _pose_estimator._get_model_path() (TODO already in code, added during #353 review). Promote it to a small public helper so cross-module use isn't coupled to a private name. Related: revisit the Solutions-vs-Tasks API preference (use_solutions = hasattr(mp, 'solutions')) once the legacy family is fully retired — also marked in-code.

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue on Aug 6, 2026
  2. alexarje commented on Aug 6, 2026

    @alexarje
    ContributorAuthor

    Done in 744169f: _get_model_path is promoted to a module-level public helper, musicalgestures.get_pose_model_path(model_complexity=1, models_dir=None) in _pose_estimator.py, exported from the package root. extract_pose_landmarks now calls it instead of the private method, MediaPipePoseEstimator._get_model_path delegates to it, and the model URLs/names live in module-level constants (the class attributes remain as aliases). Covered by a regression test (test_get_pose_model_path_cache) that checks download-once caching and the invalid-complexity fallback.

    The second point (dropping the Solutions-API preference once legacy mediapipe wheels are fully retired) remains marked in-code in _posetools.py and is out of scope here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions