Skip to main content

A simple inverse kinematics solver for MANO hand model, SMPL body model, and SMPL-H body+hand model.

Project description

MPI IK

A simple inverse kinematics solver for MANO hand model, SMPL body model, and SMPL-H body+hand model.

Installation

pip install eden-mpi-ik

For development:

pip install "eden-mpi-ik[dev]"

Usage

from mpi_ik import MANO_LEFT_MODEL_PATH, KinematicModel, KinematicPCAWrapper, MANOArmature, Solver

mesh = KinematicModel(MANO_LEFT_MODEL_PATH, MANOArmature, scale=1000)
wrapper = KinematicPCAWrapper(mesh, n_pose=12)
solver = Solver(verbose=True)

_, keypoints = mesh.set_params(pose_pca=pose_pca, pose_glb=pose_glb, shape=shape)
# keypoints (21, 3)
params_est = solver.solve(wrapper, keypoints)

See examples/mano_example.py for a full working example.

Model Download

Download the official model files from the following sites (registration required):

Model Preparation

Convert official MANO/SMPL/SMPL-H model files into the format expected by this package. By default, converted models are saved to ~/.cache/mpi_ik/:

# Output defaults to ~/.cache/mpi_ik/mano_left.pkl
mpi-ik-prepare --model-type mano-left --input path/to/mano_v1_2/models/MANO_LEFT.pkl

# Or specify a custom output path
mpi-ik-prepare --model-type mano-left --input path/to/mano_v1_2/models/MANO_LEFT.pkl --output custom/path/mano_left.pkl

The cache directory can be overridden with the MPI_IK_CACHE_DIR environment variable.

Acknowledgement

This project is based on Minimal-IK by Yuxiao Zhou.

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

eden_mpi_ik-0.3.1.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

eden_mpi_ik-0.3.1-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file eden_mpi_ik-0.3.1.tar.gz.

File metadata

  • Download URL: eden_mpi_ik-0.3.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for eden_mpi_ik-0.3.1.tar.gz
Algorithm Hash digest
SHA256 dfc7f53308b1f1523dcf1e2b40802c609521505bcffe9e6bb4c1059629e784e2
MD5 8ddf1b7c1777597c0e1f37abc99cdc20
BLAKE2b-256 1cb379982daa75e270e6588087cbf53f9fd55118ea5b4c5b4d0c631c6d78b8b1

See more details on using hashes here.

File details

Details for the file eden_mpi_ik-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: eden_mpi_ik-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for eden_mpi_ik-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 daa7616e99c7980c8c3b1d9b34e174ddb243997c22c659bff597d0e5ec78687e
MD5 e24d34b14fd26636617111c4fd0a436e
BLAKE2b-256 b7f9518aa68c8fd1d0651ae3c0a85c62ef755da7fa487dccb82792150bd784ab

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