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.0.2.
Local alternative: python -m pip install /path/to/motion_input_grid-1.0.2-<tags>.whl.
To build from a full checkout: python -m pip install ./bindings/python.
Submit observations
Save a configurator 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.0.2
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.0.2.tar.gz | 275.7 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| motion_input_grid-1.0.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| motion_input_grid-1.0.2-py3-none-manylinux_2_35_x86_64.whl | Python 3 | none | Linux glibc 2.35+ x86-64 | Details |
| motion_input_grid-1.0.2-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.0.2.tar.gz
| Download URL | motion_input_grid-1.0.2.tar.gz |
|---|---|
| Size | 275.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b9738769ede1021310aacb23575c4af8c5175ac825faa9747fd3aa40d072ab9
|
|
BLAKE2b-256 checksum How to use checksums |
787a212e867a3901adab775e7b04fd3fb930c01494ed65468a7f193e310e44ca
|
| 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.0.2-py3-none-win_amd64.whl
| Download URL | motion_input_grid-1.0.2-py3-none-win_amd64.whl |
|---|---|
| Size | 227.9 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7546cca582a52f0d58f9328f90c6b40cd66c9e23f83cb4be2283346be2c6f1ed
|
|
BLAKE2b-256 checksum How to use checksums |
e49ced81fdf7828bf4c71ad18a5cc0c61e7994fe96511930aa344897b8c18302
|
| 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.0.2-py3-none-manylinux_2_35_x86_64.whl
| Download URL | motion_input_grid-1.0.2-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 704.6 kB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7f00298788176ed4b35e4616524eac268192cc828f6a11bcf6acd063682b0862
|
|
BLAKE2b-256 checksum How to use checksums |
67037ec732107fc65cbe23e922a7440d440f5a5e903fab4e05d458ac84a714e7
|
| 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.0.2-py3-none-manylinux_2_35_aarch64.whl
| Download URL | motion_input_grid-1.0.2-py3-none-manylinux_2_35_aarch64.whl |
|---|---|
| Size | 694.4 kB |
| Tags | Linux glibc 2.35+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
56ae2458a4e5fe0d4e9a03378f6a70a2eca1ef757047a6c928abbbbf8344dc30
|
|
BLAKE2b-256 checksum How to use checksums |
a25741d58cf95e99423617bc6e44f69e669faba19c1ea1f21b1d2362b12f8305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|