Skip to main content

Body model lineup

body-models

body-models provides a shared interface for parametric human body, head, hand, anatomical, measurement, and robot models with NumPy, PyTorch, and JAX runtimes.

Documentation: https://abcamiletto.github.io/body-models/

Features

  • NumPy, PyTorch, and JAX runtimes
  • Optional Warp acceleration for Torch skinning
  • Separate mesh and skeleton forwards with forward_vertices() and forward_skeleton()
  • Prepared identities for repeated poses with fixed shape/expression parameters
  • Mesh simplification and vertex-subset forwards for supported mesh models
  • Multiple rotation representations for supported pose models

Install

uv add body-models

Install optional extras when needed:

uv add "body-models[torch]"
uv add "body-models[jax]"
uv add "body-models[torch,warp]"

Public model assets download on first use into the operating system's private user cache. Licensed assets use body-models download MODEL, which prompts for credentials. Use body-models download MODEL --output-dir PATH when assets should live in a specific directory; run body-models to inspect the cache and configured paths.

Quick Start

from body_models.smpl.torch import SMPL

model = SMPL(gender="neutral")
params = model.get_rest_pose(batch_dims=(1,))

vertices = model.forward_vertices(**params)
skeleton = model.forward_skeleton(**params)

Every model exposes a machine-readable description of those parameters:

model.parameter_spec
# {
#     "shape": ParameterSpec(shape=(10,), role="identity", ...),
#     "body_pose": ParameterSpec(shape=(23, 3), role="pose", rotation_type="axis_angle", ...),
#     ...
# }

Each entry reports the unbatched array shape, semantic role, numeric default, and rotation representation when applicable. A rotation representation implies the corresponding identity rotation. get_rest_pose() constructs its arrays directly from this specification.

Select NumPy, Torch, or JAX in the import path. Torch models expose their skinning implementation directly:

from body_models.smpl.torch import SMPL

model = SMPL(gender="neutral", skinning_backend="warp")
model = model.cuda()

Models imported from a torch module are torch.nn.Module instances, so .to(), .cuda(), and state_dict() work directly.

The equivalent NumPy and JAX classes live in body_models.smpl.numpy and body_models.smpl.jax. Discover available model names with body_models.list_models(). The create_model() factory remains available when the model and runtime must be selected dynamically.

Public API

The stable API consists of names exported from body_models and each model backend package. For example, body_models.smpl.torch.SMPL is public; underscore-prefixed modules such as body_models.smpl._model are implementation details and are not covered by semantic-versioning compatibility guarantees. Every model derives from body_models.ArticulatedModel. Skinned model packages also export model-specific prepared-state types when their schema is unique. Shared linear models use body_models.LinearIdentity and body_models.SkinningPose. Required numerical inputs may be positional; optional model arguments are keyword-only.

The shared metadata API exposes joint_names, parents, num_joints, common_joints, has_hands, and has_face. Fixed model dimensions use NUM_* class constants such as NUM_BODY_JOINTS, NUM_SHAPE_COEFFS, and NUM_BODY_POSE_COEFFS; a model defines only the dimensions that are meaningful for that model. Dimensions selected by a constructor option remain instance properties, such as SOMA's num_shape_coeffs.

When shape-dependent identity parameters stay fixed across many poses, prepare them once and pass the returned dictionary back through identity. This avoids recomputing rest joints, local offsets, and rest vertices on every forward pass.

shape = params.pop("shape")
identity = model.prepare_identity(shape)

vertices = model.forward_vertices(**params, identity=identity)
skeleton = model.forward_skeleton(**params, identity=identity)

For models with expression-dependent rest state, such as SMPL-X and FLAME, pass both identity controls to prepare_identity(shape, expression). Prepared identities and poses on skinned models are always complete mesh-ready values; skeleton forwards use separate lightweight internal preparation and never return partial state.

Supported Models

  • Full bodies: SMPL, SMPL-H, SMPL-X, ANNY, MHR, SOMA, GarmentMeasurements
  • Anatomicals: SKEL, MyoFullBody
  • Heads: FLAME
  • Hands: MANO
  • Robots and humanoids: BrainCo, G1, SmplHumanoid

See the model docs for setup, supported runtimes, inputs, and model-specific behavior. The architecture guide describes the model, runtime, and shared-operation boundaries.

Development

uv run ruff format .
uv run ruff check .
uv run ty check

License

See the documentation and upstream model projects for model-specific license terms.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

body_models-0.22.1.tar.gz (152.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

body_models-0.22.1-py3-none-any.whl (215.3 kB view details)

Uploaded Python 3

File details

Details for the file body_models-0.22.1.tar.gz.

File metadata

  • Download URL: body_models-0.22.1.tar.gz
  • Upload date:
  • Size: 152.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for body_models-0.22.1.tar.gz
Algorithm Hash digest
SHA256 4c02fef3422fd9dcdea9bea8909bf3b62a4142df5d044c328114d1794d630cd8
MD5 2308dca48648fbf67b613c9a5e25dec7
BLAKE2b-256 08ffe4d616a69ae9e6f0725260bdf505013dbdb66c5d0dd26be2483dbd43c57a

See more details on using hashes here.

File details

Details for the file body_models-0.22.1-py3-none-any.whl.

File metadata

  • Download URL: body_models-0.22.1-py3-none-any.whl
  • Upload date:
  • Size: 215.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for body_models-0.22.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f1178fa1be1952d4c304bfa0063d32a7042baf780b03b00db72647db8598cb3
MD5 fcfa4133d7fb3fbf6a6310fa5fb48a4a
BLAKE2b-256 73584376bc9c5513c1de6309210ceece854445d4321f249e28177f3da70f86f6

See more details on using hashes here.

Release history Release notifications | RSS feed

0.26.0

2 files

0.25.1

2 files

0.25.0

2 files

0.24.1

2 files

0.24.0

2 files

0.23.0

2 files

This release

0.22.1 This release

2 files

0.22.0

2 files

0.21.2

2 files

0.21.1

2 files

0.21.0

2 files

0.20.1

2 files

0.20.0

2 files

0.19.1

2 files

0.19.0

2 files

0.18.14

2 files

0.18.13

2 files

0.18.12

2 files

0.18.11

2 files

0.18.10

2 files

0.18.9

2 files

0.18.8

2 files

0.18.7

2 files

0.18.6

2 files

0.18.5

2 files

0.18.4

2 files

0.18.3

2 files

0.18.2

2 files

0.18.1

2 files

0.18.0

2 files

0.17.0

2 files

0.16.0

2 files

0.15.1

2 files

0.14.1

2 files

0.14.0

2 files

0.13.4

2 files

0.13.3

2 files

0.13.2

2 files

0.13.1

2 files

0.13.0

2 files

0.12.0

2 files

0.11.4

2 files

0.11.3

2 files

0.11.2

2 files

0.11.1

2 files

0.11.0

2 files

0.10.4

2 files

0.10.3

2 files

0.10.2

2 files

0.10.1

2 files

0.10.0

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.8.4

2 files

0.8.2

2 files

0.8.0

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.4

2 files

0.5.2

2 files

0.5.1

2 files

0.5.0

2 files

0.4.3

2 files

0.4.2

2 files

0.4.1

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page