Skip to main content

Multi-backend parametric body models (SMPL, SMPLH, SMPLX, FLAME, SKEL, ANNY, MHR, SOMA, GarmentMeasurements, BrainCo, G1) for NumPy, PyTorch, and JAX

Project description

Body model lineup

body-models

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

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

Features

  • Shared API across human, anatomical, hand, head, measurement, and robot models
  • NumPy, PyTorch, and JAX backends
  • Separate mesh and skeleton forwards with forward_vertices() and forward_skeleton()
  • Skinned-mesh and rigid-body helpers for viser
  • 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[viser]"

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)

Supported Models

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

See the model docs for setup, supported backends, inputs, and model-specific behavior.

Extras

Optional integrations live under body_models.extras, including the viser plugin.

import viser
from body_models.extras import viser_plugin as vp
from body_models.smpl.numpy import SMPL

server = viser.ViserServer()
model = SMPL(gender="neutral")
handle = vp.add_body_model(server.scene, "/body", model)
handle.set_pose(**model.get_rest_pose())

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.

Project details


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.11.2.tar.gz (162.7 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.11.2-py3-none-any.whl (279.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: body_models-0.11.2.tar.gz
  • Upload date:
  • Size: 162.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.11.2.tar.gz
Algorithm Hash digest
SHA256 c0fddee78b187fdcfabb497da1770a30e00801f80822d4702d09b68c70f1569a
MD5 978a08f1e5fbf04e4619525ea402c0f4
BLAKE2b-256 c7635df2a315ac12736d1b317b3812ffc1464140651d6bcd23d3e6d7168d5087

See more details on using hashes here.

File details

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

File metadata

  • Download URL: body_models-0.11.2-py3-none-any.whl
  • Upload date:
  • Size: 279.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","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.11.2-py3-none-any.whl
Algorithm Hash digest
SHA256 081f84eea35ff52692cfc3eca35d7c481c26748b68515f127dc8c70ff253c577
MD5 3bbc2906084ea1f2c8a6aa3ea38d67c1
BLAKE2b-256 1c6ec6a1f0e27e2a14cae2c0a3cd41743444efc480d48d7333f8947721a60948

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page