Automating Timed Up and Go Phase Segmentation and Gait Analysis via the tugturn Markerless 3D Pipeline
Organizations: Biomechanics and Motor Control Laboratory, School of Physical Education and Sport of Ribeirao Preto, University of Sao Paulo, Brazil · Graduate Program in Rehabilitation and Functional Performance, Ribeirao Preto Medical School, University of Sao Paulo, Brazil · Department of Physical Therapy, Brooks College of Health, University of North Florida, USA
Abstract
Instrumented Timed Up and Go (TUG) analysis can support clinical and research decision-making, but robust and reproducible markerless pipelines are still limited. We present tugturn.py, a Python-based workflow for 3D markerless TUG processing that combines phase segmentation, gait-event detection, spatiotemporal metrics, intersegmental coordination, and dynamic stability analysis. The pipeline uses spatial thresholds to segment each trial into stand, first gait, turning, second gait, and sit phases, and applies a relative-distance strategy to detect heel-strike and toe-off events within valid gait windows. In addition to conventional kinematics, tugturn provides Vector Coding outputs and Extrapolated Center of Mass (XCoM)-based metrics. The software is configured through TOML files and produces reproducible artifacts, including HTML reports, CSV tables, and quality-assurance visual outputs. A complete runnable example is provided with test data and command-line instructions. This manuscript describes the implementation, outputs, and reproducibility workflow of tugturn as a focused software contribution for markerless biomechanical TUG analysis.
Figures & tables
| Output family | Purpose |
|---|---|
| HTML reports | Human-readable trial overview and plots |
| bd_results CSV | Global and phase metrics for analysis |
| bd_steps CSV | Step-level event and spatiotemporal values |
| bd_kinematics CSV | Time-series kinematic variables |
| Vector Coding CSVs | Coupling-angle metrics and variability summaries |
| Phase GIFs | Segmentation quality assurance |
| Metric | Value |
|---|---|
| Turn direction | Right |
| Total TUG time | 26.93 s |
| Stand phase duration | 1.48 s |
| First gait duration | 5.81 s |
| Turn duration | 2.79 s |
| Second gait duration | 5.76 s |
Gait Analysis
Gait analysis uses movement and biomechanical signals to characterize walking, recognize people, assess health, and guide rehabilitation or locomotion.
See all 75 papers