Accurate detection of foot-floor contact sequences during walking is a fundamental requirement for accurately estimating spatio-temporal gait parameters, which are widely used in gait analysis for clinical, rehabilitation, and research purposes. Variability in gait phase sequences is particularly important in assessing the risk of falls, especially among elderly individuals and those with pathological gait patterns. These variations may indicate underlying conditions such as neurological disorders, musculoskeletal impairments, or frailty, impacting mobility and increasing the likelihood of falls.
To address these challenges, this repository introduces PIN2GPI
, an open-source toolbox designed for the automatic identification and classification of gait subphases using data collected from Pressure Insoles (PIs). This innovative approach leverages the temporal and spatial information provided by PIs to accurately identify both the principal gait subphases (i.e., stance and swing) and the finer sub-phases of stance (i.e., heel contact, flat-foot contact, and push-off) [1].
While many existing algorithms for gait analysis focus solely on differentiating between the stance and swing phases, they often fail to capture the sub-phases within the stance phase. These sub-phases are crucial for a comprehensive understanding of gait mechanics, as they provide deeper insights into atypical walking patterns. For example, deviations from the typical sequence of heel contact, flat-foot contact, push-off, and swing are common in individuals with gait impairments and may serve as an early indicator of mobility issues or fall risk [1],[2],[3].
PIN2GPI
is specifically designed to bridge this gap by offering a robust and accurate solution for identifying and classifying gait cycles from PI data. It is versatile and can be used across a wide range of applications, from controlled laboratory environments to unsupervised real-world settings such as free daily living activities. This flexibility makes it an invaluable tool for clinicians, researchers, and healthcare providers seeking to monitor and analyze gait in both structured and dynamic conditions. Moreover, PIN2GPI
can be flexibly modified at need to comply with the necessities of the user.
By enabling the detection of subtle abnormalities in gait phase sequences, PIN2GPI
helps uncover unique insights into an individual’s walking patterns, paving the way for more effective interventions, personalized treatment plans, and fall prevention strategies. Its open-source nature ensures accessibility for the research community and promotes further development and innovation in gait analysis.
- Load
*.mat
file containing the normalized PI data - Define anatomical clusters and pre-process PI data
- Identify gait subphases based on the activation status of each cluster
- Graphically represent results
- Export results in
*.csv
format
The following files are provided within the GitHub repository:
PIN2PGI.m
: MATLAB algorithm that guides you throughout all the main steps of gait phases identificationdata.mat
: MATLAB file containing normalized pressure insoles data from a representative healthy adult during free daily living activities.
To use this analysis framework, your data must be in *.mat
format.
Example Data
The provided example dataset has been extracted and reorganized from the open database made available by the Mobilise-D consortium [4].
Data Structure
Your *.mat
file should contain a structure with pressure insole data, normalized to the range [0, 1], and organized into two fields:
LeftFoot
: an N × M matrix, where N = Number of time samples and M = Number of channels acquired from the left footRightFoot
: an N × M matrix, where N = Number of time samples and M = Number of channels acquired from the right foot
For a representative example of the expected input format, refer to thedata.mat
file.
[1] Agostini, V., Balestra, G., & Knaflitz, M. (2014). Segmentation and Classification of Gait Cycles. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 22 (5)https://doi.10.1109/TNSRE.2013.2291907
[2] Ghislieri, M., Agostini, V., Rizzi, L., Fronda, C., Knaflitz, M., & Lanotte, M. (2024). Foot–Floor Contact Sequences: A Metric for Gait Assessment in Parkinson’s Disease after Deep Brain Stimulation. Sensors, 24(20), 6593. https://doi.org/10.3390/s24206593
[3] Ghislieri, M., Agostini, V., Rizzi, L., Knaflitz, M., & Lanotte, M. (2021). Atypical Gait Cycles in Parkinson’s Disease. Sensors, 21(15), 5079. https://doi.org/10.3390/s2115507
[4] Küderle, A. (2024). Mobilise-D Technical Validation Study (TVS) dataset (1.0.0) [Data set]. Zenodo. https://doi.org/10.5281/zenodo.13899386
Contributions are the heart of the open-source community, making it a fantastic space for learning, inspiration, and innovation. While we've done our best, our code may contain inaccuracies or might not fully meet your needs. If you come across any issues—or have ideas for improvements—we encourage you to contribute! Follow the instructions below to suggest edits or enhancements. Every contribution is greatly appreciated!
Bugs are tracked as GitHub issues. Whenever you report an issue, please make sure to:
- Use a concise and descriptive title
- Report your MATLAB version
- Report whether the code ran successfully on the test data available within the repository.
Nicolas Leo, Scholarship holder - BIOLAB@Polito
@NicolasLeo - nicolas.leo@polito.it
Marco Ghislieri, Ph.D. - BIOLAB@Polito
@MarcoGhislieri - marco.ghislieri@polito.it