MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / _default_smpl_model_path

Function _default_smpl_model_path

motion_rep/motion_checker.py:31–47  ·  view source on GitHub ↗

Resolve SMPL/SMPLX family model path with sensible defaults. Env overrides: - SMPLX_MODEL_PATH for smplx - SMPLH_MODEL_PATH for smplh Fallback to project-local body_models/{smpl_type}

(smpl_type: str)

Source from the content-addressed store, hash-verified

29
30
31def _default_smpl_model_path(smpl_type: str) -> str:
32 """Resolve SMPL/SMPLX family model path with sensible defaults.
33
34 Env overrides:
35 - SMPLX_MODEL_PATH for smplx
36 - SMPLH_MODEL_PATH for smplh
37 Fallback to project-local body_models/{smpl_type}
38 """
39 if smpl_type == "smplx":
40 env_path = os.environ.get("SMPLX_MODEL_PATH")
41 fallback = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "data", "body_models", "smplx"))
42 elif smpl_type == "smplh":
43 env_path = os.environ.get("SMPLH_MODEL_PATH")
44 fallback = os.path.normpath(os.path.join(os.path.dirname(__file__), "..", "data", "body_models", "smplh"))
45 else:
46 raise ValueError(f"Unsupported smpl_type: {smpl_type}")
47 return env_path or fallback
48
49
50def get_video_properties(video_path: str) -> Tuple[int, int, int]:

Callers 1

motion_visFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected