| Literature DB >> 30075023 |
Ana Patrícia Rocha1, Hugo Miguel Pereira Choupina2, Maria do Carmo Vilas-Boas2, José Maria Fernandes1, João Paulo Silva Cunha2.
Abstract
Human gait analysis provides valuable information regarding the way of walking of a given subject. Low-cost RGB-D cameras, such as the Microsoft Kinect, are able to estimate the 3-D position of several body joints without requiring the use of markers. This 3-D information can be used to perform objective gait analysis in an affordable, portable, and non-intrusive way. In this contribution, we present a system for fully automatic gait analysis using a single RGB-D camera, namely the second version of the Kinect. Our system does not require any manual intervention (except for starting/stopping the data acquisition), since it firstly recognizes whether the subject is walking or not, and identifies the different gait cycles only when walking is detected. For each gait cycle, it then computes several gait parameters, which can provide useful information in various contexts, such as sports, healthcare, and biometric identification. The activity recognition is performed by a predictive model that distinguishes between three activities (walking, standing and marching), and between two postures of the subject (facing the sensor, and facing away from it). The model was built using a multilayer perceptron algorithm and several measures extracted from 3-D joint data, achieving an overall accuracy and F1 score of 98%. For gait cycle detection, we implemented an algorithm that estimates the instants corresponding to left and right heel strikes, relying on the distance between ankles, and the velocity of left and right ankles. The algorithm achieved errors for heel strike instant and stride duration estimation of 15 ± 25 ms and 1 ± 29 ms (walking towards the sensor), and 12 ± 23 ms and 2 ± 24 ms (walking away from the sensor). Our gait cycle detection solution can be used with any other RGB-D camera that provides the 3-D position of the main body joints.Entities:
Mesh:
Year: 2018 PMID: 30075023 PMCID: PMC6075757 DOI: 10.1371/journal.pone.0201728
Source DB: PubMed Journal: PLoS One ISSN: 1932-6203 Impact factor: 3.240
Characterization of the subjects that participated in the experiment.
| Mean ± SD | Minimum | Maximum | |
|---|---|---|---|
| 31 ± 8 | 23 | 52 | |
| 1.71 ± 0.11 | 1.50 | 1.94 | |
| 67.9 ± 15.3 | 48.0 | 105.0 | |
| 23.0 ± 3.3 | 16.7 | 31.0 |
SD stands for standard deviation.
Fig 1Experimental setup including a RGB-D camera (Kinect v2) mounted on a tripod, and a Qualysis system with twelve infrared cameras.
The calibrated volume for Qualysis is illustrated by the salmon-coloured blocks. The walking path carried out by the subjects, for each task included in the protocol (T1, T2 and T3), is represented by the dashed arrowed lines. The relevant distances are also indicated. The figure was adapted from the Qualysis setup image provided by LABIOMEP (Porto Biomechanics Laboratory).
Fig 2Retro-reflective markers placed at the subject's body.
This figure was provided by LABIOMEP (Porto Biomechanics Laboratory).
Description of the tasks performed during the experiment, and associated number of trials.
| Task name | Description | No. of trials |
|---|---|---|
| Walk towards the Kinect for 7 m; turn around at 1.2 m from the sensor (outside its practical depth range); walk away from the sensor for another 7 m. | 10 | |
| Walk towards the Kinect for 5 m; turn around at 3.2 m from the sensor (within its practical depth range); walk away from the sensor for another 5 m. | 5 | |
| Walk towards the Kinect for 5 m; stop at 3.2 m from the sensor and stand still for 5 seconds; march in a military style (i.e., move the left and right feet up and down alternately, three times each, while standing in the same place); walk towards the sensor for 2 m; turn around at 1.2 m from the sensor; walk away from the sensor, repeating the same activities as for walking towards the sensor. | 5 |
Fig 3Body joints tracked by the Kinect v2.
Number of frames and duration of the selected Kinect data, for each and all activities, considering all subjects, as well as each subject (mean and standard deviation).
| Activity | No. of frames | Duration (min) | ||
|---|---|---|---|---|
| All subjects | Per subject | All subjects | Per subject | |
| 22,439 | 1,122 ± 96 | 12.3 | 0.6 ± 0.1 | |
| 23,899 | 1,195 ± 104 | 13.1 | 0.7 ± 0.1 | |
| 12,558 | 628 ± 60 | 6.9 | 0.3 ± 0.0 | |
| 12,198 | 610 ± 67 | 6.7 | 0.3 ± 0.0 | |
| 13,280 | 664 ± 44 | 7.3 | 0.4 ± 0.0 | |
| 13,443 | 672 ± 42 | 7.4 | 0.4 ± 0.0 | |
| 97,817 | 4,891 ± 314 | 53.7 | 2.7 ± 0.2 | |
Number of actual heel strikes and gait cycles performed by all subjects, per subject, and per trial, when considering all analyzed trials of task T1.
| Event | Side | All subjects and trials | Per subject | Per trial | |||
|---|---|---|---|---|---|---|---|
| WF | WB | WF | WB | WF | WB | ||
| 453 | 402 | 22.6 ± 3.4 | 20.1 ± 2.5 | 2.4 ± 0.5 | 2.1 ± 0.3 | ||
| 407 | 392 | 20.4 ± 2.4 | 19.6 ± 3.6 | 2.1 ± 0.3 | 2.0 ± 0.5 | ||
| 860 | 794 | 43.0 ± 4.3 | 39.7 ± 5.2 | 4.5 ± 0.6 | 4.1 ± 0.6 | ||
| 261 | 207 | 13.1 ± 3.3 | 10.4 ± 2.3 | 1.4 ± 0.5 | 1.1 ± 0.3 | ||
| 215 | 197 | 10.8 ± 2.2 | 9.8 ± 3.6 | 1.1 ± 0.3 | 1.0 ± 0.5 | ||
| 476 | 404 | 23.8 ± 4.0 | 20.2 ± 5.0 | 2.5 ± 0.6 | 2.1 ± 0.6 | ||
The results per subject and per trial are presented as mean and standard deviation values. All results are indicated for the left, right, and both heel strikes/gait cycles, as well as for walking towards and away from the sensor (WF and WB, respectively).
Kinematic measures computed over the 3-D body joint data for activity recognition, and corresponding equations.
| Measure | Joints | Equation |
|---|---|---|
| Head, neck, spine middle, spine base, and spine shoulder | (1) | |
| Shoulder, elbow, wrist, hand, hip, knee, ankle, foot, hand tip, and thumb | ||
| Head, neck, spine middle, spine base, and spine shoulder | (2) | |
| Left and right feet, ankles, knees, hands, wrists, elbows, hand tips, and thumbs | (3) | |
| Neck, spine shoulder, and spine middle | (4) | |
| Knee, and elbow | ||
| Neck, spine shoulder, and spine middle | (5) | |
| Knee, and elbow |
a corresponds to the mean of left and right joint measures, where the measure for each side was computed using the indicated equation.
b considering the head, neck, and spine shoulder joints, the neck, spine shoulder, and spine middle joints, and the spine shoulder, spine middle, and spine base joints, respectively.
c considering the hip, knee and ankle joints, and the wrist, elbow and shoulder joints, respectively.
Fig 4Solution for gait cycle detection, including activity recognition and heel strike estimation.
MAF stands for moving average filter.
Kinematic measures computed over the Qualysis 3-D data, and corresponding equations.
| Measure | Equation | Joint position computed from Qualysis markers |
|---|---|---|
| (1) | ||
| (3) | ||
The computation of the joint(s) position based on the Qualysis markers’ position is indicated for each measure. The markers’ placement is (Fig 2): LLA and LMA on the left ankle; RLA and RMA on the right ankle; LFM2 on the left foot; RFM2 on the right foot; LLK and LMK on the left knee; RLK and RMK on the right knee.
a P and y correspond to the 3-D position and y-coordinate of the position of marker name, respectively.
Fig 5Measures computed over Qualysis data acquired from a given subject while walking towards the Kinect.
(a) Filtered left and right foot vertical velocity, versus the elapsed time. (b) Distance between ankles, and between knees, versus the elapsed time. (c) Filtered left and right ankle velocity, versus the elapsed time. The actual left and right heel strikes are indicated in each plot.
Performance results achieved by the models built with different machine learning algorithms.
| Metric | Machine learning algorithms | ||||||
|---|---|---|---|---|---|---|---|
| k-NN | Decision tree | Random forest | SVM | MLP | MLPE | ||
| 98.6 | 95.1 | 98.6 | 98.3 | 98.3 | 98.4 | ||
| 0.0 ± 0.0 | 0.1 ± 0.0 | 3.3 ± 0.4 | 0.5 ± 0.0 | 1.7 ± 0.1 | 1.5 ± 0.1 | ||
| 349 ± 165 | 3 ± 7 | 67 ± 44 | 10 ± 10 | 5 ± 8 | 12 ± 9 | ||
| 10.5 ± 4.9 | 0.1 ± 0.2 | 2.0 ± 1.3 | 0.3 ± 0.3 | 0.2 ± 0.2 | 0.4 ± 0.3 | ||
The models’ performance results include the overall accuracy and overall F1 score, as well as the mean and standard deviation values for the training time when considering five runs, and the prediction time for a single frame and for 1,800 frames (≈1 min of data).
Accuracy and F1 score achieved by the final MLP model when predicting the activity over a dataset of five “never seen” subjects.
| Activity | Accuracy (%) | F1 score (%) |
|---|---|---|
| 99.3 | 98.4 | |
| 98.7 | 97.4 | |
| 99.6 | 98.4 | |
| 99.3 | 97.3 | |
| 99.5 | 98.2 | |
| 99.0 | 96.5 | |
| 97.7 | 97.7 |
The accuracy and F1 score for each activity or class were obtained using (6) and (8), respectively. The overall values of these metrics were computed using (7) and (9), respectively.
Window sizes used for gait cycle detection, as well as the corresponding achieved precision and sensitivity, for WF and WB trials.
| Walking activity | ||||
|---|---|---|---|---|
| WF | WB | |||
| 5 | 5 | |||
| 5 | 9 | |||
| 3 | 3 | |||
| 9 | 11 | |||
| 99.4 | 99.9 | |||
| 99.8 | 100.0 | |||
| 99.7 | 100.0 | |||
| 98.1 | 98.1 | |||
| 99.8 | 100.0 | |||
| 99.7 | 100.0 | |||
Mean and standard deviation of the true and absolute errors for estimating heel strike instants and gait parameters, when considering all subjects, trials, and detected heel strikes/gait cycles, for WF and WB trials.
| True error | Absolute error | ||||
|---|---|---|---|---|---|
| WF | WB | WF | WB | ||
| 14.8 ± 29.2 | 11.9 ± 23.6 | 21.9 ± 24.3 | 20.8 ± 16.2 | ||
| 14.4 ± 19.3 | 12.3 ± 21.9 | 19.2 ± 14.6 | 19.5 ± 15.7 | ||
| 14.6 ± 25.0 | 12.1 ± 22.7 | 20.6 ± 20.3 | 20.2 ± 16.0 | ||
| 2.7 ± 35.4 | 2.4 ± 23.8 | 20.4 ± 29.1 | 18.3 ± 15.3 | ||
| −1.3 ± 17.7 | 1.7 ± 24.9 | 13.3 ± 11.7 | 18.0 ± 17.3 | ||
| 0.9 ± 28.9 | 2.0 ± 24.3 | 17.2 ± 23.2 | 18.1 ± 16.3 | ||
| 0.4 ± 25.4 | 3.5 ± 23.6 | 19.1 ± 16.7 | 18.3 ± 15.3 | ||
| 1.6 ± 19.9 | 1.8 ± 23.8 | 15.3 ± 12.8 | 17.6 ± 16.0 | ||
| 0.9 ± 23.1 | 2.7 ± 23.7 | 17.4 ± 15.1 | 18.0 ± 15.6 | ||
| 1.2 ± 1.7 | −0.2 ± 3.3 | 1.7 ± 1.3 | 2.5 ± 2.2 | ||
| 0.6 ± 1.3 | 0.0 ± 3.8 | 1.1 ± 1.0 | 2.9 ± 2.5 | ||
| 0.9 ± 1.6 | −0.1 ± 3.6 | 1.4 ± 1.2 | 2.7 ± 2.4 | ||
| −3.3 ± 4.9 | −4.2 ± 5.5 | 4.2 ± 4.2 | 5.6 ± 4.0 | ||
| −2.2 ± 3.5 | −4.1 ± 5.5 | 3.3 ± 2.5 | 5.4 ± 4.1 | ||
| −2.8 ± 4.4 | −4.1 ± 5.5 | 3.8 ± 3.5 | 5.5 ± 4.0 | ||
| 0.010 ± 0.032 | −0.005 ± 0.038 | 0.017 ± 0.029 | 0.028 ± 0.025 | ||
| 0.007 ± 0.014 | −0.002 ± 0.037 | 0.012 ± 0.010 | 0.029 ± 0.023 | ||
| 0.009 ± 0.026 | −0.003 ± 0.037 | 0.015 ± 0.023 | 0.029 ± 0.024 | ||
Fig 6Measures computed from unfiltered and filtered Kinect data, for the same subject and WF trial of Fig 5.
(a) Distance between ankles versus the elapsed time, including the indication of the estimated and actual heel strike instants. (b) Velocity of left and right ankles versus the elapsed time, including the indication of the detected left and right heel strikes.