get_cached_body_model#

smplfitter.pt.get_cached_body_model(model_name='smpl', gender='neutral', model_root=None)#

Return a cached BodyModel instance, creating it on first call.

Subsequent calls with the same arguments return the same object, avoiding redundant file I/O and initialization.

Parameters:
  • model_name – Body model type ('smpl', 'smplx', 'smplh', etc.).

  • gender – Gender ('neutral', 'female', 'male').

  • model_root – Path to model directory. See BodyModel for defaults.

Returns:

A BodyModel instance (shared, do not modify in place).