Skip to main content

A suite of SMPL functionality written over gloss

Project description

🚶‍♂️ SMPL-rs

Smpl-rs is the suite of SMPL functionality implemented in Rust over gloss. It has features for creating smpl-bodies, modifying and rendering them

Crates.io PyPI License: MIT

SMPL-rs Banner

Features

  • Run forward passes through SMPL models (betas -> mesh)
  • Modify betas and expression parameters of the SMPL model in real time
  • Interfaces with gloss for rendering meshes both in native and web

Documentation

Getting Started

The easiest way to get started with smpl-rs is to install the Python bindings.

$ pip install smpl-rs

Some examples of how to use the python bindings can be found in the python examples linked above.

Data

To use smpl-rs you need to download the SMPL-X data.

  • Download the models from here (Download SMPL-X with removed headbun NPZ).
  • After this change the paths in the misc_scripts/standardize_smpl.py file to the path where you downloaded the models and where you want to save the standardized models. You will need some additional files provided in the data/smplx folder.
  • Then run as python misc_scripts/standardize_smpl.py to standardize the models. Lazy loading will need to be set to the path where you saved the standardized models.

Installation and Dependencies

The main dependency is gloss which will be downloaded and compiled automatically when building this package. You will need rust, and the rest is handled by cargo. To install Rust, simply run the following in your terminal:

$ curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh

Some additional dependencies for Linux:

$ sudo apt-get install libvulkan-dev vulkan-tools xorg-dev libxkbcommon-x11-dev

For MacOs, it should run out of the box.

For running the Rust examples

$ cd smpl-rs
$ cargo run --bin smpl_minimal

For running the Python examples

$ cd smpl-rs/bindings/smpl_py
$ pip install gloss-rs smpl-rs 
$ ./examples/minimal.py

Quick useful commands

  • Run performance tests: cargo bench -p smpl-core --benches

Some more Information

  • The SMPL suite renders using gloss and therefore uses an Entity-Component-System (ECS) framework. For more info on ECS check here. However to be noted that we use [Hecs] for our ECS system but most of them are very similar.
  • Components like Animation and Betas are added to entities and that dictates which systems it uses. If you don't want animation on the avatar, just comment out the component for it when creating the entity.
  • For adding new functionality to gloss we use callbacks. This is needed because on WASM the rendering loop cannot be explictly controlled.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

smpl_rs-0.9.0-pp310-pypy310_pp73-win_amd64.whl (7.0 MB view details)

Uploaded PyPyWindows x86-64

smpl_rs-0.9.0-pp39-pypy39_pp73-win_amd64.whl (7.0 MB view details)

Uploaded PyPyWindows x86-64

smpl_rs-0.9.0-pp38-pypy38_pp73-win_amd64.whl (7.0 MB view details)

Uploaded PyPyWindows x86-64

smpl_rs-0.9.0-cp313-cp313t-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.13tWindows x86-64

smpl_rs-0.9.0-cp38-abi3-win_amd64.whl (7.0 MB view details)

Uploaded CPython 3.8+Windows x86-64

smpl_rs-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.8 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

smpl_rs-0.9.0-cp38-abi3-macosx_11_0_arm64.whl (5.9 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

smpl_rs-0.9.0-cp38-abi3-macosx_10_14_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.8+macOS 10.14+ x86-64

File details

Details for the file smpl_rs-0.9.0-pp310-pypy310_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for smpl_rs-0.9.0-pp310-pypy310_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 c7afb300ba630651748aa62532f6c567272df1c9bbe10f0aa8a1446f788a9f9d
MD5 d905327795425a2e89bc91c2622f4fd6
BLAKE2b-256 d3fa21a88b26bd641b3ababdb78310e24674932a991502f87bad0e8c043e7dfa

See more details on using hashes here.

File details

Details for the file smpl_rs-0.9.0-pp39-pypy39_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for smpl_rs-0.9.0-pp39-pypy39_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 2904cceccf1b95f6c9fcb1110128cedec2ccf664c9318d9bb9fd1269ea27633c
MD5 bb181ff4f6f8d8da810ca6276953fbf7
BLAKE2b-256 ab27d237216713aa8f0ac7b3f188c44b55f0a5541e6fe6c916c2600a24225ac2

See more details on using hashes here.

File details

Details for the file smpl_rs-0.9.0-pp38-pypy38_pp73-win_amd64.whl.

File metadata

File hashes

Hashes for smpl_rs-0.9.0-pp38-pypy38_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 fb5cf4e3dbc1bdaba64fe62d4c8a6e6a47303c9ee3f18ca1b60981de9b311d37
MD5 9fa35d651e27b5ba1b433dbe0e28e919
BLAKE2b-256 2a9f724c62606e0ad5bedbafb6bb4fe43fb7d124d69df139946f97d9d376c57c

See more details on using hashes here.

File details

Details for the file smpl_rs-0.9.0-cp313-cp313t-win_amd64.whl.

File metadata

  • Download URL: smpl_rs-0.9.0-cp313-cp313t-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.13t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for smpl_rs-0.9.0-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 8bbd022dc28194da65a6f9990d5f32d3c99aaa86e6dcc60694cc39260d489cf0
MD5 48489b020ac29432e2d10186f08df977
BLAKE2b-256 416c9de76d899071eed8b55fee8940258724d5cc5003f3ee272adfe4c5599596

See more details on using hashes here.

File details

Details for the file smpl_rs-0.9.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: smpl_rs-0.9.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for smpl_rs-0.9.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d066a72dc69c2c263b8fd7836cfa0bd5652d30a4767558cdd1b7cc7bbf592e7b
MD5 5ca2721ea5e89533edfd9c6fd5d6f2d4
BLAKE2b-256 2748e4c513827f0e01fa72b18562a7077777ac82594368614037022d0c6d0f5d

See more details on using hashes here.

File details

Details for the file smpl_rs-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for smpl_rs-0.9.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c22587f5ce45c5bcbcc6a6e272041980365797a007959f50da03384272be2099
MD5 4ce5cc7b632221ea9111bfcb1685f2af
BLAKE2b-256 d31b1588edcb5488d43bdf41b90aa68584063141f54b923d1e836ea16325e0e0

See more details on using hashes here.

File details

Details for the file smpl_rs-0.9.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for smpl_rs-0.9.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c0be7f8221b7d4954a0fa3535a0b312fee9c34533077a94d6c3b110b1919a078
MD5 6fc9a84279d255a7216a23721d2480c1
BLAKE2b-256 13be1fb04ecbdd3052b95ea4329be43140ef072b37e026fb2ab87549f81c5a24

See more details on using hashes here.

File details

Details for the file smpl_rs-0.9.0-cp38-abi3-macosx_10_14_x86_64.whl.

File metadata

File hashes

Hashes for smpl_rs-0.9.0-cp38-abi3-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 9be09d26cacc15a8fb23701992de21366fcdd040a92413dbe6518a7190c410e8
MD5 dac31c337f46a903ebb3d3e349f8d832
BLAKE2b-256 8f25ee4d275cbec2bc9943e5dca84821d76a2614924416ab235854b8b73ca06a

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