MCPcopy Create free account
hub / github.com/AdaptiveMotorControlLab/FMPose3D / get_model

Function get_model

fmpose3d/models/base_model.py:54–64  ·  view source on GitHub ↗

Return the model class registered under *name*. Raises :class:`KeyError` with a helpful message when the name is unknown.

(name: str)

Source from the content-addressed store, hash-verified

52
53
54def get_model(name: str) -> type["BaseModel"]:
55 """Return the model class registered under *name*.
56
57 Raises :class:`KeyError` with a helpful message when the name is unknown.
58 """
59 if name not in _MODEL_REGISTRY:
60 available = ", ".join(sorted(_MODEL_REGISTRY)) or "(none)"
61 raise KeyError(
62 f"Unknown model '{name}'. Available models: {available}"
63 )
64 return _MODEL_REGISTRY[name]
65
66
67def list_models() -> list[str]:

Callers 5

main_animal3d.pyFile · 0.90
vis_animals.pyFile · 0.90
FMPose3D_main.pyFile · 0.90
_setup_modelMethod · 0.90
vis_in_the_wild.pyFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected