Gait Activity Classification on Unbalanced Data from Inertial Sensors Using Shallow and Deep Learning
Abstract
:1. Introduction
2. Related Work
3. Methods
3.1. OU-ISIR Gait Dataset
3.2. Data Treatments
- Using unbalanced data (no alterations in the original dataset), the total instances was 15,691 (see Figure 1a).
- Balancing data by sampling to the number of instances of the minority class: going down stairs, i.e., the total instances was 4,410 (see Figure 1b).
- Balancing data by increasing to the number of instances (Section 3.2.1) of the majority class: walking on level ground, i.e., the total instances was 49,325 (see Figure 1c).
3.2.1. Data Augmentation
- Scaling (DMM): Multiply all elements of each signal by a random value. The frequency of the signal remained.
- Jittering (DMM): Multiply a random value to each element of each signal (add noise). The frequency of the signal remained.
- Smoothing (DMM): Filter each signal using a Hann window with a length of the multiplied by a random value. The frequency of the signal remained.
- Downsampling (DMF): Random selection of frames and uniform subsampling to reduce the signals. The same rate was applied to all signals. The magnitude of the signals remained.
- Cutting (DMF): Reduce an equally number of frames ( multiplied by a random value) of the edges of the signals. The same rate was applied to all signals. The magnitude of the signals remained.
3.3. Activity Classification
3.3.1. Shallow Learning Approach
3.3.2. Deep Learning Approach
Imaging Time Series
Feature-Based Image
Convolutional Neuronal Network (CNN)
4. Results and Discussion
4.1. Gait Classification Using Shallow Learning
4.1.1. Unbalanced Data
4.1.2. Sampled Dataset
4.1.3. Augmented Dataset
4.1.4. Classification Comparison
4.2. Gait Classification Using Deep Learning
4.2.1. Unbalanced Dataset
4.2.2. Sampled Dataset
4.2.3. Augmented Dataset
4.2.4. Classification Comparison
4.3. Discussion
5. Conclusions
Author Contributions
Funding
Conflicts of Interest
Abbreviations
DMM | Data Modifying the Magnitude of the signal’s |
DMF | Data Modifying the Frequency of the signals |
ACC | Acceleration sensor |
GYR | Gyroscope sensor |
FD | Forward Direction signal |
XYZ | magnitude vector signal |
NB | Naive Bayes |
SVM | Support Vector Machines |
KNN | K-Nearest Neighbors |
CNN | Convolutional Neuronal Network |
DL | Deep Learning |
GAF | Gramian Angular Field |
References
- Lopez-Nava, I.H.; Muñoz-Meléndez, A. Human action recognition based on low-and high-level data from wearable inertial sensors. Int. J. Distrib. Sens. Networks 2019, 15, 1550147719894532. [Google Scholar] [CrossRef] [Green Version]
- López-Nava, I.H.; Muñoz-Meléndez, A. High-level features for recognizing human actions in daily living environments using wearable sensors. Proceedings 2018, 2, 1238. [Google Scholar] [CrossRef] [Green Version]
- Woznowski, P.; Kaleshi, D.; Oikonomou, G.; Craddock, I. Classification and suitability of sensing technologies for activity recognition. Comput. Commun. 2016, 89, 34–50. [Google Scholar] [CrossRef] [Green Version]
- Long, X.; Yin, B.; Aarts, R.M. Single-accelerometer-based daily physical activity classification. In Proceedings of the 2009 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Minneapolis, MN, USA, 2–6 September 2009; pp. 6107–6110. [Google Scholar]
- Chandler, J.; Brazendale, K.; Beets, M.; Mealing, B. Classification of physical activity intensities using a wrist-worn accelerometer in 8–12-year-old children. Pediatr. Obes. 2016, 11, 120–127. [Google Scholar] [CrossRef]
- Duncan, M.J.; Rowlands, A.; Lawson, C.; Leddington Wright, S.; Hill, M.; Morris, M.; Eyre, E.; Tallis, J. Using accelerometry to classify physical activity intensity in older adults: What is the optimal wear-site? Eur. J. Sport Sci. 2019, 1–9. [Google Scholar] [CrossRef] [PubMed]
- Startzell, J.K.; Owens, D.A.; Mulfinger, L.M.; Cavanagh, P.R. Stair negotiation in older people: A review. J. Am. Geriatr. Soc. 2000, 48, 567–580. [Google Scholar] [CrossRef] [PubMed]
- Hall, K.S.; Hyde, E.T.; Bassett, D.R.; Carlson, S.A.; Carnethon, M.R.; Ekelund, U.; Evenson, K.R.; Galuska, D.A.; Kraus, W.E.; Lee, I.M.; et al. Systematic review of the prospective association of daily step counts with risk of mortality, cardiovascular disease, and dysglycemia. Int. J. Behav. Nutr. Phys. 2020, 17, 1–14. [Google Scholar] [CrossRef] [PubMed]
- Saint-Maurice, P.F.; Troiano, R.P.; Bassett, D.R.; Graubard, B.I.; Carlson, S.A.; Shiroma, E.J.; Fulton, J.E.; Matthews, C.E. Association of daily step count and step intensity with mortality among US adults. JAMA 2020, 323, 1151–1160. [Google Scholar] [CrossRef]
- Goodfellow, I.; Bengio, Y.; Courville, A. Deep Learning; MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
- LeCun, Y.; Bengio, Y.; Hinton, G. Deep learning. Nature 2015, 521, 436–444. [Google Scholar] [CrossRef]
- Wan, S.; Qi, L.; Xu, X.; Tong, C.; Gu, Z. Deep learning models for real-time human activity recognition with smartphones. Mob. Netw. Appl. 2019, 25, 1–13. [Google Scholar] [CrossRef]
- Nguyen, K.T.; Portet, F.; Garbay, C. Dealing with Imbalanced data sets for Human Activity Recognition using Mobile Phone sensors. In Proceedings of the 3rd International Workshop on Smart Sensing Systems, Rome, Italy, 25–27 May 2018; pp. 129–138. [Google Scholar]
- He, H.; Garcia, E.A. Learning from imbalanced data. IEEE Trans. Knowl. Data Eng. 2009, 21, 1263–1284. [Google Scholar]
- Lopez-Nava, I.H.; Garcia-Constantino, M.; Favela, J. Recognition of Gait Activities Using Acceleration Data from A Smartphone and A Wearable Device. Proceedings 2019, 31, 60. [Google Scholar] [CrossRef] [Green Version]
- Guiry, J.J.; van de Ven, P.; Nelson, J.; Warmerdam, L.; Riper, H. Activity recognition with smartphone support. Med. Eng. Phys. 2014, 36, 670–675. [Google Scholar] [CrossRef] [PubMed]
- Wei, Z.; Qinghui, W.; Muqing, D.; Yiqi, L. A new inertial sensor-based gait recognition method via deterministic learning. In Proceedings of the 2015 34th Chinese Control Conference (CCC), Hangzhou, China, 28–30 July 2015; pp. 3908–3913. [Google Scholar]
- Sprager, S.; Juric, M.B. An efficient HOS-based gait authentication of accelerometer data. IEEE Trans. Inf. Forenic Sec. 2015, 10, 1486–1498. [Google Scholar] [CrossRef]
- Subramanian, R.; Sarkar, S.; Labrador, M.; Contino, K.; Eggert, C.; Javed, O.; Zhu, J.; Cheng, H. Orientation invariant gait matching algorithm based on the Kabsch alignment. In Proceedings of the IEEE International Conference on Identity, Security and Behavior Analysis (ISBA 2015), Hong Kong, China, 23–25 March 2015; pp. 1–8. [Google Scholar]
- Caldas, R.; Hu, Y.; de Lima Neto, F.B.; Markert, B. Self-organizing maps and fuzzy c-means algorithms on gait analysis based on inertial sensors data. In Proceedings of the International Conference on Intelligent Systems Design and Applications, Porto, Portugal, 14–16 December 2016; pp. 197–205. [Google Scholar]
- Lee, S.M.; Yoon, S.M.; Cho, H. Human activity recognition from accelerometer data using Convolutional Neural Network. In Proceedings of the IEEE International Conference on Big Data and Smart Computing (BigComp), Jeju, Korea, 13–16 February 2017; pp. 131–134. [Google Scholar]
- Lin, H.W.; Tegmark, M.; Rolnick, D. Why does deep and cheap learning work so well? J. Stat. Phys. 2017, 168, 1223–1247. [Google Scholar] [CrossRef] [Green Version]
- Nguyen, K.T.; Vo-Tran, T.L.; Dinh, D.T.; Tran, M.T. Gait recognition with multi-region size convolutional neural network for authentication with wearable sensors. In Proceedings of the International Conference on Future Data and Security Engineering, Ho Chi Minh City, Vietnam, 27–29 November 2017; pp. 197–212. [Google Scholar]
- Delgado-Escano, R.; Castro, F.M.; Cózar, J.R.; Marín-Jiménez, M.J.; Guil, N. An end-to-end multi-task and fusion CNN for inertial-based gait recognition. IEEE Access 2018, 7, 1897–1908. [Google Scholar] [CrossRef]
- Sun, Y.; Lo, F.P.W.; Lo, B. A Deep Learning Approach on Gender and Age Recognition using a Single Inertial Sensor. In Proceedings of the 2019 IEEE 16th International Conference on Wearable and Implantable Body Sensor Networks (BSN), Chicago, IL, USA, 19–22 May 2019; pp. 1–4. [Google Scholar]
- Ahad, M.A.R.; Ngo, T.T.; Antar, A.D.; Ahmed, M.; Hossain, T.; Muramatsu, D.; Makihara, Y.; Inoue, S.; Yagi, Y. Wearable Sensor-Based Gait Analysis for Age and Gender Estimation. Sensors 2020, 20, 2424. [Google Scholar] [CrossRef]
- Ngo, T.T.; Makihara, Y.; Nagahara, H.; Mukaigawa, Y.; Yagi, Y. The largest inertial sensor-based gait database and performance evaluation of gait-based personal authentication. Pattern. Recogn. 2014, 47, 228–237. [Google Scholar] [CrossRef] [Green Version]
- Um, T.T.; Pfister, F.M.; Pichler, D.; Endo, S.; Lang, M.; Hirche, S.; Fietzek, U.; Kulić, D. Data augmentation of wearable sensor data for parkinson’s disease monitoring using convolutional neural networks. In Proceedings of the 19th ACM International Conference on Multimodal Interaction, Glasgow, UK, 13–17 November 2017; pp. 216–220. [Google Scholar]
- Steven Eyobu, O.; Han, D.S. Feature representation and data augmentation for human activity classification based on wearable IMU sensor data using a deep LSTM neural network. Sensors 2018, 18, 2892. [Google Scholar] [CrossRef] [Green Version]
- Friedman, N.; Geiger, D.; Goldszmidt, M. Bayesian network classifiers. Mach. Learn. 1997, 29, 131–163. [Google Scholar] [CrossRef] [Green Version]
- Quinlan, J.R. C4.5: Programs for Machine Learning; Elsevier: Amsterdam, The Netherlands, 2014. [Google Scholar]
- Cortes, C.; Vapnik, V. Support-vector networks. Mach. Learn. 1995, 20, 273–297. [Google Scholar] [CrossRef]
- Keller, J.M.; Gray, M.R.; Givens, J.A. A fuzzy k-nearest neighbor algorithm. IEEE Trans. Syst. Man. Cybern. 1985, SMC-15, 580–585. [Google Scholar] [CrossRef]
- Sengupta, S.; Basak, S.; Saikia, P.; Paul, S.; Tsalavoutis, V.; Atiah, F.; Ravi, V.; Peters, R.A. A Review of Deep Learning with Special Emphasis on Architectures, Applications and Recent Trends. Knowl.-Based Syst. 2020. [Google Scholar] [CrossRef] [Green Version]
- Hamme, T.; Garofalo, G.; Argones Rúa, E.; Preuveneers, D.; Joosen, W. A Systematic Comparison of Age and Gender Prediction on IMU Sensor-Based Gait Traces. Sensors 2019, 19, 2945. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Zhao, Y.; Zhou, S. Wearable Device-Based Gait Recognition Using Angle Embedded Gait Dynamic Images and a Convolutional Neural Network. Sensors 2017, 17, 478. [Google Scholar] [CrossRef]
- Wang, Z.; Oates, T. Imaging Time-Series to Improve Classification and Imputation. In Proceedings of the 24th International Conference on Artificial Intelligence, Buenos Aires, Argentina, 25–31 July 2015; pp. 3939–3945. [Google Scholar]
- Nair, V.; Hinton, G.E. Rectified Linear Units Improve Restricted Boltzmann Machines. In Proceedings of the 27th International Conference on International Conference on Machine Learning, Haifa, Israel, 21–24 June 2010; pp. 807–814. [Google Scholar]
Sensor | Signal | Features | NB | C4.5 | SVM | KNN | Avg () |
---|---|---|---|---|---|---|---|
FD | 5 | 66.0 | 68.5 | 69.1 | 59.5 | 65.8 (4.4) | |
Acc | XYZ | 5 | 63.8 | 66.5 | 68.4 | 54.8 | 63.4 (6.0) |
FD+XYZ | 9 | 63.7 | 67.8 | 69.6 | 61.6 | 65.7 (3.7) | |
FD | 5 | 68.2 | 71.9 | 71.8 | 60.4 | 68.1 (5.4) | |
Gyr | XYZ | 5 | 63.0 | 66.3 | 68.2 | 54.2 | 62.9 (6.2) |
FD+XYZ | 9 | 56.8 | 69.9 | 72.2 | 62.6 | 65.4 (7.0) | |
FD | 9 | 67.9 | 72.5 | 72.8 | 66.4 | 69.9 (3.2) | |
Acc + Gyr | XYZ | 9 | 61.3 | 65.2 | 69.4 | 57.7 | 63.4 (5.0) |
FD+XYZ | 17 | 55.3 | 70.6 | 73.2 | 69.7 | 67.2 (8.1) |
Gait Activity | NB | C4.5 | SVM | KNN | Avg () |
---|---|---|---|---|---|
Going down an incline | 0.205 | 0.299 | 0.038 | 0.349 | 0.223 (0.137) |
Going up an incline | 0.231 | 0.305 | 0.007 | 0.315 | 0.215 (0.143) |
Walking on level ground | 0.795 | 0.825 | 0.827 | 0.795 | 0.811 (0.018) |
Going down stairs | 0.676 | 0.860 | 0.904 | 0.862 | 0.826 (0.102) |
Going up stairs | 0.833 | 0.862 | 0.912 | 0.893 | 0.875 (0.035) |
Weighted avg | 0.625 | 0.696 | 0.633 | 0.687 | 0.660 (0.087) |
() | (0.307) | (0.270) | (0.424) | (0.257) |
Sensor | Signal | Features | NB | C4.5 | SVM | KNN | Avg () |
---|---|---|---|---|---|---|---|
FD | 5 | 51.7 | 52.0 | 53.6 | 47.0 | 51.1 (2.8) | |
Acc | XYZ | 5 | 46.9 | 45.7 | 50.3 | 42.2 | 46.3 (3.3) |
FD+XYZ | 9 | 50.0 | 51.8 | 55.5 | 49.7 | 51.7 (2.7) | |
FD | 5 | 46.0 | 43.2 | 47.4 | 40.0 | 44.2 (3.3) | |
Gyr | XYZ | 5 | 45.3 | 44.3 | 48.0 | 39.5 | 44.3 (3.5) |
FD+XYZ | 9 | 45.7 | 45.2 | 50.5 | 43.5 | 46.2 (3.0) | |
FD | 9 | 53.2 | 53.5 | 58.0 | 50.6 | 53.8 (3.1) | |
Acc + Gyr | XYZ | 9 | 47.5 | 47.4 | 53.0 | 44.5 | 48.1 (3.6) |
FD+XYZ | 17 | 50.0 | 54.0 | 60.3 | 52.1 | 54.1 (4.4) |
Gait Activity | NB | C4.5 | SVM | KNN | Avg () |
---|---|---|---|---|---|
Going down an incline | 0.421 | 0.455 | 0.537 | 0.423 | 0.459 (0.137) |
Going up an incline | 0.498 | 0.444 | 0.518 | 0.422 | 0.471 (0.143) |
Walking on level ground | 0.373 | 0.402 | 0.417 | 0.404 | 0.399 (0.018) |
Going down stairs | 0.676 | 0.711 | 0.775 | 0.690 | 0.713 (0.102) |
Going up stairs | 0.671 | 0.691 | 0.767 | 0.690 | 0.705 (0.035) |
Weighted avg | 0.528 | 0.540 | 0.603 | 0.526 | 0.549 (0.041) |
() | (0.125) | (0.132) | (0.143) | (0.134) |
Sensor | Signal | Features | NB | C4.5 | SVM | KNN | Avg () |
---|---|---|---|---|---|---|---|
FD | 5 | 57.7 | 71.1 | 60.3 | 68.9 | 64.5 (6.5) | |
Acc | XYZ | 5 | 51.9 | 60.7 | 57.3 | 57.0 | 56.7 (3.6) |
FD+XYZ | 9 | 56.4 | 72.1 | 62.4 | 73.2 | 66.0 (8.0) | |
FD | 5 | 44.7 | 48.1 | 46.8 | 47.7 | 46.8 (1.5) | |
Gyr | XYZ | 5 | 43.2 | 44.7 | 45.6 | 43.7 | 44.3 (1.1) |
FD+XYZ | 9 | 43.2 | 51.3 | 49.6 | 57.2 | 50.3 (5.8) | |
FD | 9 | 60.0 | 81.2 | 65.1 | 77.2 | 70.9 (10.0) | |
Acc + Gyr | XYZ | 9 | 55.5 | 66.0 | 62.5 | 67.1 | 62.8 (5.2) |
FD+XYZ | 17 | 58.9 | 81.2 | 68.0 | 79.6 | 71.9 (10.5) |
Gait Activity | NB | C4.5 | SVM | KNN | Avg () |
---|---|---|---|---|---|
Going down an incline | 0.325 | 0.714 | 0.511 | 0.674 | 0.556 (0.177) |
Going up an incline | 0.554 | 0.748 | 0.583 | 0.704 | 0.647 (0.093) |
Walking on level ground | 0.787 | 0.800 | 0.795 | 0.761 | 0.786 (0.017) |
Going down stairs | 0.552 | 0.872 | 0.700 | 0.899 | 0.756 (0.162) |
Going up stairs | 0.698 | 0.925 | 0.769 | 0.944 | 0.834 (0.120) |
Weighted avg | 0.583 | 0.812 | 0.672 | 0.797 | 0.716 (0.114) |
() | (0.157) | (0.078) | (0.109) | (0.107) |
Gait Activity | Precision | Recall | F-Measure | Support |
---|---|---|---|---|
Going down an incline | 0.810 | 0.802 | 0.806 | 419 |
Going up an incline | 0.773 | 0.812 | 0.792 | 377 |
Walking on level ground | 0.942 | 0.919 | 0.930 | 1973 |
Going down stairs | 0.883 | 0.943 | 0.912 | 176 |
Going up stairs | 0.872 | 0.968 | 0.918 | 190 |
Accuracy | 0.895 | 3135 | ||
Macro Avg. | 0.856 | 0.889 | 0.871 | 3135 |
Weighted Avg. | 0.896 | 0.895 | 0.895 | 3135 |
Gait Activity | Precision | Recall | F-Measure | Support |
---|---|---|---|---|
Going down an incline | 0.849 | 0.897 | 0.872 | 175 |
Going up an incline | 0.891 | 0.891 | 0.891 | 175 |
Walking on level ground | 0.867 | 0.817 | 0.841 | 175 |
Going down stairs | 0.971 | 0.949 | 0.96 | 175 |
Going up stairs | 0.95 | 0.971 | 0.96 | 175 |
Accuracy | 0.905 | 875 | ||
Macro Avg. | 0.905 | 0.905 | 0.905 | 875 |
Weighted Avg. | 0.905 | 0.905 | 0.905 | 875 |
Gait Activity | Precision | Recall | F-Measure | Support |
---|---|---|---|---|
Going down an incline | 0.912 | 0.873 | 0.892 | 1553 |
Going up an incline | 0.890 | 0.885 | 0.887 | 1594 |
Walking on level ground | 0.964 | 0.989 | 0.977 | 1972 |
Going down stairs | 0.935 | 0.914 | 0.924 | 1796 |
Going up stairs | 0.922 | 0.956 | 0.939 | 1781 |
Accuracy | 0.927 | 8696 | ||
Macro Avg. | 0.925 | 0.923 | 0.924 | 8696 |
Weighted Avg. | 0.927 | 0.927 | 0.927 | 8696 |
Data Treatment | |||
---|---|---|---|
Gait Activity | Unbalanced | Sampled | Augmented |
Going down an incline | 0.806 | 0.872 | 0.892 |
Going up an incline | 0.792 | 0.891 | 0.887 |
Walking on level ground | 0.930 | 0.841 | 0.977 |
Going down stairs | 0.912 | 0.960 | 0.924 |
Going up stairs | 0.918 | 0.960 | 0.939 |
Weighted avg | 0.895 | 0.905 | 0.927 |
() | (0.064) | (0.048) | (0.033) |
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Share and Cite
Lopez-Nava, I.H.; Valentín-Coronado, L.M.; Garcia-Constantino, M.; Favela, J. Gait Activity Classification on Unbalanced Data from Inertial Sensors Using Shallow and Deep Learning. Sensors 2020, 20, 4756. https://doi.org/10.3390/s20174756
Lopez-Nava IH, Valentín-Coronado LM, Garcia-Constantino M, Favela J. Gait Activity Classification on Unbalanced Data from Inertial Sensors Using Shallow and Deep Learning. Sensors. 2020; 20(17):4756. https://doi.org/10.3390/s20174756
Chicago/Turabian StyleLopez-Nava, Irvin Hussein, Luis M. Valentín-Coronado, Matias Garcia-Constantino, and Jesus Favela. 2020. "Gait Activity Classification on Unbalanced Data from Inertial Sensors Using Shallow and Deep Learning" Sensors 20, no. 17: 4756. https://doi.org/10.3390/s20174756
APA StyleLopez-Nava, I. H., Valentín-Coronado, L. M., Garcia-Constantino, M., & Favela, J. (2020). Gait Activity Classification on Unbalanced Data from Inertial Sensors Using Shallow and Deep Learning. Sensors, 20(17), 4756. https://doi.org/10.3390/s20174756