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_MODEL_PATH, KinematicModel, KinematicPCAWrapper, MANOArmature, Solver

mesh = KinematicModel(MANO_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.pkl
mpi-ik-prepare --model-type mano --input path/to/mano_v1_2/models/MANO_LEFT.pkl

# Or specify a custom output path
mpi-ik-prepare --model-type mano --input path/to/mano_v1_2/models/MANO_LEFT.pkl --output custom/path/mano.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 Distributions

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

Built Distribution

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

eden_mpi_ik-0.3.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eden_mpi_ik-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bce02985d38675a6f4c78272d756bef1116cebb6ef1474c08740c597770ab106
MD5 d36469d35f535372c6ecfb2779586d34
BLAKE2b-256 3b4f71814dba677cff063a5a0aed52065839e594e2c04d121c1dac67739e40e5

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