rkolaghassi / gait-parameters-analysis-LSTM

Step event detection and stride length estimation based on leg-and-shoe-mounted EcoIMU and LSTM.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gait parameters analysis based on leg-and-shoe-mounted EcoIMU and LSTM

This repository contains 369 strides of walking data, a step event detector, and two stride length estimators.

Walking Data

The walking data is collected from six volunteers equipped with leg-and-shoe-mounted EcoIMU. We attach five EcoIMUs to human body and collect motion data, including triaxial accelerations and triaxial angular rates, through BLE at a 125 samples per second data rate.

Collecting the walking data with EcoIMU through BLE

Step Event Detector

The step event detector detects HS (heel-strike) and TO (toe-off) events through a neural network constructed with LSTM cells. The input is 6-axis IMU data collected from one left-shoe-mounted EcoIMU.

We implement this detector in StepEvent_LSTM.py.

Stride Length Estimator

We propose two stride length estimators, which use Mechanical Model and LSTM, separately, to estimate stride lengths.

  • Mechanical Model: use the z-axis of gyroscope data to obtain the angles at joints through integration, and then we combine these angles with leg length and shoe length to calculate stride lengths. We implement this estimator in StrideLength_MechanicalModel.py.
  • LSTM: use 6-axis IMU data collected from all of the five leg-and-shoe-mounted EcoIMUs as the inputs to a neural network constructed with LSTM cells. We implement this estimator in StrideLength_LSTM.py.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

  • install cuDNN
  • install the following packages:
pip install numpy scipy matplotlib keras
pip install --upgrade tensorflow-gpu==1.5.0

Clone and Run

Clone this repository and run the corresponding programs. The result will be printed in the terminal.

git clone https://github.com/PoHsin-Lin/gait-parameters-analysis-LSTM.git
python3 StepEvent_LSTM.py
python3 StrideLength_MechanicalModel.py
python3 StrideLength_LSTM.py

Loss and Precision Graph

For the programs that use LSTM, graphs that show the loss and precision/accuracy during traing, validation, and testing can be found in resultSpace folder.

Loss and precision graph of a LSTM model for stride length estimation

More Information

For more details about the methods and the performance, please see the attached thesis.pdf.

About

Step event detection and stride length estimation based on leg-and-shoe-mounted EcoIMU and LSTM.


Languages

Language:Python 100.0%