Skip to main content

SMPL-X Mannequin

mannequin-x provides two lightweight figures driven by SMPL-X body and hand rotations. convex is a simulation-friendly human made from rigid convex hulls in three LODs. wooden, the default, is a skinned mannequin at its source resolution.

All designs accept pose dictionaries with the same fields as body-models. Ten SMPL-X shape coefficients resize their bones and geometry. The NumPy runtime includes the required shape calibration, so it does not need SMPL-X model files.

pip install mannequin-x

Python API

import numpy as np

from mannequin import Mannequin

shape = np.zeros(10, dtype=np.float32)
shape[0] = 1.5

model = Mannequin("wooden", shape=shape, flat_hand_mean=False)
pose = model.rest_pose()
pose["body_pose"][17, 2] = 0.8

vertices = model.vertices(pose)
faces = model.faces
joint_transforms = model.joint_transforms(pose)

The same methods accept the parameter dictionary returned by body-models without renaming fields:

from body_models.smplx.numpy import SMPLX

smplx = SMPLX(model_path="SMPLX_NEUTRAL.npz", flat_hand_mean=False)
rest = smplx.get_rest_pose()

joint_transforms = model.forward_skeleton(**rest)
# Equivalent shorthand:
joint_transforms = model.joint_transforms(rest)
vertices = model.vertices(rest)

flat_hand_mean defaults to False, matching SMPL-X. In this mode, zero hand parameters produce the relaxed mean hand pose. Pass flat_hand_mean=True when using SMPL-X parameters created with the flat-hand convention.

forward_skeleton() accepts the body_pose, head_pose, hand_pose, pelvis_rotation, shape, expression, global_rotation, and global_translation fields from body-models. rest_pose() returns those same fields. joint_names uses the SMPL-X names Spine1, Spine2, Spine3, L_Foot, R_Foot, L_Collar, and R_Collar. The mannequin omits the jaw and eye joints and adds zero-length L_Hand and R_Hand skinning joints at the wrists. It accepts but ignores head_pose and expression because neither mannequin has the corresponding joints or geometry.

Create the convex model with Mannequin("convex", lod=0). Its LODs contain 80, 52, and 22 hulls respectively. The wooden model has one resolution, so it does not accept lod.

rest_pose() returns a mutable dictionary with the body-models fields:

  • body_pose: [..., 21, 3] SMPL-X body rotations
  • head_pose: [..., 3, 3] unused jaw and eye rotations
  • hand_pose: [..., 30, 3] left and right hand rotations
  • global_rotation: [..., 3] world rotation
  • pelvis_rotation: [..., 3] pelvis rotation about the pelvis joint
  • global_translation: [..., 3] world translation
  • shape: [..., 10] mannequin shape coefficients
  • expression: [..., 10] unused expression coefficients

global_rotation rotates the whole figure around the SMPL-X origin. pelvis_rotation rotates the body around the pelvis without moving the pelvis. Rotations use axis-angle vectors. Leading batch dimensions are supported.

Shape is identity state, not motion state. Set it at construction or call model.reshape(shape). Pose evaluation then stays concise:

model.reshape(new_shape)
vertices = model.vertices(pose)
links = model.link_transforms(pose)

Viser

Install the optional viewer dependency with pip install mannequin-x[viser].

import viser

from mannequin import Mannequin, add_to_scene

server = viser.ViserServer()
model = Mannequin("wooden")
handle = add_to_scene(server.scene, "/mannequin", model)

handle.set_pose(model.rest_pose())
handle.set_position((1.0, 0.0, 0.0))
handle.set_shape(new_shape)
handle.set_palette("sage")

Pass one of sand, ivory, charcoal, sage, clay, slate, or wood to add_to_scene(..., palette=...) or handle.set_palette(...). Wooden meshes use Viser's native add_mesh_skinned(), so pose updates send bone transforms instead of vertex buffers.

Run the live comparison against a local neutral SMPL-X model:

uv run python examples/compare.py /path/to/SMPLX_NEUTRAL.npz

The viewer shows convex, wooden, and full SMPL-X figures with matched motion, random hand poses, shape controls, front and side views, a T-pose button, and a shared palette. The SMPL-X file remains external to the package.

Assets

src/mannequin/assets/wooden.npz retains its source vertices and skin weights, converts coordinates, triangulates faces, and maps 52 source bones onto this package's joint hierarchy. Rebuild it with authoring/import_wooden.py.

authoring/bake_calibration.py uses the NumPy SMPL-X implementation from body-models to bake the joint, ground-plane, head, and height response for the first ten shape coefficients. Pass it a local SMPLX_NEUTRAL.npz; the runtime does not depend on body-models or the SMPL-X file. The wooden torso keeps its source proportions.

Metadata

Release files for mannequin-x 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mannequin-x 0.3.0
File Size Uploaded Provenance Actions
mannequin_x-0.3.0.tar.gz 769.4 kB Without provenance Details for mannequin_x-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mannequin-x 0.3.0
File Interpreter ABI Platform Actions
mannequin_x-0.3.0-py3-none-any.whl Python 3 none any Details for mannequin_x-0.3.0-py3-none-any.whl

Total release size: 1.5 MB

Release files / mannequin_x-0.3.0.tar.gz

Download URL mannequin_x-0.3.0.tar.gz
Size 769.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8833d17c71a1de69b0d25f4ef58104399b4294d3efee793ce6a7d4ff8f890e44
BLAKE2b-256 checksum
How to use checksums
5760b8a5ee14ac53f7298467dd2499fa6c632273c6cc176742ceeae98c0e959d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","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}

Release files / mannequin_x-0.3.0-py3-none-any.whl

Download URL mannequin_x-0.3.0-py3-none-any.whl
Size 773.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c343d8ad6be17770e396ba9119d4a0fc605fad8eb8580d72e95f61fe4a6a8a6b
BLAKE2b-256 checksum
How to use checksums
6aaf4711d4f4ff92b4859e7ef9da4cb4895577dab4998f44ef257900d44dc0f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","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}

Security for mannequin-x 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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