Skip to main content

Motion Input Grid (MIG) Python package

English | Français

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

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) 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.

Complete source walkthrough · Bootstrap.

Metadata

Release files for motion-input-grid 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for motion-input-grid 1.2.0
File Size Uploaded Provenance Actions
motion_input_grid-1.2.0.tar.gz 289.2 kB Without provenance Details for motion_input_grid-1.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for motion-input-grid 1.2.0
File Interpreter ABI Platform Actions
motion_input_grid-1.2.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for motion_input_grid-1.2.0-py3-none-win_amd64.whl
motion_input_grid-1.2.0-py3-none-manylinux_2_35_x86_64.whl Python 3 none Linux glibc 2.35+ x86-64 Details for motion_input_grid-1.2.0-py3-none-manylinux_2_35_x86_64.whl
motion_input_grid-1.2.0-py3-none-manylinux_2_35_aarch64.whl Python 3 none Linux glibc 2.35+ ARM64 Details for motion_input_grid-1.2.0-py3-none-manylinux_2_35_aarch64.whl

Total release size: 1.9 MB

Release files / motion_input_grid-1.2.0.tar.gz

Download URL motion_input_grid-1.2.0.tar.gz
Size 289.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cc6318883dcb7757fbd4037a4a89b0c6cc0800f269abf6243de0105a08156784
BLAKE2b-256 checksum
How to use checksums
d4148437392ef2625aad44b7de0aabccdf553b7d21d9401aaab8fae5c2a0877e
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.2.0-py3-none-win_amd64.whl

Download URL motion_input_grid-1.2.0-py3-none-win_amd64.whl
Size 221.7 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
7283842e6a8a2c4011e3bdf4ef1b79d17baae6a369c35c0c5d912d656057db16
BLAKE2b-256 checksum
How to use checksums
94ad7d8e47229425e281090cb969d5ce3e9a194d33c2407bf399329934d686df
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.2.0-py3-none-manylinux_2_35_x86_64.whl

Download URL motion_input_grid-1.2.0-py3-none-manylinux_2_35_x86_64.whl
Size 684.4 kB
Tags Linux glibc 2.35+ x86-64 Python 3
SHA-256 checksum
How to use checksums
ec1e294d4f6c69356f9d67dfb52c3ce4cda7a17f056bd2124d09088825f6453d
BLAKE2b-256 checksum
How to use checksums
daf2fe980d77c19878650018bf29a6e188695299bcf76ee9682af57db0503460
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.2.0-py3-none-manylinux_2_35_aarch64.whl

Download URL motion_input_grid-1.2.0-py3-none-manylinux_2_35_aarch64.whl
Size 672.9 kB
Tags Linux glibc 2.35+ ARM64 Python 3
SHA-256 checksum
How to use checksums
56921244081c4052bd45cb5f9ddcec45df70a6f2605d125f519c35e0c6f21d9c
BLAKE2b-256 checksum
How to use checksums
f026aa4db52c9e7fc7c10bdc91c8ea335e58286e655648b6851c16b65b52bc19
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.2.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page