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):
- MANO: https://mano.is.tue.mpg.de/
- SMPL: https://smpl.is.tue.mpg.de/
- SMPL-H: https://mano.is.tue.mpg.de/ (included with MANO download)
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file eden_mpi_ik-0.3.2.tar.gz.
File metadata
- Download URL: eden_mpi_ik-0.3.2.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5e17bfad6d609be03c5392afc5762004b9697c7c34b7e4a169fa850fcb60f1f9
|
|
| MD5 |
6cd8d36de6040da7fd685b9923cb2b69
|
|
| BLAKE2b-256 |
ca9642d1291ccad7c0c0a4174ee47a054b900ff2827bd2cf20ecec763baf34b7
|
File details
Details for the file eden_mpi_ik-0.3.2-py3-none-any.whl.
File metadata
- Download URL: eden_mpi_ik-0.3.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93905ec738b08c24781686648556b2c2d03092077f448213dd309aa00c25c141
|
|
| MD5 |
e3b83f9620b4159ba64d136ee94cf20c
|
|
| BLAKE2b-256 |
b82b79ec4063799cbb58e8492a274d2ff93768465c28f1919219df95a3f2fdf9
|