Motion Input Grid (MIG) Python package
Install from PyPI
python -m pip install motion-input-grid
python -c "from mig import Tracker; print('MIG OK')"
The distribution name is motion-input-grid; the import remains mig.
Prefer a Python 3.10+ virtual environment. Wheels cover Windows x64 and
Linux x64/ARM64 with glibc 2.35+. On other platforms, pip may build the
sdist, requiring a C++20 compiler and CMake 3.25+. To select a version:
python -m pip install motion-input-grid==1.3.0.
Local alternative: python -m pip install /path/to/motion_input_grid-1.3.0-<tags>.whl.
To build from a full checkout: python -m pip install ./bindings/python.
Submit observations
Save a Motion Input Grid Studio profile as profile.json. Pass None to select the bundled
engine or an explicit path to an external SDK. This example submits one frame;
your application should feed the tracker each new observation. One frame alone
does not calibrate or complete a movement.
Python accesses the C++ engine through standard-library ctypes; no Python
inference dependency is required. Wheels include the positions C ABI and
licenses: mig-c.dll on Windows, libmig-c.so.1 on Linux. No camera estimator
or models are included. The sdist contains the canonical engine and JSON headers;
rebuilding requires CMake 3.25+ and a C++20 compiler. Linux builds use GCC and
its runtime copyright notices.
from pathlib import Path
from mig import Packet, Tracker
profile = Path("profile.json").read_text(encoding="utf-8")
with Tracker(None, profile) as tracker:
frame = Packet(timestamp_ms=20, sequence=1, aspect=16 / 9)
frame.set_body(11, 0.65, 0.45)
frame.set_body(12, 0.35, 0.45)
frame.set_body(15, 0.4, 0.6)
for action, input_id in tracker.update(frame):
print(action, input_id)
Lifecycle and camera
| For each observation | Rule |
|---|---|
| Time and sequence | Increasing milliseconds and sequence numbers |
| Calibration | Roughly one second with both shoulders visible |
| Positions | Unmirrored anatomical MediaPipe indices; zero confidence for missing points |
| Ownership | One thread per tracker; use close() or a context manager |
start_camera(runtime_directory, index=0, model=None) and poll_camera() optionally use a native
camera-enabled SDK plus its MediaPipe runtime and models; model selects
"lite" (default), "full" or "heavy" when that file is available locally. Poll already updates
recognition; consume events() afterward without submitting the frame twice.
Action callbacks are logical events; keyboard injection is the host's choice.
See the repository's examples and ABI contract for body and hand XYZ packets, capture ownership, Pygame and Tkinter integration.
Metadata
Release files for motion-input-grid 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| motion_input_grid-1.3.0.tar.gz | 298.4 kB | Without provenance | Details for motion_input_grid-1.3.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| motion_input_grid-1.3.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for motion_input_grid-1.3.0-py3-none-win_amd64.whl |
| motion_input_grid-1.3.0-py3-none-manylinux_2_35_x86_64.whl | Python 3 | none | Linux glibc 2.35+ x86-64 | Details for motion_input_grid-1.3.0-py3-none-manylinux_2_35_x86_64.whl |
| motion_input_grid-1.3.0-py3-none-manylinux_2_35_aarch64.whl | Python 3 | none | Linux glibc 2.35+ ARM64 | Details for motion_input_grid-1.3.0-py3-none-manylinux_2_35_aarch64.whl |
Total release size: 1.9 MB
Release files / motion_input_grid-1.3.0.tar.gz
| Download URL | motion_input_grid-1.3.0.tar.gz |
|---|---|
| Size | 298.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4670218607103a4b2efc937624a01d498bb667cb8c345799fa8984bb1481adea
|
|
BLAKE2b-256 checksum How to use checksums |
a1bbbc5a002a736152229c3b40cd41ba8effe8ad6c369d9a9cb153a14eef69e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / motion_input_grid-1.3.0-py3-none-win_amd64.whl
| Download URL | motion_input_grid-1.3.0-py3-none-win_amd64.whl |
|---|---|
| Size | 222.0 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
147036f6acdfc0c4654fb2cadd301fda78013f371b42a610f8d277bbb4a64fa2
|
|
BLAKE2b-256 checksum How to use checksums |
65bf2355df8acb48f4360ddbb8080a7ca17defd814a57985320921aa411088ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / motion_input_grid-1.3.0-py3-none-manylinux_2_35_x86_64.whl
| Download URL | motion_input_grid-1.3.0-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 685.5 kB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
b9534407deaea4a2577f36fdd2812926ad00bb17803debe558274a687d0d88ab
|
|
BLAKE2b-256 checksum How to use checksums |
bb7855cb6317d7c1fc9db29fad22871e87852f5bbe3eca8d6dd3d3743d39a267
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / motion_input_grid-1.3.0-py3-none-manylinux_2_35_aarch64.whl
| Download URL | motion_input_grid-1.3.0-py3-none-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 674.0 kB |
| Tags | Linux glibc 2.35+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
d1650c24269fc62f625fb844d8fb0713dee4b24249b2f7610eecb6f3ad53166c
|
|
BLAKE2b-256 checksum How to use checksums |
6afa173fc24019351006c76a385df0a567dc30eaa65707c400ac24ccc4779a11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for motion-input-grid 1.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.