Skip to main content

GaitSetPy ✨

DOI PyPI version Docs CodeRabbit Pull Request Reviews

GaitSetPy is a Python package for gait analysis and recognition. It provides clean, modern APIs to preprocess, analyze, extract features, classify, and visualize gait data across multiple datasets and modalities.


📚 Table of Contents


Features

  • Gait data preprocessing
  • Feature extraction (generic and dataset-specific)
  • Machine learning and deep learning models for recognition
  • Exploratory data analysis and visualization tools
  • Class-based API with legacy compatibility

Supported Datasets

IMU Sensor Based

  • Daphnet: https://archive.ics.uci.edu/dataset/245/daphnet+freezing+of+gait Supported
  • MobiFall: https://bmi.hmu.gr/the-mobifall-and-mobiact-datasets-2/ In Progress
  • HAR-UP (formerly UPFall): https://sites.google.com/up.edu.mx/har-up/ Supported
  • UrFall: https://fenix.ur.edu.pl/~mkepski/ds/uf.html Supported
  • Activity Net - Arduous: https://www.mad.tf.fau.de/research/activitynet/wearable-multi-sensor-gait-based-daily-activity-data/ In Progress

Pressure/Force Sensor Based

  • PhysioNet Gait in Parkinson's Disease: https://physionet.org/content/gaitpdb/1.0.0/ Completed

Installation

From PyPI:

pip install gaitsetpy

From source:

git clone https://github.com/Alohomora-Labs/gaitSetPy.git
python setup.py install

Optionally, also install requirements:

pip install -r requirements.txt

Quickstart

import gaitsetpy as gsp

# Daphnet: Load, window, extract features, visualize
loader = gsp.DaphnetLoader()
data, names = loader.load_data("data/daphnet")
windows = loader.create_sliding_windows(data, names, window_size=192, step_size=32)
extractor = gsp.GaitFeatureExtractor()
features = extractor.extract_features(windows[0]['windows'], fs=64)

from gaitsetpy.eda import SensorStatisticsAnalyzer
analyzer = SensorStatisticsAnalyzer()
analyzer.visualize(windows[0]['windows'], features, sensor_name="shank", start_idx=0, end_idx=1000, num_windows=15)

# Train & evaluate a Random Forest
rf = gsp.RandomForestModel(n_estimators=50, random_state=42, max_depth=10)
rf.train(features)
metrics = rf.evaluate(features)
print(metrics.get('accuracy'))

Examples: Notebooks and Scripts

  • Notebooks (examples/notebooks):
    • Daphnet_demo.ipynb, HARUP_demo.ipynb, PhysioNet_demo.ipynb, UrFall_demo.ipynb
    • Open with Jupyter: jupyter notebook examples/notebooks/HARUP_demo.ipynb
  • Scripts (examples/scripts):
    • daphnet_all_models_example.py, harup_example.py, physionet_example.py, urfall_example.py
    • Run via Python: python examples/scripts/harup_example.py

These examples mirror the latest APIs and are maintained alongside code updates.


Usage by Dataset (Code Snippets)

Below are minimal, copy-pasteable examples for each supported dataset.

Daphnet

import gaitsetpy as gsp
loader = gsp.DaphnetLoader()
data, names = loader.load_data("data/daphnet")
windows = loader.create_sliding_windows(data, names, window_size=192, step_size=32)
features = gsp.GaitFeatureExtractor().extract_features(windows[0]['windows'], fs=64)

HAR-UP

import gaitsetpy as gsp
loader = gsp.HARUPLoader()
harup_data, harup_names = loader.load_data("data/harup")
windows = loader.create_sliding_windows(harup_data, harup_names, window_size=100, step_size=50)
# Dataset-specific feature extraction
features_data = loader.extract_features(windows)

UrFall

import gaitsetpy as gsp
loader = gsp.UrFallLoader()
# Load pre-extracted depth-map features
data, names = loader.load_data("data/urfall", data_types=['features'], use_falls=True, use_adls=True)
windows = loader.create_sliding_windows(data, names, window_size=30, step_size=15)
# Filepaths for media modalities
video_paths = loader.get_file_paths("data/urfall", 'video')
depth_paths = loader.get_file_paths("data/urfall", 'depth', sequences=['fall-01'])
print(loader.get_activity_info())
print(loader.get_feature_info())

PhysioNet (VGRF)

import gaitsetpy as gsp
loader = gsp.PhysioNetLoader()
data, names = loader.load_data("data/physionet")
windows = loader.create_sliding_windows(data, names, window_size=600, step_size=100)
features = gsp.PhysioNetFeatureExtractor().extract_features(windows[0]['windows'], fs=100)
labels = loader.get_labels()

MobiFall

import gaitsetpy as gsp
loader = gsp.MobiFallLoader()
# Depending on your local dataset layout
data, names = loader.load_data("data/mobifall")
windows = loader.create_sliding_windows(data, names, window_size=256, step_size=64)
# Use generic gait feature extractor
features = gsp.GaitFeatureExtractor().extract_features(windows[0]['windows'], fs=50)

Arduous

import gaitsetpy as gsp
loader = gsp.ArduousLoader()
# Depending on ActivityNet/Arduous export and local layout
data, names = loader.load_data("data/arduous")
windows = loader.create_sliding_windows(data, names, window_size=256, step_size=64)
features = gsp.GaitFeatureExtractor().extract_features(windows[0]['windows'], fs=50)

Models

  • RandomForestModel (built-in, scikit-learn)
  • Optional deep learning models (LSTM, BiLSTM, CNN, GNN) if PyTorch is installed

Factory access via gaitsetpy.classification.models.get_classification_model(name, **kwargs).


Visualization

  • gaitsetpy.eda.SensorStatisticsAnalyzer
  • Dataset-specific visualizers for exploratory analysis

Documentation

For detailed documentation and API reference, visit the official docs:

  • Docs: https://alohomora-labs.github.io/gaitSetPy/gaitsetpy.html

Contributing

We welcome contributions! Please read our contributing guidelines to get started.


License

This project is licensed under the GNU GPL License. See the LICENSE file for details.


Citation

If you use GaitSetPy in your research, please cite our work using the DOI badge above.


Changelog

  • 0.2.2: README overhaul (ToC, vibrant styling), per-dataset examples, notebooks/scripts documentation, version sync.
  • See GitHub Releases for older entries.

Metadata

Release files for gaitsetpy 0.2.4

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

Source distribution (sdist)

Source distribution for gaitsetpy 0.2.4
File Size Uploaded
gaitsetpy-0.2.4.tar.gz 6.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for gaitsetpy 0.2.4
File Interpreter ABI Platform
gaitsetpy-0.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 MB

Release files / gaitsetpy-0.2.4.tar.gz

Download URL gaitsetpy-0.2.4.tar.gz
Size 6.1 MB
Tags Source
SHA-256 checksum
How to use checksums
2df10132a2fa3abcef0176d8f3761d38e27c829dece831cb4f6aee493375b846
BLAKE2b-256 checksum
How to use checksums
0a1419d009626503c683829b65cad714582dc6d66458c1bdeed672c6757e7537
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2025.

Transparency log

Release files / gaitsetpy-0.2.4-py3-none-any.whl

Download URL gaitsetpy-0.2.4-py3-none-any.whl
Size 4.4 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cb3482f261d24beeaf0a334b0cc4fcc9abe64113522c5811a9257131e99e6fca
BLAKE2b-256 checksum
How to use checksums
7cf9c693f27a965e4a24021c51ec1d787fc993bb250d0cbfbae6af7e00ad564f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 3, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.4 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

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