Skip to main content

A Python package for gait analysis using sensor data.

Project description

GaitSetPy

DOI PyPI version Docs CodeRabbit Pull Request Reviews

GaitSetPy is a Python package for gait analysis and recognition. This package provides tools and algorithms to process and analyze gait data, enabling researchers and developers to build applications for gait recognition and clinical gait assessment.

Features

  • Gait data preprocessing
  • Feature extraction
  • Gait recognition algorithms
  • Visualization tools

Supported Datasets

IMU Sensor Based

Pressure Sensor Based

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

Usage

Daphnet Dataset (class-based API)

import gaitsetpy as gsp

# Load dataset via class-based loader
loader = gsp.DaphnetLoader()
data, names = loader.load_data("data/daphnet")

# Create sliding windows and extract features
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)

# Optional: visualize using analyzer
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
)

HAR-UP Dataset (class-based API)

import gaitsetpy as gsp

# Load HAR-UP data via class-based loader
loader = gsp.HARUPLoader()
harup_data, harup_names = loader.load_data("data/harup")

# Create sliding windows
window_size = 100  # 1 second at 100Hz
step_size = 50     # 0.5 second overlap
windows = loader.create_sliding_windows(harup_data, harup_names, window_size, step_size)

# Extract features using dataset-specific method or feature extractor
features_data = loader.extract_features(windows)

alt text

# Train and evaluate a Random Forest (class-based)
rf_model = gsp.RandomForestModel(n_estimators=50, random_state=42, max_depth=10)
rf_model.train(features_data if isinstance(features_data, list) else features)
metrics = rf_model.evaluate(features_data if isinstance(features_data, list) else features)
print(metrics.get('accuracy'))

# Load a saved model (optional)
rf_model.load_model("gaitsetpy/classification/weights/random_forest_model_40_10.pkl")

Documentation

For detailed documentation and API reference, please visit the official documentation.

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 more details.

Contact

For any questions or inquiries, please contact us at jayeeta.chakrabortyfcs@kiit.ac.in or aharshit123456@gmail.com.

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

gaitsetpy-0.2.0.tar.gz (5.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gaitsetpy-0.2.0-py3-none-any.whl (4.3 MB view details)

Uploaded Python 3

File details

Details for the file gaitsetpy-0.2.0.tar.gz.

File metadata

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

File hashes

Hashes for gaitsetpy-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6c906a65f64734cb6bbe9e5407af1a3a9fcf6cd780eec820e2cca7a682e9ff6d
MD5 3c9663e24ffd94e32f3199ed69ff4ba4
BLAKE2b-256 5d19fcb2dfb39a04d580cc87bb2f3bdacae2036af3b6014ce3be8b3f292721af

See more details on using hashes here.

Provenance

The following attestation bundles were made for gaitsetpy-0.2.0.tar.gz:

Publisher: pypi.yml on Alohomora-Labs/gaitSetPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gaitsetpy-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gaitsetpy-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gaitsetpy-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1a3f0445cb2b0c313dc282c6cd511e270090af2190eaaa4b77e004041093335d
MD5 9512f1043a4fe290aa4508d9617d1fd4
BLAKE2b-256 5a120be27168bbe45bf05915f84cf29f5bdce2c7d999a9e1427cd5fbc596eb5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for gaitsetpy-0.2.0-py3-none-any.whl:

Publisher: pypi.yml on Alohomora-Labs/gaitSetPy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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