Skip to main content

Universal gait event detection toolkit — 10 methods including BIKE, with C-accelerated backends

Project description

gaitkit (Python)

Python package for gait event detection from motion-capture data.

Install

Current status: PyPI release available (latest stable on PyPI).

Install from local source:

python -m pip install -e ./python
python -m pip install -e "./python[all]"   # optional extras

Once published:

pip install gaitkit

Optional extras:

pip install "gaitkit[all]"   # onnx + deep + viz

Quick Start

import gaitkit

trial = gaitkit.load_example("healthy")
result = gaitkit.detect(trial, method="bike")
print(result.summary())

# Optional: combine C3D markers with an external angle file
result2 = gaitkit.detect("trial_07.c3d", method="bike", angles="res_angles_t.mat")

DeepEvent weights are downloaded automatically on first DeepEvent use and cached in ~/.cache/gaitkit/.

Proprietary JSON I/O (MyoGait-like)

The compatibility API accepts a proprietary JSON payload with angles.frames and can export back a MyoGait-compatible events JSON.

import gaitkit

out = gaitkit.detect_events_structured("bike", "myogait_output_no_events.json", fps=100.0)
paths = gaitkit.export_detection(out, "outputs/trial_07", formats=("json", "myogait"))
print(paths)

Input fields recognized per frame:

  • frame_idx
  • hip_L, knee_L, ankle_L
  • hip_R, knee_R, ankle_R
  • pelvis_tilt, trunk_angle
  • optional landmark_positions

MyoGait-compatible output file (*_myogait_events.json) contains:

  • events.method
  • events.fps
  • events.left_hs, events.right_hs, events.left_to, events.right_to as arrays of {frame, time, confidence}.

Project

Development testing

python -m pip install -e ./python
python -m unittest -v

Build distributions

python -m pip install build
cd python
python -m build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gaitkit-1.4.8.tar.gz (11.9 MB view details)

Uploaded Source

File details

Details for the file gaitkit-1.4.8.tar.gz.

File metadata

  • Download URL: gaitkit-1.4.8.tar.gz
  • Upload date:
  • Size: 11.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gaitkit-1.4.8.tar.gz
Algorithm Hash digest
SHA256 f9348928ba9bab2551b8bf4cf2be1b631a30e1fdb6e9d31593d32b06bf6ffa4f
MD5 a5fec10106d89583188b9c1945d541e8
BLAKE2b-256 68fa3addad6e8f844ba4ac4e7f039026d21a360e0ba2d5306ad6fdc61e87f55f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page