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.1.0.
Local alternative: python -m pip install /path/to/motion_input_grid-1.1.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
Use increasing timestamps in milliseconds and increasing sequence numbers. Calibration requires roughly one second with both shoulders visible. Positions use unmirrored anatomical MediaPipe indices; missing points have zero confidence. Keep each tracker on one owning thread and close it explicitly.
start_camera(runtime_directory) and poll_camera() optionally use a native
camera-enabled SDK plus its MediaPipe runtime and models. 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.1.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 | |
|---|---|---|---|
| motion_input_grid-1.1.0.tar.gz | 287.8 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| motion_input_grid-1.1.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| motion_input_grid-1.1.0-py3-none-manylinux_2_35_x86_64.whl | Python 3 | none | Linux glibc 2.35+ x86-64 | Details |
| motion_input_grid-1.1.0-py3-none-manylinux_2_35_aarch64.whl | Python 3 | none | Linux glibc 2.35+ ARM64 | Details |
Total release size: 1.9 MB
Release files / motion_input_grid-1.1.0.tar.gz
| Download URL | motion_input_grid-1.1.0.tar.gz |
|---|---|
| Size | 287.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f057d2b69316afa7fe9f4cb9ccf39c75152612a1d2dc7c4b10d7df9f36fcd457
|
|
BLAKE2b-256 checksum How to use checksums |
043a57b1872b806e4b557eae7b1132492bf95b151bef4d346adb842a47e982c2
|
| 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.1.0-py3-none-win_amd64.whl
| Download URL | motion_input_grid-1.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 219.7 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4e13d6aacfccdbfffb1b1e039c22456627e0166252275e93048c9cbc1c51e60d
|
|
BLAKE2b-256 checksum How to use checksums |
bf5369e77b779c919fa5aaa1abaa325263a669db4b719d76ce75ead7f62a3926
|
| 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.1.0-py3-none-manylinux_2_35_x86_64.whl
| Download URL | motion_input_grid-1.1.0-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 682.9 kB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c77eae9dcfea3b473bff9bfdd7ff4b77ed58b8df098ebc8374957a4ecdd78d62
|
|
BLAKE2b-256 checksum How to use checksums |
ffd74f1a9513195958136e8c256f1ff9952ef23b93d3b5736f1121ed146c987b
|
| 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.1.0-py3-none-manylinux_2_35_aarch64.whl
| Download URL | motion_input_grid-1.1.0-py3-none-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 671.2 kB |
| Tags | Linux glibc 2.35+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
c4c1be5237b263a3cda43185da0c7e1c6410d04cd4837b9c8c768115c3b90632
|
|
BLAKE2b-256 checksum How to use checksums |
f178cc6d0f6df36b081850b640aa1859195e6cac0dc6ef9071578b279da0b4f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|