Analysis code accompanying the paper Camera‑based Smartphone Application for Markerless Gait‑Analysis in Patients with Parkinson's Disease (Hauke et al., 2026).
This repository contains the code used to derive spatiotemporal gait parameters from the smartphone app's recordings, to register them to an instrumented pressure walkway (Zebris FDM‑2, the spatial reference) and an inertial motion suit (Xsens MVN Awinda, comparator), and to produce the statistics and figures reported in the paper. It is provided for transparency and methodological review; the raw participant recordings are not included (see Data availability).
The smartphone app (iOS/ARKit) records, per video frame, the 3‑D position of the detected foot (a fine‑tuned YOLOv3 detector), the device pose, and a left/right foot label (a bidirectional LSTM). This repository takes those recordings and:
computeMetrics.ipynb— the main pipeline. For each recording it detects footfalls from the per‑frame foot positions by mean‑shift clustering (convergence of the foot‑position cloud during stance), registers the app footfalls to the walkway per traversal with a rigid (rotation + translation) transform, associates matched footfalls, and computes per‑stride parameters (stride length, stride time, step width, gait velocity, …) for the app, the walkway and the suit. Results are written per recording as CSV.HelperFunctions.py— the core algorithms used by the pipeline: mean‑shift footfall detection (getConvergencePositions,MeanShift), the app↔walkway registration (alignCoordinateSystemOfAppAndZebris,meanSquaredError,performTransformations), foot‑movement / turning analysis (footMovementAnalysis,getTurningVelocity), and the suit parsing.analyseMetrics.ipynb— reads the per‑recording metrics, runs the statistical analyses (linear mixed‑effects models, paired t‑tests, Mann–Whitney U tests, Spearman correlations) and produces the figures and tables.ReadPatientDataExcel.py— loads the clinical scores (UPDRS‑III) and demographic data from the study spreadsheet.
Python 3.11.13. Core analysis dependencies are pinned in requirements.txt:
pip install -r requirements.txtRunning the full computeMetrics.ipynb additionally requires the machine‑learning
runtime used by the app's foot detector/classifier (scikit‑learn, TensorFlow/Keras)
and loess for trajectory smoothing; the statistical analysis in
analyseMetrics.ipynb runs with the pinned requirements alone.
The foot‑detection network (YOLOv3, fine‑tuned) and the left/right‑foot classification network (bidirectional LSTM) are deliberately not included in this repository and are not released. Because they were trained on the participant recordings, we cannot rule out that their weights encode information derived from that personal data, and we therefore do not distribute them. Their architectures are described in the paper.
No study data are contained in or released with this repository. The smartphone recordings, the pressure‑walkway (ground‑truth / reference) measurements, the inertial‑suit recordings, and the clinical data are personal health data and are not part of this repository. Data can be made available in anonymized form upon reasonable request, provided that the local Data Privacy Office approves. The code is provided for inspection of the analysis methods only and is not expected to run without the underlying (private) data, whose file paths in the notebooks refer to the original project layout.
If you use this code, please cite:
Hauke et al. Camera‑based Smartphone Application for Markerless Gait‑Analysis in Patients with Parkinson's Disease. 2026. [journal / DOI to be added]
Code is released under the MIT License (see LICENSE). The trained models and
the study data are not covered by this license.
Frederik Hauke — fhauke@ukaachen.de