Full text
50,659 characters
· extracted from
preprint-html
· click to expand
Gait Analysis for Thigh-Worn Accelerometry A Data Processing Pipeline using Data-Driven Approaches | medRxiv /* */ /* */ <!-- <!-- /*! * yepnope1.5.4 * (c) WTFPL, GPLv2 */ (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0];var j=d.createElement(s);var dl=l!='dataLayer'?'&l='+l:'';j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;j.type='text/javascript';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-P4HH5NV'); Skip to main content Home About Submit ALERTS / RSS Search for this keyword Advanced Search Gait Analysis for Thigh-Worn Accelerometry A Data Processing Pipeline using Data-Driven Approaches View ORCID Profile Claas Lendt , View ORCID Profile Martin Grimmer , Ingo Froböse , View ORCID Profile Tom Stewart doi: https://doi.org/10.1101/2025.11.18.25339671 Claas Lendt 1 German Sport University Cologne , Cologne, Germany 2 Auckland University of Technology , Auckland, New Zealand 3 University of Regensburg , Regensburg, Germany Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Claas Lendt For correspondence: claas.lendt{at}klinik.uni-regensburg.de Martin Grimmer 4 Technical University of Darmstadt , Darmstadt, Germany Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Martin Grimmer Ingo Froböse 1 German Sport University Cologne , Cologne, Germany Find this author on Google Scholar Find this author on PubMed Search for this author on this site Tom Stewart 2 Auckland University of Technology , Auckland, New Zealand Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Tom Stewart Abstract Full Text Info/History Metrics Supplementary material Preview PDF Abstract Introduction Thigh-worn accelerometry is becoming increasingly popular in large-scale cohort studies for quantifying movement behaviour. Gait characteristics are associated with various health conditions and can be used to predict fall risk, monitor disease progression and evaluate rehabilitation outcomes. However, accurate gait assessment typically requires controlled laboratory conditions, that may not reflect real-world mobility. In this context, data-driven algorithms and machine learning approaches hold promise for extracting accurate gait parameters from raw accelerometer data. Objective We developed and evaluated a machine learning-based processing pipeline that uses activity classification to detect walking sequences, estimate walking speed, and identify gait events from raw thigh-worn accelerometer data, enabling accurate assessment of free-living gait. Methods We integrated an existing activity classification algorithm into the pipeline and evaluated its performance in free-living conditions. Walking speed was estimated based on stride frequency and body height. We then trained a temporal convolutional network model to predict the probability of gait events (i.e. initial and final contact) in healthy adults walking at various speeds on different inclines. All three components of the data processing pipeline were evaluated externally using various independent datasets. Results The activity classification model achieved F1 scores ≥ 0.95 for walking in both adults and older adults. Walking speed was estimated with a mean absolute percentage error of 11.5%, and with a bias of 0.02 m/s. The gait event detection model demonstrated high accuracy, with a mean recall ≥ 0.94, precision ≥ 0.98, and mean absolute errors of 20 ms and 31 ms for initial and final contacts, respectively. Conclusion Accurate gait analysis in free-living conditions can be achieved by combining data-driven and machine learning approaches with thigh-worn accelerometer data. The developed pipeline can support the analysis of existing thigh-worn accelerometer datasets and enable continuous gait monitoring outside laboratory settings over several days. However, the developed methods for estimating walking speed and gait events require validation in a more diverse sample and in truly unrestricted free-living conditions. Introduction Thigh-worn accelerometers have become increasingly popular in physical activity research, as they allow researchers to quantify the physical behaviour of individuals under free-living conditions over multiple days. Several large-scale cohort studies within the Prospective Physical Activity, Sitting and Sleep (ProPASS) consortium now use thigh-worn accelerometers [ 1 ]. When combined with data-driven algorithms and machine learning approaches, these devices allow the classification of various activity types and postures under free-living conditions [ 2 ], [ 3 ]. The implementation of novel activity classification algorithms can subsequently enable new scientific evidence of associations between activity types as well as their patterns and health outcomes, which would otherwise not be feasible [ 4 ]. Due to the high classification accuracy of activity types and their placement on the lower extremities, thigh-worn accelerometers could potentially be used to measure novel digital biomarkers, such as gait characteristics, by analysing the raw acceleration signal. Human gait is a sensitive indicator that can provide valuable insights into various health conditions, including neurological disorders, musculoskeletal issues, and the effects of ageing [ 5 ], [ 6 ]. Changes in gait patterns can reveal important clinical information about health status and disease risk, such as the onset of Parkinson’s disease, post-surgery rehabilitation progress, and the risk of falling [ 7 ], [ 8 ]. For instance, walking speed differs between fallers and non-fallers, with a slower walking speed being associated with an increased risk of falling [ 7 ], [ 9 ], [ 10 ]. In people with Parkinson’s disease, temporal gait characteristics such as stance time, stride time and stride time variability have been proposed as predictive markers for disease onset and progression [ 11 ], [ 12 ], [ 13 ], [ 14 ]. Until recently, accurate gait analysis was mostly confined to laboratory settings and costly measurement methods, such as instrumented treadmills, pressure mats or optical motion tracking systems. However, wearable devices such as accelerometers and inertial measurement units (IMUs), when paired with data-driven algorithms, now offer the opportunity to measure gait unsupervised, in real-life settings and over the course of multiple days. Notably, studies suggest that free-living gait differs significantly from laboratory gait and may be more clinically relevant [ 6 ], [ 15 ]. Accurate detection of gait events, such as initial contacts (IC; when the foot first contacts the ground) and final contacts (FC; when the foot leaves the ground) is critical to any gait-specific analysis. It enables the computation of spatiotemporal gait variables such as walking speed, stance time and swing time [ 16 ], and the segmentation of individual strides to be used for subsequent model input [ 17 ], [ 18 ]. Recent studies have demonstrated that applying machine learning techniques to IMU data can significantly improve gait event detection [ 19 ], [ 20 ]. Previous research on free-living gait monitoring has focused primarily on signals from the foot, shank, or lower back, combining both acceleration and gyroscope signals from wearable IMUs [ 16 ], [ 20 ], [ 21 ]. With a projected total sample size of over 110,000 participants, large epidemiological cohort studies, such as HUNT4 [ 22 ] as well as AusPASS and ActiveLife (with ongoing data collection), offer a unique opportunity to study risk factors and predictive markers for disease onset based on thigh-worn accelerometry data [ 23 ]. To enable research into potential associations between human gait parameters and health outcomes, there is a clear need for a validated, open-source method to perform gait analysis solely based on thigh-worn acceleration data. Building on previous findings regarding the predictive value of gait parameters for various health outcomes and the availability of large-scale datasets, we aim to develop and evaluate a new data processing pipeline for analysing free-living gait based on continuous raw thigh-worn accelerometer data. Our work integrates previous and novel machine learning models to provide a comprehensive, open-source gait analysis pipeline that improves our ability to analyse gait in various clinical and research contexts. We make use of data collected from six different studies to (a) evaluate a previously trained activity classification model in free-living conditions, (b) modify and evaluate an existing walking speed estimation approach and (c) train and evaluate a gait event detection model based on machine learning. Methods We have developed a data processing pipeline ( Figure 1 ) that enables gait analysis from continuous, raw three-dimensional thigh acceleration data. The proposed pipeline consists of several key steps: Download figure Open in new tab Figure 1: Schematic data processing pipeline with the key steps as well as the respective datasets used for development and evaluation. Raw three-dimensional acceleration data and the individual body height are required as input. . Walking Sequence Detection : A machine learning activity classification algorithm identifies walking sequences based on 4-second windows of acceleration data. . Walking Speed Estimation : For each 4-second window detected as walking, the walking speed is estimated based on the stride frequency and body height. . Gait Event Detection : A machine learning algorithm predicts the probability of initial (IC) and final (FC) contact events within each walking sequence. . Gait Parameter Calculation : Bout-level gait parameters are derived from steps 1 to 3, including temporal parameters (e.g. stride time) as well as mean and maximal walking speed. Datasets We used a total of six different datasets to develop and evaluate the data processing pipeline ( Table 1 ). The use of different datasets to evaluate different pipeline steps was necessary, as no single dataset was available that comprises gold-standard references for all respective outcomes. Two datasets (A and B) with data from a total of n = 49 participants were used for a free-living evaluation of an existing activity classification algorithm. Dataset C was used to develop the walking speed estimation approach and dataset F with n = 21 participants was used for evaluation. Two of the datasets (C and D) with a total of n = 34 participants were used for the development of a gait event detection algorithm. Dataset E with n = 59 participants was used to evaluate the gait event detection algorithm. All six underlying studies were approved by the respective ethics committees and in accordance with the Declaration of Helsinki. For each study, participants gave written informed consent prior to data collection. More details on the individual datasets and data processing can be found in Supplementary File 1. View this table: View inline View popup Download powerpoint Table 1: Characteristics of the individual datasets used for development and evaluation of the data processing pipeline. Pre-processing Each dataset contained three-dimensional thigh acceleration data sampled at frequencies ranging from 50 to 200 Hz. To ensure consistency across varying datasets, we implemented a standardized preprocessing workflow with three main steps. First, raw acceleration signals were filtered using an eighth-order Butterworth low-pass filter with a 20 Hz cutoff frequency to remove high-frequency noise while preserving the relevant movement signals. Second, when necessary, data were resampled to a uniform 100 Hz sampling rate using the actipy Python package [ 30 ]. Third, we standardized the accelerometer axis orientations with the X-axis representing the cranial-caudal direction, the Y-axis representing the medial-lateral direction, and the Z-axis representing the anterior-posterior direction, all defined relative to a quiet standing posture. Walking Sequence Detection The gait analysis pipeline integrates a previously developed activity classification model – based on a hybrid Convolutional Neural Network (CNN) and Bidirectional Long-Short Term Memory (BiLSTM) model architecture [ 18 ]. The CNN-BiLSTM model classifies 4-second windows as either sedentary (sitting or lying), standing, walking, running or cycling. The model was trained on a pooled dataset comprising both laboratory and free-living activity data from three different datasets (n = 69 participants) and is openly available on GitHub ( https://github.com/claaslendt/ catse3). Datasets A and B were used to evaluate the classification accuracy of the CNN-BiLSTM activity classification model in free-living conditions. The combined dataset comprises different free-living physical activities, including walking, stairclimbing, running, standing, sitting, reclining, lying down, and cycling. Reference labels were obtained from video annotations. For each dataset, non-overlapping 4-second windows were created across each individual activity sequence. Only windows with a single true label were considered, meaning that no ambiguous windows comprising two or more activities were used. Each of the finally extracted 4-second windows included 400 samples of continuous three-dimensional acceleration data and a single reference activity label. Walking Speed Estimation A previously published method for estimating walking speed was modified and integrated into the analysis pipeline. The approach exploits the relationship between walking speed and stride frequency using the following equation: where v is the walking speed in meters per second and f is the stride frequency in strides per second, normalized by the leg length [ 31 ]. In the original study, the parameters a and b were individually identified per participant using a standardised calibration procedure. We calculated the average parameter values across all participants from the original study and set a = 2.064 and b = 0.349. Further, leg length is estimated from the participants height scaled by a factor of 0.53 [ 32 ]. The stride frequency is estimated within each 4-second walking sequence based on the acceleration in the anterior-posterior axis. The acceleration signal is low-pass filtered using a fourth-order Butterworth filter with a cut-off frequency of 5 Hz. The stride time is then estimated as the lag associated with the largest peak in the autocorrelation between lags of 0.5 and 3 seconds ( Figure 2 ). These lower and upper thresholds are implemented to minimise the risk for detecting false positive peaks outside the anticipated range of human stride times [ 33 ]. Finally, stride frequency (in Hz) is calculated from the estimated stride time (in seconds). Treadmill walking data in dataset C was used to develop the autocorrelation approach. Overground walking data in dataset F was used to evaluate the walking speed estimations against the reference walking speed estimated from optical motion capture. Download figure Open in new tab Figure 2: Example of the raw and low-pass filtered anterior-posterior acceleration (Z-axis) of a 4-second walking sequence (top) and the corresponding autocorrelation (bottom). Stride time is estimated based on the lag associated with the highest peak of the autocorrelation coefficient between a lag of 0.5 and 3 seconds (dashed green line). Gait Event Detection Datasets C and D were used to develop and train the gait event detection algorithm. These datasets consisted of gait data from 21 and 13 healthy adult participants, respectively. The combined dataset comprised treadmill walking at speeds ranging from 0.5 m/s to 2.1 m/s, both on a level surface and on an inclined surface at angles of ±5 degree and ±10 degree. Additionally, outdoor walking at self-selected speeds was performed. A non-causal temporal convolutional network (TCN) [ 34 ] with a fully connected output layer and Softmax activation function was trained to predict the probability of initial contact (IC) and final contact (FC) events for each individual acceleration sample in a walking sequence. Further details on the architecture, training and optimisation of the TCN model can be found in Supplementary File 2. An additional filtering approach was designed to minimise false positive predictions and applied separately to the IC and FC predictions. The resulting probabilities were first smoothed using a Gaussian filter with three standard deviations. Peaks with a gait event probability greater than 0.4 and a minimum interpeak distance of 0.5 s were then identified. Both values were optimised using an iterative approach and visual inspection of the predictions during model development. The resulting peaks were then considered to be the predicted gait events. After training the model on the combined training and validation set, we used data from Dataset E to evaluate the performance and accuracy of the final model. The dataset contains indoor walking data from n = 21 healthy adult participants as well as n = 38 individuals with Parkinson’s disease who each completed a standardised self-paced walking course through a building, including level walking and stairclimbing. Gait Parameter Calculation Temporal gait parameters were calculated based on predicted gait events, with implausible values removed through filtering. Stride times were calculated as the time between two consecutive IC events. These were filtered to remove values above 3 s and below 0.5 s, as well as strides covering two FC events, which indicated a missing IC event. Stance times were calculated as the time between an IC event and the subsequent FC event. These were filtered to remove times greater than 2 s or smaller than 0.2 s. Swing times were calculated as the time between an FC event and the subsequent IC event. Swing times greater than 1 s or smaller than 0.1 s were removed. Statistical Analysis The metrics used for the evaluation of the walking sequence detection model included recall, precision, and F1 score. Recall (or sensitivity) was calculated as the proportion of all true walking sequences that were identified by the model. Precision was calculated as the proportion of predicted walking sequences that were true walking sequences. The F1 score was calculated as the harmonic mean of recall and precision. For the walking speed estimation, we calculated the mean difference (bias), the root mean squared error (RMSE) and mean absolute percentage error (MAPE) from the reference and estimated walking speed of each individual trial. For the gait event detection, predicted gait events were matched with the corresponding reference gait events based on the closest reference event. Predicted gait events were considered true positive events when they were within a 0.5 s tolerance window centred around a reference gait event [ 19 ], [ 21 ]. Predicted gait events not within this time window were considered false positive events. Overall detection performance metrics included recall, precision and F1 score. We performed a true positive evaluation to estimate the time error of the gait event predictions. The time difference between each predicted true positive gait event and corresponding reference gait event was calculated. The gait-specific parameters stride time, stance time and swing time were calculated based on all reference gait events and predicted gait events. Mean absolute errors (MAE) for the gait-specific parameters were calculated per walking sequence by comparing the reference method with the proposed pipeline. Results Walking Sequence Detection A total of 38,364 (Dataset A) and 10,285 (Dataset B) 4-second activity sequences were evaluated ( Figure 3 ). When the CNN-BiLSTM activity classification model was evaluated on Dataset A, it showed an unweighted mean precision of 0.94, mean recall of 0.96 and mean F1 score of 0.95 across all five activity classes. For the walking class, recall, precision as well as F1 score were 0.95. For Dataset B, the classification model showed an unweighted mean precision of 0.99, mean recall of 0.98 and F1 score of 0.98. For walking, precision was 0.99, recall was 0.98 and F1 score was 0.99. Download figure Open in new tab Figure 3: Confusion matrices for the CNN-BiLSTM activity classification model [ 18 ] when evaluated on Dataset A (left) and Dataset B (right). Percentages [samples] are calculated row-wise. Walking Speed Estimation Across all three self-paced walking speed conditions in Dataset F, walking speed ranged from 0.46 to 2.61 m/s (see Figure 4 ). The overall RMSE was 0.18 m/s, the MAPE was 11.5%, and the bias was0.02 m/s. For the preferred walking speed condition, the reference walking speed ranged from 0.89 to 1.85 m/s, with an associated RMSE and MAPE of 0.12 m/s and 7.1%, respectively. Download figure Open in new tab Figure 4: Scatter plot of estimated walking speed against reference walking speed for all trials in Dataset F. The dashed line represents the line of identity for reference. Gait Event Detection Dataset E contained a total of 9,174 gait events ( Table 2 ). The TCN gait event detection model achieved mean recall values of 0.97 (95% CI: 0.97, 0.98) for IC events and 0.94 (95% CI: 0.94, 0.95) for FC events across all participants. The mean F1 scores were 0.98 (95% CI: 0.98, 0.99) for IC events and 0.96 (95% CI: 0.96, 0.97) for FC events. The predicted IC and FC events as well stride time, stance time and swing time showed mean time differences (bias) within ±20 ms ( Figure 5 ). The MAE for IC and FC events were 20 ms and 31 ms, respectively. The MAE for the spatiotemporal gait parameters were 15 ms (stride time), 23 ms (stance time) and 22 ms (swing time). View this table: View inline View popup Download powerpoint Table 2: Gait event detection performance metrics for initial contact (IC) and final contact (FC) events when evaluated on Dataset E. Download figure Open in new tab Figure 5: Time differences for the individual predicted and reference gait events for the true positive evaluation (left). Bout-wise time differences between predicted and reference spatiotemporal gait parameters (right). Discussion Human gait is associated with various health outcomes and useful as a predictive biomarker. A validated data processing and gait analysis pipeline specifically for thigh-worn accelerometers would enable the research community to analyse gait-related outcomes using already existing, large-scale datasets. In this study, our aim was to develop and evaluate a novel gait analysis pipeline based on supervised machine learning and data-driven approaches. When compared with gold-standard video observations, the walking sequence detection model achieved an F1 score of at least 0.95 for walking in free-living conditions in both adults and older adults. The activity classification model’s classification performance is slightly superior to that of previous works using decision tree-based machine learning approaches, such as extreme gradient boosting [ 2 ], [ 25 ], [ 35 ]. Walking sequence detection can be considered highly accurate and sufficient to capture most walking sequences, enabling meaningful gait analysis representative of an individual’s gait. Walking speed was estimated with a MAPE of 11.5% and minor positive bias of 0.02 m/s. Considering the laboratory condition and apparently healthy individuals, this error is slightly larger when compared to a previously, extensively validated gait analysis pipeline using data from a single IMU placed on the lower back, reporting a MAPE of 10.3% [ 16 ]. The approach chosen for the proposed pipeline, which is based on the relatively simple relationship between normalised stride frequency and walking speed, resulted in an overall RMSE of 0.18 m/s. Importantly, the estimation error varied by walking speed: the error was lower during slow (RSME: 0.16 m/s) and preferred walking speed (0.12 m/s), but considerably higher during fast walking speeds above 1.8 m/s (0.25 m/s). Our results are consistent with a previous study that trained a support vector machine regression model for thigh-worn accelerometers based on 32 time– and frequency-domain features in 5-second windows, achieving an RMSE of 0.15 m/s with walking speeds up to 1.7 m/s [ 36 ]. Notably, preferred and fast outdoor walking speeds have been shown to be within 1.2 to 1.8 m/s, suggesting that the lower precision at walking speeds above 1.8 m/s may not be of concern for most individuals [ 37 ], [ 38 ]. Overall, the error margin for walking speed estimations falls within an acceptable range for estimating walking speed on a group-level in larger-scale cohort. However, for clinical adult populations, a minimal clinically important difference for walking speed between 0.10-0.20 m/s has been reported [ 39 ], [ 40 ]. Given our results and the evaluation in a healthy adult population, the walking speed estimations may not yet be sufficiently accurate for use in clinical settings. A TCN deep learning architecture was used to identify gait events, achieving high F1 scores of 0.98 (IC) and 0.96 (FC), with a low bias of less than 20 ms. We found a high level of agreement for the timing of gait events and the derived spatiotemporal gait parameters. The MAE for the temporal gait parameters stance time (23 ms) and swing time (22 ms) are comparable to those of two previous studies that used a similar deep learning approach based on IMU data from the shank or foot [ 19 ], [ 20 ]. The authors report MAE values of 30 ms for both stance time and swing time, when evaluated in healthy adults under free-living conditions. Furthermore, the agreement of the estimated spatiotemporal gait parameters, specifically stance and swing time, is comparable to that of a previous study using thigh acceleration and a deterministic filtering approach [ 41 ]. However, it should be noted that this previous study only evaluated treadmill walking, which likely resulted in an overestimation of accuracy compared to free-living walking conditions. Strengths and Limitations The sensors, settings and placements used in the various datasets are common in physical activity research, making our results broadly applicable to other studies and datasets. For the development and evaluation of our proposed pipeline, we used gait data from various available datasets that comprise a high level of real-world walking conditions. We successfully evaluated the different modules of the pipeline using independent, high-quality datasets with gold-standard criterion measures for each outcome. This allowed us to further validate the previously developed CNN-BiLSTM activity classification approach using two datasets comprising free-living activity data from adults and older adults, with video-annotated activity labels used as a reference. However, we were unable to compare the walking speed estimates against an appropriate reference under free-living conditions. Despite this important limitation, we were able to evaluate the accuracy across a wide range of walking speeds, from 0.46 to 2.61 m/s, in a controlled laboratory setting using a gold-standard reference measure. Although several studies have developed algorithms for gait event detection, these are often only evaluated using data collected under standardised laboratory conditions, such as walking on a treadmill or over a short distance in a straight line. Therefore, it is unclear how accurate these algorithms are in real-life situations. To address this issue, we trained our TCN model using two datasets comprising indoor and outdoor walking at various speeds and inclines. We were also able to evaluate the model’s performance against a gold standard reference measure under semi-standardised conditions that closely resemble real life (i.e. an indoor walking course through a building), thereby increasing the generalisability of its performance. However, the model’s ability to accurately predict gait events may be affected by musculoskeletal or neurological diseases and ageing, since these factors can impact individual gait patterns. Therefore, additional validation of our results is necessary, including testing on a more heterogeneous sample comprising different age groups and health conditions. Importantly, accessible models and processing approaches remain an ongoing challenge in the field of physical activity research [ 42 ]. The complete pipeline, which was developed as part of this study, is available as open-source software on the GitHub repository ( https://github.com/claaslendt/twaga ). This enables the research community to use, evaluate and build upon it. Future investigations While the study produced favourable results, there are several areas that need to be addressed in future work. Firstly, it would be beneficial to establish convergent validity using a large-scale existing dataset, such as the HUNT4 study [ 22 ]. If gait characteristics are found to be associated with specific health outcomes in the expected direction (e.g. a decline in walking speed being associated with a decline in self-rated health), this would strengthen our understanding of the robustness and applicability of the pipeline at a group level. Secondly, the accuracy of walking speed estimation could be improved by exploring machine learning-based approaches that use body height and acceleration as inputs, as opposed to acceleration alone [ 36 ]. Furthermore, step length and walking speed could potentially be estimated based on segmented strides instead of generic 4-second input windows, providing more precise estimates [ 43 ]. Thirdly, gait characteristics change depending on the walking surface, i.e. whether it is flat or inclined. Therefore, the activity classification algorithm could be extended to distinguish between walking, incline walking and stair climbing. This could enable walking-type specific gait analysis and provide new insights, such as using stair-climbing speed as an indicator of aerobic capacity. Lastly, the current pipeline implementation only covers the calculation of basic bout-average metrics, such as stride time, swing time and stance time, as well as walking speed. Future versions of the pipeline could incorporate additional gait-related variables, such as variability metrics or average stride acceleration profiles [ 8 ]. Conclusion The developed data-driven gait analysis pipeline for thigh-worn accelerometers demonstrated high accuracy in detecting walking sequences, estimating walking speed, and identifying gait events, when tested using independent datasets. Overall, the pipeline is an important step towards creating a validated, open-source tool for analysing gait in existing accelerometer datasets. Future work should extend the validation to clinical populations, explore more advanced machine learning approaches for estimating walking speed and incorporate additional gait characteristics to enable a more comprehensive mobility assessment. Funding CL was supported by a fellowship from the German Academic Exchange Service (DAAD). Data Availability Datasets A and B are openly accessible and can be downloaded from the GitHub repository ( https://github.com/ntnu-ai-lab/harth-ml-experiments ). Dataset C is openly accessible and can be downloaded from the Zenodo repository ( https://doi.org/10.5281/zenodo.17629130 ). Dataset D is not openly accessible but may be shared upon reasonable request to the corresponding author of the underlying study. Dataset E can be accessed and downloaded after registration from the Synapse repository ( https://www.synapse.org/Synapse:syn52540892/files ). Dataset F is openly accessible and can be downloaded from the Figshare repository ( https://doi.org/10.6084/m9.figshare.20238006.v2 ). Acknowledgements We would like to thank all participants taking part in any of the underlying studies for their time and commitment. We further thank all authors and involved research teams of the underlying studies for sharing their data. References [1]. ↵ E. Stamatakis et al. , “ Emerging collaborative research platforms for the next generation of physical activity, sleep and exercise medicine guidelines: the Prospective Physical Activity, Sitting, and Sleep consortium (ProPASS) ,” British Journal of Sports Medicine , vol. 54 , no. 8 , pp. 435 – 437 , Apr . 2020 , doi: 10.1136/bjsports-2019-100786 . OpenUrl FREE Full Text [2]. ↵ K. Bach et al. , “ A Machine Learning Classifier for Detection of Physical Activity Types and Postures During Free-Living ,” Journal for the Measurement of Physical Behaviour , vol. 5 , no. 1 , pp. 24 – 31 , Mar . 2022 , doi: 10.1123/jmpb.2021-0015 . OpenUrl CrossRef [3]. ↵ M. L. Stevens et al. , “ Thigh-worn accelerometry for measuring movement and posture across the 24-hour cycle: a scoping review and expert statement ,” BMJ Open Sport & Exercise Medicine , vol. 6 , no. 1 , p. e874 , Dec . 2020 , doi: 10.1136/bmjsem-2020-000874 . OpenUrl CrossRef [4]. ↵ M. N. Ahmadi et al. , “ Relationship of device measured physical activity type and posture with cardiometabolic health markers: pooled dose–response associations from the Prospective Physical Activity, Sitting and Sleep Consortium ,” Diabetologia , vol. 67 , no. 6 , pp. 1051 – 1065 , Jun . 2024 , doi: 10.1007/s00125-024-06090-y . OpenUrl CrossRef PubMed [5]. ↵ M. D. Czech et al. , “ Age and environment-related differences in gait in healthy adults using wearables ,” npj Digital Medicine , vol. 3 , no. 1 , p. 127 , Sep . 2020 , doi: 10.1038/s41746-020-00334-y . OpenUrl CrossRef PubMed [6]. ↵ E. Warmerdam et al. , “ Long-term unsupervised mobility assessment in movement disorders ,” The Lancet Neurology , vol. 19 , no. 5 , pp. 462 – 470 , May 2020 , doi: 10.1016/S1474-4422(19)30397-7 . OpenUrl CrossRef PubMed [7]. ↵ S. Del Din et al. , “ Analysis of Free-Living Gait in Older Adults With and Without Parkinson’s Disease and With and Without a History of Falls: Identifying Generic and Disease-Specific Characteristics ,” The Journals of Gerontology: Series A , vol. 74 , no. 4 , pp. 500 – 506 , Mar . 2019 , doi: 10.1093/gerona/glx254 . OpenUrl CrossRef [8]. ↵ R. D. Gurchiek et al. , “ Open-Source Remote Gait Analysis: A Post-Surgery Patient Monitoring Application ,” Scientific Reports , vol. 9 , no. 1 , p. 17966 , Dec . 2019 , doi: 10.1038/s41598-019-54399-1 . OpenUrl CrossRef PubMed [9]. ↵ C. E. Adam et al. , “ Change in gait speed and fall risk among community-dwelling older adults with and without mild cognitive impairment: a retrospective cohort analysis ,” BMC Geriatrics , vol. 23 , no. 1 , p. 328 , May 2023 , doi: 10.1186/s12877-023-03890-6 . OpenUrl CrossRef PubMed [10]. ↵ J. Verghese , R. Holtzer , R. B. Lipton , and C. Wang , “ Quantitative Gait Markers and Incident Fall Risk in Older Adults ,” The Journals of Gerontology Series A: Biological Sciences and Medical Sciences , no. 8 , pp. 896 – 901 , Aug . 2009 , doi: 10.1093/gerona/glp033 . OpenUrl CrossRef PubMed [11]. ↵ M. Mancini et al. , “ Digital gait biomarkers in Parkinson’s disease: susceptibility/risk, progression, response to exercise, and prognosis ,” npj Parkinson’s Disease , vol. 11 , no. 1 , p. 51 , Mar . 2025 , doi: 10.1038/s41531-025-00897-1 . OpenUrl CrossRef [12]. ↵ P. Rábano-Suárez et al. , “ Digital Outcomes as Biomarkers of Disease Progression in Early Parkinson’s Disease: A Systematic Review ,” Movement Disorders , vol. 40 , no. 2 , pp. 184 – 203 , Feb . 2025 , doi: 10.1002/mds.30056 . OpenUrl CrossRef PubMed [13]. ↵ T. Raschka et al. , “ Objective monitoring of motor symptom severity and their progression in Parkinson’s disease using a digital gait device ,” Scientific Reports , vol. 15 , no. 1 , p. 25541 , Jul . 2025 , doi: 10.1038/s41598-025-09088-7 . OpenUrl CrossRef PubMed [14]. ↵ T. Hähnel et al. , “ Progression subtypes in Parkinson’s disease identified by a data-driven multi cohort analysis ,” npj Parkinson’s Disease , vol. 10 , no. 1 , p. 95 , May 2024 , doi: 10.1038/s41531-024-00712-3 . OpenUrl CrossRef [15]. ↵ S. Del Din , A. Godfrey , B. Galna , S. Lord , and L. Rochester , “ Free-living gait characteristics in ageing and Parkinson’s disease: impact of environment and ambulatory bout length ,” Journal of NeuroEngineering and Rehabilitation , vol. 13 , no. 1 , p. 46 , Dec . 2016 , doi: 10.1186/s12984-016-0154-5 . OpenUrl CrossRef [16]. ↵ C. Kirk et al. , “ Mobilise-D insights to estimate real-world walking speed in multiple conditions with a wearable device ,” Scientific Reports , vol. 14 , no. 1 , p. 1754 , Jan . 2024 , doi: 10.1038/s41598-024-51766-5 . OpenUrl CrossRef PubMed [17]. ↵ P. Slade , “pslade2/EnergyExpenditure: Energy expenditure code.” Accessed: Oct. 31, 2022 . [Online]. Available: https://zenodo.org/record/4891704 [18]. ↵ C. Lendt , N. Hansen , I. Froböse , and T. Stewart , “ Composite activity type and stride-specific energy expenditure estimation model for thigh-worn accelerometry ,” International Journal of Behavioral Nutrition and Physical Activity , vol. 21 , no. 1 , p. 99 , Sep . 2024 , doi: 10.1186/s12966-024-01646-y . OpenUrl CrossRef [19]. ↵ R. Romijnders , E. Warmerdam , C. Hansen , G. Schmidt , and W. Maetzler , “ A Deep Learning Approach for Gait Event Detection from a Single Shank-Worn IMU: Validation in Healthy and Neurological Cohorts ,” Sensors , vol. 22 , no. 10 , p. 3859 , May 2022 , doi: 10.3390/s22103859 . OpenUrl CrossRef [20]. ↵ R. Romijnders et al. , “ Ecological validity of a deep learning algorithm to detect gait events from real-life walking bouts in mobility-limiting diseases ,” Frontiers in Neurology , vol. 14 , p. 1247532 , Oct . 2023 , doi: 10.3389/fneur.2023.1247532 . OpenUrl CrossRef [21]. ↵ M. E. Micó-Amigo et al. , “ Assessing real-world gait with digital technology? Validation, insights and recommendations from the Mobilise-D consortium ,” Journal of NeuroEngineering and Rehabilitation , vol. 20 , no. 1 , p. 78 , Jun . 2023 , doi: 10.1186/s12984-023-01198-5 . OpenUrl CrossRef PubMed [22]. ↵ B. O. Åsvold et al. , “ Cohort Profile Update: The HUNT Study, Norway ,” International Journal of Epidemiology , vol. 52 , no. 1 , pp. e80 – e91 , Feb. 2023 , doi: 10.1093/ije/dyac095 . OpenUrl CrossRef [23]. ↵ P. Consortium , “About ProPass.” Accessed: Oct. 13, 2025 . [Online]. Available: https://www.propassconsortium.org/about-propass [24]. A. Logacjov , K. Bach , A. Kongsvold , H. B. Bårdstu , and P. J. Mork , “ HARTH: A Human Activity Recognition Dataset for Machine Learning ,” Sensors , vol. 21 , no. 23 , p. 7853 , Nov . 2021 , doi: 10.3390/s21237853 . OpenUrl CrossRef PubMed [25]. ↵ A. Ustad et al. , “ Validation of an Activity Type Recognition Model Classifying Daily Physical Behavior in Older Adults: The HAR70+ Model ,” Sensors , vol. 23 , no. 5 , p. 2368 , Jan . 2023 , doi: 10.3390/s23052368 . OpenUrl CrossRef PubMed [26]. C. Lendt , “Thigh-Worn Accelerometry and Gait Event Detection.” [Online]. Available : doi: 10.5281/zenodo.17629130 OpenUrl CrossRef [27]. M. Grimmer , K. Schmidt , J. E. Duarte , L. Neuner , G. Koginov , and R. Riener , “ Stance and Swing Detection Based on the Angular Velocity of Lower Limb Segments During Walking ,” Frontiers in Neurorobotics , vol. 13 , p. 57 , Jul . 2019 , doi: 10.3389/fnbot.2019.00057 . OpenUrl CrossRef [28]. A. J. Anderson et al. , “WearGait-PD: An Open-Access Wearables Dataset for Gait in Parkinson’s Disease and Age-Matched Controls.” Accessed: Mar. 16, 2025 . [Online]. Available: http://medrxiv.org/lookup/doi/10.1101/2024.09.11.24313476 [29]. E. Warmerdam , C. Hansen , R. Romijnders , M. A. Hobert , J. Welzel , and W. Maetzler , “ Full-Body Mobility Data to Validate Inertial Measurement Unit Algorithms in Healthy and Neurological Cohorts ,” Data , vol. 7 , no. 10 , p. 136 , Sep . 2022 , doi: 10.3390/data7100136 . OpenUrl CrossRef [30]. ↵ S. Chan and A. Doherty , “Actipy.” [Online]. Available: https://github.com/OxWearables/actipy [31]. ↵ L. Baroudi , M. W. Newman , E. A. Jackson , K. Barton , K. A. Shorter , and S. M. Cain , “ Estimating Walking Speed in the Wild ,” Frontiers in Sports and Active Living , vol. 2 , p. 583848 , Nov . 2020 , doi: 10.3389/fspor.2020.583848 . OpenUrl CrossRef [32]. ↵ S. Del Din , A. Godfrey , and L. Rochester , “ Validation of an Accelerometer to Quantify a Comprehensive Battery of Gait Characteristics in Healthy Older Adults and Parkinson’s Disease: Toward Clinical and at Home Use ,” IEEE Journal of Biomedical and Health Informatics , vol. 20 , no. 3 , pp. 838 – 847 , May 2016 , doi: 10.1109/JBHI.2015.2419317 . OpenUrl CrossRef [33]. ↵ L. P. Pellerine et al. , “ Step Length, But Not Stepping Cadence, Strongly Predicts Physical Activity Intensity During Jogging and Running ,” Measurement in Physical Education and Exercise Science , pp. 1 – 10 , Mar . 2023 , doi: 10.1080/1091367X.2023.2188118 . OpenUrl CrossRef [34]. ↵ S. Bai , J. Z. Kolter , and V. Koltun , “An Empirical Evaluation of Generic Convolutional and Recurrent Networks for Sequence Modeling,” 2018 , doi: 10.48550/ARXIV.1803.01271 . OpenUrl CrossRef [35]. ↵ T. Stewart , A. Narayanan , L. Hedayatrad , J. Neville , L. Mackay , and S. Duncan , “ A Dual-Accelerometer System for Classifying Physical Activity in Children and Adults ,” Medicine & Science in Sports & Exercise , vol. 50 , no. 12 , pp. 2595 – 2602 , Dec . 2018 , doi: 10.1249/MSS.0000000000001717 . OpenUrl CrossRef PubMed [36]. ↵ R. S. McGinnis et al. , “ A machine learning approach for gait speed estimation using skinmounted wearable sensors: From healthy controls to individuals with multiple sclerosis ,” PLOS ONE , vol. 12 , no. 6 , p. e178366 , Jun . 2017 , doi: 10.1371/journal.pone.0178366 . OpenUrl CrossRef [37]. ↵ E. M. Murtagh , J. L. Mair , E. Aguiar , C. Tudor-Locke , and M. H. Murphy , “ Outdoor Walking Speeds of Apparently Healthy Adults: A Systematic Review and Meta-analysis ,” Sports Medicine , vol. 51 , no. 1 , pp. 125 – 141 , Jan . 2021 , doi: 10.1007/s40279-020-01351-3 . OpenUrl CrossRef PubMed [38]. ↵ L. L. Y. Chan , T. C. M. Choi , S. R. Lord , and M. A. Brodie , “ Development and large-scale validation of the Watch Walk wrist-worn digital gait biomarkers ,” Scientific Reports , vol. 12 , no. 1 , p. 16211 , Oct . 2022 , doi: 10.1038/s41598-022-20327-z . OpenUrl CrossRef PubMed [39]. ↵ S. Tamura , K. Miyata , T. Igarashi , T. Iizuka , T. Otani , and S. Usuda , “ Minimal clinically important difference of the short physical performance battery and comfortable walking speed in old-old adults with acute cardiovascular disease: a multicenter, prospective, observational study ,” Disability and Rehabilitation , vol. 45 , no. 6 , pp. 1079 – 1086 , Mar . 2023 , doi: 10.1080/09638288.2022.2052978 . OpenUrl CrossRef PubMed [40]. ↵ R. W. Bohannon and S. S. Glenney , “ Minimal clinically important difference for change in comfortable gait speed of adults with pathology: a systematic review ,” Journal of Evaluation in Clinical Practice , vol. 20 , no. 4 , pp. 295 – 300 , Aug . 2014 , doi: 10.1111/jep.12158 . OpenUrl CrossRef PubMed [41]. ↵ R. D. Gurchiek , C. P. Garabed , and R. S. McGinnis , “ Gait event detection using a thigh-worn accelerometer ,” Gait & Posture , vol. 80 , pp. 214 – 216 , Jul . 2020 , doi: 10.1016/j.gaitpost.2020.06.004 . OpenUrl CrossRef PubMed [42]. ↵ K. A. Pfeiffer , K. A. Clevenger , A. Kaplan , C. A. Van Camp , S. J. Strath , and A. H. K. Montoye , “ Accessibility and use of novel methods for predicting physical activity and energy expenditure using accelerometry: a scoping review ,” Physiological Measurement , vol. 43 , no. 9 , p. 9 , Sep . 2022 , doi: 10.1088/1361-6579/ac89ca . OpenUrl CrossRef [43]. ↵ A. Zadka et al. , “ A wearable sensor and machine learning estimate step length in older adults and patients with neurological disorders ,” npj Digital Medicine , vol. 7 , no. 1 , p. 142 , May 2024 , doi: 10.1038/s41746-024-01136-2 . OpenUrl CrossRef View the discussion thread. Back to top Previous Next Posted November 19, 2025. Download PDF Supplementary Material Email Thank you for your interest in spreading the word about medRxiv. NOTE: Your email address is requested solely to identify you as the sender of this article. Your Email * Your Name * Send To * Enter multiple addresses on separate lines or separate them with commas. You are going to email the following Gait Analysis for Thigh-Worn Accelerometry A Data Processing Pipeline using Data-Driven Approaches Message Subject (Your Name) has forwarded a page to you from medRxiv Message Body (Your Name) thought you would like to see this page from the medRxiv website. Your Personal Message CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions. Share Gait Analysis for Thigh-Worn Accelerometry A Data Processing Pipeline using Data-Driven Approaches Claas Lendt , Martin Grimmer , Ingo Froböse , Tom Stewart medRxiv 2025.11.18.25339671; doi: https://doi.org/10.1101/2025.11.18.25339671 Share This Article: Copy Citation Tools Gait Analysis for Thigh-Worn Accelerometry A Data Processing Pipeline using Data-Driven Approaches Claas Lendt , Martin Grimmer , Ingo Froböse , Tom Stewart medRxiv 2025.11.18.25339671; doi: https://doi.org/10.1101/2025.11.18.25339671 Citation Manager Formats BibTeX Bookends EasyBib EndNote (tagged) EndNote 8 (xml) Medlars Mendeley Papers RefWorks Tagged Ref Manager RIS Zotero Tweet Widget Facebook Like Google Plus One Subject Area Health Informatics Subject Areas All Articles Addiction Medicine (572) Allergy and Immunology (864) Anesthesia (302) Cardiovascular Medicine (4448) Dentistry and Oral Medicine (444) Dermatology (383) Emergency Medicine (609) Endocrinology (including Diabetes Mellitus and Metabolic Disease) (1515) Epidemiology (15240) Forensic Medicine (30) Gastroenterology (1130) Genetic and Genomic Medicine (6614) Geriatric Medicine (669) Health Economics (1000) Health Informatics (4550) Health Policy (1372) Health Systems and Quality Improvement (1613) Hematology (543) HIV/AIDS (1268) Infectious Diseases (except HIV/AIDS) (15928) Intensive Care and Critical Care Medicine (1106) Medical Education (624) Medical Ethics (147) Nephrology (668) Neurology (6621) Nursing (346) Nutrition (999) Obstetrics and Gynecology (1147) Occupational and Environmental Health (957) Oncology (3343) Ophthalmology (977) Orthopedics (369) Otolaryngology (421) Pain Medicine (436) Palliative Medicine (130) Pathology (665) Pediatrics (1695) Pharmacology and Therapeutics (693) Primary Care Research (714) Psychiatry and Clinical Psychology (5459) Public and Global Health (9248) Radiology and Imaging (2205) Rehabilitation Medicine and Physical Therapy (1371) Respiratory Medicine (1197) Rheumatology (597) Sexual and Reproductive Health (715) Sports Medicine (530) Surgery (714) Toxicology (99) Transplantation (289) Urology (265) (function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'a0285e9f591ac13d',t:'MTc3OTkyMDAzNQ=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();
Text is read by the "Ask this paper" AI Q&A widget below.
Extraction quality varies by source — PMC NXML preserves structure
cleanly, OA-HTML may include some navigation residue, and OA-PDF can
have broken hyphenation. The publisher copy
(via DOI)
is the canonical version.