Out-of-Distribution Detection of Human Activity Recognition with Smartwatch Inertial Sensors
<p>SPARS9x concentric exercises: (<b>a</b>) active flexion; (<b>b</b>) cross chest adduction; (<b>c</b>) shoulder girdle stabilization with elevation; (<b>d</b>) biceps muscle strengthening; (<b>e</b>) triceps pull downs; and (<b>f</b>) external rotation in 90-degree abduction in the scapular plane. Black arrows indicate direction of motion or tension.</p> "> Figure 2
<p>In-distribution classification confusion matrices with KNN with FCN Deep Features at 10 s segment size for: (<b>a</b>) MHEALTH; (<b>b</b>) SPARS; and (<b>c</b>) SPARS9x.</p> "> Figure 3
<p>OOD-Detection AUROC for SPARS9x for each method by segment length. Traditional algorithms with engineered features are shown in red (1–3), deep features in yellow (4 and 5), deep learning approaches with FCN in blue (6–9), and deep learning approaches with CRNN in green (10–13).</p> "> Figure 4
<p>Distributions of activations of SPARS9x prediction with CRNN core: (<b>a</b>) Softmax activation; and (<b>b</b>–<b>d</b>) activation post-processing with ODIN, entropy regularization, and OpenMax respectively. Activations are scaled to between 0 and 1 for each method for illustrative purposes.</p> "> Figure 5
<p>Mean activations for each method by ground truth class labels for SPARS9x prediction with FCN core: (<b>a</b>) Softmax activation; and (<b>b</b>–<b>d</b>) activation post-processing with ODIN, entropy regularization, and OpenMax respectively. Activations are scaled to between 0 and 1 for each method for illustrative purposes.</p> "> Figure 6
<p>Effect on shoulder girdle stabilization exercise inclusion/exclusion from training data for OOD detection of the SPARS9x dataset on: (<b>a</b>) FCN Softmax activation; and (<b>b</b>) normalized KNN nearest neighbor distance. This figure highlights the resiliency to changes in training class inclusion/exclusion of the KNN algorithm compared to deep learning algorithms for detecting OOD data with this dataset. Note that, even though the mean Softmax activation decreases for the OOD data and increases for the in-distribution classes with shoulder girdle stabilization removed, there is still a slight decrease in AUROC (see Softmax Threshold of <a href="#sensors-21-01669-f007" class="html-fig">Figure 7</a>b).</p> "> Figure 7
<p>Effect on OOD Detection AUROC of selected algorithms by: (<b>a</b>) moving MHEALTH “cycling” class from OOD to IIN; and (<b>b</b>) removing the “Shoulder Girdle Stabilization” exercise from SPARS9x. FCN core is used for the deep learning methods.</p> "> Figure 8
<p>Effect on FCN Softmax activation for each activity in MHEALTH when cycling activity is in OOD and when cycling activity is IIN.</p> ">
Abstract
:1. Introduction
- A new physiotherapy activity dataset SPARS9x (DOI: 10.21227/cx5v-vw46), with additional inertial data captured from the smartwatch of each subject while they performed activities of daily living. We believe this study is unique in its approach of capturing a dataset that explicitly simulates the distinction between known target human activities and unknown a priori OOD activities.
- Evaluation of methods of OOD detection from the image domain as applied to physiotherapy inertial data captured by smartwatches, in comparison to traditional algorithms using both hand-crafted engineered statistical features and deep learning model-derived features.
2. Background and Related Work
2.1. Human Activity Recognition with Machine Learning of Inertial Data
2.2. Out-of-Distribution Detection Techniques
2.3. OOD Detection with Inertial Data
3. Materials and Methods
3.1. Out-of-Distribution Detection
3.1.1. One Class State Vector Machines (OCSVMs)
3.1.2. K-Nearest Neighbor (KNN)
3.1.3. Kmeans
3.1.4. Deep Feature Embedding
3.1.5. Softmax Thresholding
3.1.6. Entropy Regularization
3.1.7. ODIN
3.1.8. OpenMax
3.2. Experimental Setup
3.2.1. Experimental Datasets
3.2.2. Data Transformation Pipeline
3.2.3. Model Architecture
3.2.4. In-Distribution Classification Experiments
- KNN with engineered statistical features
- KNN with deep features (CRNN/FCN)
- CRNN and FCN Cores
3.2.5. Out-of-Distribution Prediction Experiments
- Traditional algorithms: KNN, OCSVM, and Kmeans with engineered features
- KNN with deep features (CRNN/FCN)
- Deep learning methods: SoftMax threshold, entropy regularization, ODIN, and OpenMax
3.2.6. Class Removal Experiments
3.2.7. Training and Validation
3.2.8. Evaluation Metrics
4. Results
4.1. In-Distribution Classification
4.2. Out-of-Distribution Detection
4.3. Class Removal Experiments
4.4. Train and Prediction Time
5. Discussion
6. Future Work
7. Limitations
8. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Bulling, A.; Blanke, U.; Schiele, B. A tutorial on human activity recognition using body-worn inertial sensors. ACM Comput. Surv. 2014, 46, 1–33. [Google Scholar] [CrossRef]
- Anguita, D.; Ghio, A.; Oneto, L.; Parra, X.; Reyes-Ortiz, J.L. A Public Domain Dataset for Human Activity Recognition Using Smartphones. In Proceedings of the European Symposium on Artificial Neural Networks, Computational Intelligence and Machine Learning, Bruge, Belgium, 24–26 April 2013. [Google Scholar]
- Garcia-Ceja, E.; Brena, R.F.; Carrasco-Jimenez, J.C.; Garrido, L. Long-Term Activity Recognition from Wristwatch Accelerometer Data. Sensors 2014, 14, 22500–22524. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Özdemir, A.T.; Barshan, B. Detecting Falls with Wearable Sensors Using Machine Learning Techniques. Sensors 2014, 14, 10691–10708. [Google Scholar] [CrossRef] [PubMed]
- Shoaib, M.; Incel, O.D.; Scholten, H.; Havinga, P. SmokeSense: Online Activity Recognition Framework on Smartwatches. In Mobile Computing, Applications, and Services; Springer: Berlin/Heidelberg, Germany, 2018; pp. 106–124. [Google Scholar] [CrossRef]
- Burns, D.M.; Leung, N.E.; Hardisty, M.; Whyne, C.M.; Henry, P.; McLachlin, S. Shoulder physiotherapy exercise recognition: Machine learning the inertial signals from a smartwatch. Physiol. Meas. 2018, 39, 075007. [Google Scholar] [CrossRef] [Green Version]
- Vakanski, A.; Ferguson, J.M.; Lee, S. Mathematical Modeling and Evaluation of Human Motions in Physical Therapy Using Mixture Density Neural Networks. J. Physiother. Phys. Rehabil. 2016, 1, 118. [Google Scholar]
- Han, J.; Shao, L.; Xu, D.; Shotton, J. Enhanced Computer Vision with Microsoft Kinect Sensor: A Review. IEEE Trans. Cybern. 2013, 43, 1318–1334. [Google Scholar] [CrossRef] [PubMed]
- Dolatabadi, E.; Taati, B.; Mihailidis, A. An Automated Classification of Pathological Gait Using Unobtrusive Sensing Technology. IEEE Trans. Neural Syst. Rehabil. Eng. 2017, 25, 2336–2346. [Google Scholar] [CrossRef] [PubMed]
- Almaslukh, B.; Artoli, A.M.; Al-Muhtadi, J. A Robust Deep Learning Approach for Position-Independent Smartphone-Based Human Activity Recognition. Sensors 2018, 18, 3726. [Google Scholar] [CrossRef] [Green Version]
- Kwapisz, J.R.; Weiss, G.M.; Moore, S.A. Activity recognition using cell phone accelerometers. ACM SIGKDD Explor. Newsl. 2011, 12, 74–82. [Google Scholar] [CrossRef]
- Shen, S.; Wang, H.; Choudhury, R.R. I am a Smartwatch and I can Track my User’s Arm. In Proceedings of the 14th Annual International Conference on Mobile Systems, Applications, and Services, Singapore, 25–30 June 2016; pp. 85–96. [Google Scholar]
- Schölkopf, B.; Platt, J.C.; Shawe-Taylor, J.C.; Smola, A.J.; Williamson, R.C. Estimating the Support of a High-Dimensional Distribution. Neural Comput. 2001, 13, 1443–1471. [Google Scholar] [CrossRef] [PubMed]
- Mourão-Miranda, J.; Hardoon, D.R.; Hahn, T.; Marquand, A.F.; Williams, S.C.; Shawe-Taylor, J.; Brammer, M. Patient classification as an outlier detection problem: An application of the One-Class Support Vector Machine. NeuroImage 2011, 58, 793–804. [Google Scholar] [CrossRef] [Green Version]
- Dudani, S.A. The Distance-Weighted k-Nearest-Neighbor Rule. IEEE Trans. Syst. Man Cybern. 1976, 6, 325–327. [Google Scholar] [CrossRef]
- Chawla, S.; Gionis, A. k-means–: A unified approach to clustering and outlier detection. In Proceedings of the 2013 SIAM International Conference on Data Mining, Austin, TX, USA, 2–4 May 2013; pp. 189–197. [Google Scholar]
- Hendrycks, D.; Gimpel, K. A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networks. In Proceedings of the International Conference on Learning Representations, Toulon, France, 24–26 April 2017. [Google Scholar]
- Pereyra, G.; Tucker, G.; Chorowski, J.; Kaiser, Ł.; Hinton, G. Regularizing Neural Networks by Penalizing Confident Output Distributions. In Proceedings of the International Conference on Learning Representations, Toulon, France, 24–26 April 2017. [Google Scholar]
- Liang, S.; Li, Y.; Srikant, R. Enhancing the Reliability of Out-of-distribution Image Detection in Neural Networks. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Bendale, A.; Boult, T.E. Towards Open Set Deep Networks. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 1563–1572. [Google Scholar] [CrossRef] [Green Version]
- Banos, O.; Garcia, R.; Holgado-Terriza, J.A.; Damas, M.; Pomares, H.; Rojas, I.; Saez, A.; Villalonga, C. mHealthDroid: A Novel Framework for Agile Development of Mobile Health Applications. In Ambient Assisted Living and Daily Activities; Springer: Berlin/Heidelberg, Germany, 2014; pp. 91–98. [Google Scholar]
- Ronao, C.A.; Cho, S.-B. Human activity recognition with smartphone sensors using deep learning neural networks. Expert Syst. Appl. 2016, 59, 235–244. [Google Scholar] [CrossRef]
- Köping, L.; Shirahama, K.; Grzegorzek, M. A general framework for sensor-based human activity recognition. Comput. Biol. Med. 2018, 95, 248–260. [Google Scholar] [CrossRef] [PubMed]
- Hassan, M.M.; Huda, S.; Uddin, Z.; Almogren, A.; Alrubaian, M.A. Human Activity Recognition from Body Sensor Data using Deep Learning. J. Med. Syst. 2018, 42, 99. [Google Scholar] [CrossRef] [PubMed]
- Wang, Y.; Cang, S.; Yu, H. A survey on wearable sensor modality centred human activity recognition in health care. Expert Syst. Appl. 2019, 137, 167–190. [Google Scholar] [CrossRef]
- Kluge, F.; Gaßner, H.; Hannink, J.; Pasluosta, C.; Klucken, J.; Eskofier, B.M. Towards Mobile Gait Analysis: Concurrent Validity and Test-Retest Reliability of an Inertial Measurement System for the Assessment of Spatio-Temporal Gait Parameters. Sensors 2017, 17, 1522. [Google Scholar] [CrossRef] [PubMed]
- Qiu, S.; Liu, L.; Zhao, H.; Wang, Z.; Jiang, Y. MEMS Inertial Sensors Based Gait Analysis for Rehabilitation Assessment via Multi-Sensor Fusion. Micromachines 2018, 9, 442. [Google Scholar] [CrossRef] [Green Version]
- Tedesco, S.; Barton, J.; O’Flynn, B. A Review of Activity Trackers for Senior Citizens: Research Perspectives, Commercial Landscape and the Role of the Insurance Industry. Sensors 2017, 17, 1277. [Google Scholar] [CrossRef] [Green Version]
- Godfrey, A. Wearables for independent living in older adults: Gait and falls. Maturitas 2017, 100, 16–26. [Google Scholar] [CrossRef] [Green Version]
- Liao, Y.; Vakanski, A.; Xian, M.; Paul, D.; Baker, R. A review of computational approaches for evaluation of rehabilitation exercises. Comput. Biol. Med. 2020, 119, 103687. [Google Scholar] [CrossRef] [Green Version]
- Houmanfar, R.; Karg, M.; Kulic, D. Movement Analysis of Rehabilitation Exercises: Distance Metrics for Measuring Patient Progress. IEEE Syst. J. 2014, 10, 1014–1025. [Google Scholar] [CrossRef]
- Liao, Y.; Vakanski, A.; Xian, M. A Deep Learning Framework for Assessing Physical Rehabilitation Exercises. IEEE Trans. Neural Syst. Rehabil. Eng. 2020, 28, 468–477. [Google Scholar] [CrossRef] [PubMed]
- Geng, C.; Huang, S.-J.; Chen, S. Recent Advances in Open Set Recognition: A Survey. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 1, 1. [Google Scholar] [CrossRef] [PubMed] [Green Version]
- Pimentel, M.A.; Clifton, D.A.; Clifton, L.; Tarassenko, L. A review of novelty detection. Signal Process. 2014, 99, 215–249. [Google Scholar] [CrossRef]
- Li, D.; Chen, D.; Goh, J.; Ng, S. Anomaly Detection with Generative Adversarial Networks for Multivariate Time Series. arXiv 2019, arXiv:1809.04758. [Google Scholar]
- Munoz-Organero, M. Outlier Detection in Wearable Sensor Data for Human Activity Recognition (HAR) Based on DRNNs. IEEE Access 2019, 7, 74422–74436. [Google Scholar] [CrossRef]
- Meng, C.; Jiang, X.S.; Wei, X.M.; Wei, T. A Time Convolutional Network Based Outlier Detection for Multidimensional Time Series in Cyber-Physical-Social Systems. IEEE Access 2020, 8, 74933–74942. [Google Scholar] [CrossRef]
- Lu, H.; Liu, Y.; Fei, Z.; Guan, C. An Outlier Detection Algorithm Based on Cross-Correlation Analysis for Time Series Dataset. IEEE Access 2018, 6, 53593–53610. [Google Scholar] [CrossRef]
- Lin, S.; Clark, R.; Birke, R.; Schonborn, S.; Trigoni, N.; Roberts, S. Anomaly Detection for Time Series Using VAE-LSTM Hybrid Model. In Proceedings of the ICASSP 2020—2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain, 4–8 May 2020; pp. 4322–4326. [Google Scholar]
- Laptev, N.; Amizadeh, S.; Flint, I. Generic and Scalable Framework for Automated Time-series Anomaly Detection. In Proceedings of the 21st ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, Sydney, Australia, 10–13 August 2015; pp. 1939–1947. [Google Scholar]
- Scheirer, W.J.; Rocha, A.D.R.; Sapkota, A.; Boult, T.E. Toward Open Set Recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2013, 35, 1757–1772. [Google Scholar] [CrossRef]
- Bendale, A.; Boult, T. Towards Open World Recognition. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 1893–1902. [Google Scholar]
- Scheirer, W.J.; Jain, L.P.; Boult, T.E. Probability Models for Open Set Recognition. IEEE Trans. Pattern Anal. Mach. Intell. 2014, 36, 2317–2324. [Google Scholar] [CrossRef] [Green Version]
- Erfani, S.M.; Rajasegarar, S.; Karunasekera, S.; Leckie, C. High-dimensional and large-scale anomaly detection using a linear one-class SVM with deep learning. Pattern Recognit. 2016, 58, 121–134. [Google Scholar] [CrossRef]
- Yang, K.; Ahn, C.R.; Vuran, M.C.; Aria, S.S. Semi-supervised near-miss fall detection for ironworkers with a wearable inertial measurement unit. Autom. Constr. 2016, 68, 194–202. [Google Scholar] [CrossRef] [Green Version]
- Ryu, S.; Koo, S.; Yu, H.; Lee, G.G. Out-of-domain Detection based on Generative Adversarial Network. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 31 October–4 November 2018; pp. 714–718. [Google Scholar]
- Ge, Z.; Demyanov, S.; Garnavi, R. Generative OpenMax for Multi-Class Open Set Classification. In Proceedings of the British Machine Vision Conference, London, UK, 4–7 September 2017. [Google Scholar] [CrossRef] [Green Version]
- Neal, L.; Olson, M.; Fern, X.; Wong, W.-K.; Li, F. Open Set Learning with Counterfactual Images. In Proceedings of the European Conference on Computer Vision—ECCV, Munich, Germany, 8–14 September 2018; pp. 620–635. [Google Scholar]
- Jo, I.; Kim, J.; Kang, H.; Kim, Y.-D.; Choi, S. Open Set Recognition by Regularising Classifier with Fake Data Generated by Generative Adversarial Networks. In Proceedings of the 2018 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Calgary, AB, Canada, 15–20 April 2018; pp. 2686–2690. [Google Scholar]
- Lee, K.; Lee, H.; Lee, K.; Shin, J. Training Confidence-calibrated Classifiers for Detecting Out-of-Distribution Samples. In Proceedings of the International Conference on Learning Representations, Vancouver, BC, Canada, 30 April–3 May 2018. [Google Scholar]
- Denouden, T.; Salay, R.; Czarnecki, K.; Abdelzad, V.; Phan, B.; Vernekar, S. Improving Reconstruction Autoencoder Out-of-distribution Detection with Mahalanobis Distance. arXiv 2018, arXiv:1812.02765. [Google Scholar]
- Xia, Y.; Cao, X.; Wen, F.; Hua, G.; Sun, J. Learning Discriminative Reconstructions for Unsupervised Outlier Removal. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; pp. 1511–1519. [Google Scholar]
- Oza, P.; Patel, V.M. C2AE: Class Conditioned Auto-Encoder for Open-Set Recognition. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 16–20 June 2019; pp. 2302–2311. [Google Scholar] [CrossRef] [Green Version]
- Yoshihashi, R.; Shao, W.; Kawakami, R.; You, S.; Iida, M.; Naemura, T. Classification-Reconstruction Learning for Open-Set Recognition. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 16–20 June 2019; pp. 4011–4020. [Google Scholar]
- Aytekin, C.; Ni, X.; Cricri, F.; Aksu, E. Clustering and Unsupervised Anomaly Detection with L2 Normalized Deep Auto-Encoder Representations. In Proceedings of the International Joint Conference on Neural Networks, Rio, Brazil, 8–13 July 2018. [Google Scholar]
- Guo, C.; Pleiss, G.; Sun, Y.; Weinberger, K.Q. On Calibration of Modern Neural Networks. In Proceedings of the International Conference on Machine Learning, Sydney, Australia, 6–11 August 2017. [Google Scholar]
- Omae, Y.; Mori, M.; Akiduki, T.; Takahashi, H. A Novel Deep Learning Optimization Algorithm for Human Motions Anomaly Detection. Int. J. Innov. Comput. Inf. Control 2019, 15, 199–208. [Google Scholar]
- Goodfellow, I. NIPS 2016 Tutorial: Generative Adversarial Networks. In Proceedings of the Conference on Neural Information Processing Systems (NIPS), Barcelona, Spain, 5–10 December 2016. [Google Scholar]
- Yang, Y.; Hou, C.; Lang, Y.; Guan, D.; Huang, D.; Xu, J. Open-set human activity recognition based on micro-Doppler signatures. Pattern Recognit. 2019, 85, 60–69. [Google Scholar] [CrossRef]
- Vernekar, S.; Gaurav, A.; Denouden, T.; Phan, B.; Abdelzad, V.; Salay, R.; Czarnecki, K. Analysis of Confident-Classifiers for Out-of-distribution Detection. In Proceedings of the 7th International Conference on Learning Representations–ICLR, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
- Schlegl, T.; Seeböck, P.; Waldstein, S.M.; Langs, G.; Schmidt-Erfurth, U. f-AnoGAN: Fast unsupervised anomaly detection with generative adversarial networks. Med. Image Anal. 2019, 54, 30–44. [Google Scholar] [CrossRef]
- Ren, J.; Liu, P.J.; Fertig, E.; Snoek, J.; Poplin, R.; DePristo, M.A.; Dillon, J.V.; Lakshminarayanan, B. Likelihood Ratios for Out-of-Distribution Detection. arXiv 2019, arXiv:1906.02845. [Google Scholar]
- Nguyen, A.; Yosinski, J.; Clune, J. Deep Neural Networks are Easily Fooled: High Confidence Predictions for Unrecognizable Images. In Proceedings of the 28th IEEE Conference on Computer Vision and Pattern Recognition, Boston, MA, USA, 7–12 June 2015. [Google Scholar]
- Burns, D.M.; Whyne, C.M. Seglearn: A Python Package for Learning Sequences and Time Series. J. Mach. Learn. Res. 2018, 19, 1–7. [Google Scholar]
- Li, D.; Chen, D.; Jin, B.; Shi, L.; Goh, J.; Ng, S.-K. MAD-GAN: Multivariate Anomaly Detection for Time Series Data with Generative Adversarial Networks. arXiv 2019, arXiv:1901.04997. [Google Scholar]
- Karpathy, A.; Johnson, J.; Fei-Fei, L. Visualizing and Understanding Recurrent Networks. arXiv 2015, arXiv:1506.02078. [Google Scholar]
- Wang, Z.; Yan, W.; Oates, T. Time series classification from scratch with deep neural networks: A strong baseline. In Proceedings of the 2017 International Joint Conference on Neural Networks (IJCNN), Anchorage, AK, USA, 14–19 May 2017; pp. 1578–1585. [Google Scholar]
- Burns, D.M.; Whyne, C.M. Personalized Activity Recognition with Deep Triplet Embeddings. arXiv 2020, arXiv:2001.05517. [Google Scholar]
- Lima, W.S.; Bragança, H.L.; Souto, E.J. NOHAR—NOvelty discrete data stream for Human Activity Recognition based on smartphones with inertial sensors. Expert Syst. Appl. 2021, 166, 114093. [Google Scholar] [CrossRef]
- Shoaib, M.; Bosch, S.; Incel, O.D.; Scholten, J.; Havinga, P.J.M. Complex Human Activity Recognition Using Smartphone and Wrist-Worn Motion Sensors. Sensors 2016, 16, 426. [Google Scholar] [CrossRef]
- Shahmohammadi, F.; Hosseini, A.; King, C.E.; Sarrafzadeh, M. Smartwatch Based Activity Recognition Using Active Learning. In Proceedings of the 2017 IEEE/ACM International Conference on Connected Health: Applications, Systems and Engineering Technologies (CHASE), Philadelphia, PA, USA, 17–19 July 2017; pp. 321–329. [Google Scholar]
- Shoeibi, A.; Ghassemi, N.; Alizadehsani, R.; Rouhani, M.; Hosseini-Nejad, H.; Khosravi, A.; Panahiazar, M.; Nahavandi, S. A comprehensive comparison of handcrafted features and convolutional autoencoders for epileptic seizures detection in EEG signals. Expert Syst. Appl. 2021, 163, 113788. [Google Scholar] [CrossRef]
- Wang, H.; Zhang, Q.; Wu, J.; Pan, S.; Chen, Y. Time series feature learning with labeled and unlabeled data. Pattern Recognit. 2019, 89, 55–66. [Google Scholar] [CrossRef]
- Li, F.; Shirahama, K.; Nisar, M.A.; Köping, L.; Grzegorzek, M. Comparison of Feature Learning Methods for Human Activity Recognition Using Wearable Sensors. Sensors 2018, 18, 679. [Google Scholar] [CrossRef] [Green Version]
- Reiss, A.; Stricker, D. Introducing a New Benchmarked Dataset for Activity Monitoring. In Proceedings of the 16th International Symposium on Wearable Computers, Seattle, WA, USA, 7–10 October 2012; pp. 108–109. [Google Scholar] [CrossRef]
- Weiss, G.M.; Yoneda, K.; Hayajneh, T. Smartphone and Smartwatch-Based Biometrics Using Activities of Daily Living. IEEE Access 2019, 7, 133190–133202. [Google Scholar] [CrossRef]
- Fida, B.; Bernabucci, I.; Bibbo, D.; Conforto, S.; Schmid, M. Varying behavior of different window sizes on the classification of static and dynamic physical activities from a single accelerometer. Med. Eng. Phys. 2015, 37, 705–711. [Google Scholar] [CrossRef] [PubMed]
- Noor, M.H.M.; Salcic, Z.; Wang, K.I.-K. Adaptive sliding window segmentation for physical activity recognition using a single tri-axial accelerometer. Pervasive Mob. Comput. 2017, 38, 41–59. [Google Scholar] [CrossRef]
- Ma, C.; Li, W.; Cao, J.; Du, J.; Li, Q.; Gravina, R. Adaptive sliding window based activity recognition for assisted livings. Inf. Fusion 2020, 53, 55–65. [Google Scholar] [CrossRef]
- Akbari, A.; Wu, J.; Grimsley, R.; Jafari, R. Hierarchical Signal Segmentation and Classification for Accurate Activity Recognition. In Proceedings of the 2018 ACM International Joint Conference and 2018 International Symposium on Pervasive and Ubiquitous Computing and Wearable Computers, Singapore, 8–12 October 2018; pp. 1596–1605. [Google Scholar]
- Krizhevsky, A.; Sutskever, I.; Hinton, G.E. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems; MIT Press: Cambridge, MA, USA, 2012; pp. 1097–1105. [Google Scholar]
- Hassen, M.; Chan, P.K. Learning a Neural-network-based Representation for Open Set Recognition. arXiv 2018, arXiv:1802.04365. [Google Scholar]
- Pidhorskyi, S.; Almohsen, R.; Doretto, G. Generative Probabilistic Novelty Detection with Adversarial Autoencoders. Adv. Neural Inf. Process. Syst. 2018, 31, 6822–6833. [Google Scholar]
Dataset | Ns | Ne | Type | Sensors | fz [Hz] | Time [h] |
---|---|---|---|---|---|---|
SPARS | 20 | 7 | Shoulder Physiotherapy | Wrist 6-axis IMU | 50 | 3.4 |
SPARS9x a | 20 | 6 | Shoulder Physiotherapy | Wrist 9-axis IMU | 50 | 95.4 |
MHealth b | 10 | 12 | General Fitness | Wrist 9-axis IMU | 50 | 1.9 |
Accuracy % (Confidence Interval) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MHEALTH Segment Length | SPARS Segment Length | SPARS9x Segment Length | |||||||||||||
Method | 2.0s | 4.0s | 6. 0s | 8.0s | 10.0s | 2.0s | 4.0s | 6. 0s | 8.0s | 10.0s | 2.0s | 4.0s | 6. 0s | 8.0s | 10.0s |
KNN | 88.0 (3.0) | 87.7 (2.3) | 86.5 (2.2) | 87.7 (2.4) | 87.1 (1.5) | 81.0 (1.7) | 82.3 (2.6) | 82.9 (0.83) | 81.4 (2.8) | 82.2 (1.8) | 96.4 (0.67) | 97.6 (0.78) | 97.8 (0.71) | 97.7 (0.80) | 97.7 (0.77) |
KNN (CRNN Deep Features) | 95.2 (1.4) | 94.1 (2.3) | 94.8 (1.3) | 96.0 (1.1) | 92.7 (1.4) | 87.7 (0.86) | 67.5 (4.7) | 81.2 (1.0) | 78.7 (1.7) | 75.6 (1.2) | 97.6 (0.41) | 96.6 (0.76) | 96.8 (0.92) | 95.5 (0.57) | 94.8 (0.61) |
KNN (FCN Deep Features) | 93.1 (0.8) | 93.7 (2.3) | 93.3 (1.7) | 92.8 (1.7) | 93.1 (1.8) | 89.9 (0.98) | 92.5 (1.2) | 92.2 (1.1) | 93.1 (1.4) | 92.1 (1.5) | 98.9 (0.19) | 99.8 (0.12) | 99.7 (0.14) | 99.9 (0.066) | 99.4 (0.43) |
CRNN | 94.8 (1.3) | 93.8 (2.3) | 94.6 (1.4) | 95.9 (1.2) | 90.0 (2.2) | 87.6 (0.87) | 67.4 (5.1) | 80.8 (1.3) | 76.2 (1.7) | 72.9 (0.76) | 97.7 (0.46) | 96.6 (0.76) | 96.7 (0.94) | 95.4 (0.53) | 94.7 (0.64) |
FCN | 94.2 (1.6) | 94.8 (1.6) | 93.0 (0.79) | 93.5 (1.4) | 95.3 (1.3) | 87.9 (1.4) | 86.4 (1.6) | 87.1 (1.6) | 87.9 (1.2) | 88.0 (2.4) | 98.5 (0.38) | 99.7 (0.19) | 99.6 (0.20) | 99.9 (0.066) | 98.1 (1.7) |
AUROC (Confidence Interval) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MHEALTH Segment Length | SPARS Segment Length | SPARS9x Segment Length | |||||||||||||
Method | 2.0s | 4.0s | 6. 0s | 8.0s | 10.0s | 2.0s | 4.0s | 6. 0s | 8.0s | 10.0s | 2.0s | 4.0s | 6. 0s | 8.0s | 10.0s |
Traditional Methods – Engineered Statistical Features | |||||||||||||||
KNN | 0.903 (0.026) | 0.902 (0.019) | 0.905 (0.018) | 0.904 (0.017) | 0.898 (0.014) | 0.865 (0.027) | 0.912 (0.021) | 0.920 (0.019) | 0.927 (0.018) | 0.934 (0.017) | 0.918 (0.0028) | 0.963 (0.0033) | 0.975 (0.0029) | 0.980 (0.0019) | 0.982 (0.0021) |
Kmeans | 0.881 (0.020) | 0.887 (0.015) | 0.886 (0.010) | 0.884 (0.014) | 0.878 (0.0064) | 0.842 (0.021) | 0.892 (0.024) | 0.903 (0.019) | 0.913 (0.018) | 0.917 (0.017) | 0.872 (0.011) | 0.937 (0.0059) | 0.955 (0.0046) | 0.964 (0.0043) | 0.969 (0.0042) |
OCSVM | 0.796 (0.019) | 0.796 (0.027) | 0.784 (0.022) | 0.776 (0.023) | 0.759 (0.015) | 0.802 (0.027) | 0.863 (0.029) | 0.871 (0.028) | 0.883 (0.027) | 0.887 (0.027) | 0.804 (0.017) | 0.896 (0.010) | 0.927 (0.0080) | 0.940 (0.00079) | 0.949 (0.0074) |
KNN – Deep Feature Embedding | |||||||||||||||
CRNN Features | 0.852 (0.017) | 0.839 (0.024) | 0.791 (0.055) | 0.839 (0.031) | 0.837 (0.047) | 0.903 (0.023) | 0.858 (0.020) | 0.859 (0.029) | 0.829 (0.052) | 0.877 (0.029) | 0.754 (0.017) | 0.819 (0.0074) | 0.794 (0.011) | 0.788 (0.0053) | 0.774 (0.020) |
FCN Features | 0.854 (0.023) | 0.883 (0.024) | 0.874 (0.014) | 0.877 (0.017) | 0.891 (0.028) | 0.969 (0.0080) | 0.976 (0.0073) | 0.971 (0.0064) | 0.974 (0.0082) | 0.978 (0.0058) | 0.921 (0.011) | 0.960 (0.0053) | 0.967 (0.0076) | 0.965 (0.0062) | 0.965 (0.0060) |
CRNN Core Model | |||||||||||||||
Softmax Threshold | 0.611 (0.048) | 0.609 (0.047) | 0.553 (0.057) | 0.656 (0.038) | 0.578 (0.068) | 0.777 (0.036) | 0.819 (0.014) | 0.840 (0.020) | 0.788 (0.026) | 0.839 (0.024) | 0.700 (0.016) | 0.718 (0.013) | 0.680 (0.014) | 0.669 (0.025) | 0.634 (0.031) |
Entropy Regularization | 0.736 (0.015) | 0.731 (0.032) | 0.680 (0.064) | 0.705 (0.035) | 0.644 (0.067) | 0.911 (0.0080) | 0.917 (0.0091) | 0.928 (0.012) | 0.903 (0.019) | 0.930 (0.0087) | 0.691 (0.021) | 0.689 (0.024) | 0.708 (0.015) | 0.690 (0.023) | 0.636 (0.039) |
ODIN | 0.633 (0.036) | 0.664 (0.050) | 0.597 (0.060) | 0.546 (0.082) | 0.512 (0.036) | 0.860 (0.0086) | 0.860 (0.020) | 0.846 (0.029) | 0.855 (0.010) | 0.815 (0.032) | 0.692 (0.017) | 0.698 (0.017) | 0.636 (0.037) | 0.668 (0.029) | 0.595 (0.030) |
OpenMax | 0.661 (0.050) | 0.614 (0.076) | 0.693 (0.053) | 0.707 (0.055) | 0.589 (0.059) | 0.840 (0.034) | 0.863 (0.0036) | 0.873 (0.024) | 0.851 (0.037) | 0.838 (0.036) | 0.776 (0.019) | 0.694 (0.058) | 0.689 (0.035) | 0.682 (0.066) | 0.758 (0.036) |
FCN Core Model | |||||||||||||||
Softmax Threshold | 0.731 (0.016) | 0.622 (0.039) | 0.680 (0.055) | 0.600 (0.031) | 0.597 (0.017) | 0.779 (0.024) | 0.812 (0.018) | 0.783 (0.042) | 0.799 (0.034) | 0.795 (0.034) | 0.756 (0.014) | 0.752 (0.012) | 0.759 (0.017) | 0.764 (0.0082) | 0.771 (0.0058) |
Entropy Regularization | 0.752 (0.018) | 0.637 (0.039) | 0.666 (0.062) | 0.610 (0.039) | 0.672 (0.023) | 0.792 (0.027) | 0.815 (0.024) | 0.791 (0.037) | 0.781 (0.037) | 0.807 (0.034) | 0.747 (0.015) | 0.752 (0.011) | 0.762 (0.021) | 0.743 (0.017) | 0.772 (0.014) |
ODIN | 0.699 (0.022) | 0.601 (0.030) | 0.649 (0.026) | 0.645 (0.035) | 0.673 (0.046) | 0.820 (0.022) | 0.816 (0.023) | 0.826 (0.031) | 0.849 (0.020) | 0.821 (0.016) | 0.743 (0.017) | 0.752 (0.012) | 0.747 (0.025) | 0.735 (0.020) | 0.749 (0.0095) |
OpenMax | 0.794 (0.036) | 0.645 (0.043) | 0.734 (0.054) | 0.714 (0.069) | 0.708 (0.014) | 0.845 (0.021) | 0.856 (0.013) | 0.855 (0.017) | 0.875 (0.021) | 0.850 (0.030) | 0.910 (0.011) | 0.897 (0.020) | 0.916 (0.011) | 0.915 (0.020) | 0.922 (0.019) |
Method | Prediction Time (s) | ||
---|---|---|---|
MHEALTH | SPAR | SPARS9x | |
Traditional Methods—Engineered Statistical Features | |||
KNN | 0.66 (0.002) | 0.37 (0.005) | 2.47 (0.03) |
Kmeans | 0.47 (0.001) | 0.32 (0.007) | 1.46 (0.02) |
OCSVM | 0.52 (0.002) | 0.35 (0.005) | 2.11 (0.03) |
KNN—Deep Feature Embedding | |||
CRNN Features | 0.10 (0.0008) | 0.15 (0.006) | 0.93 (0.05) |
FCN Features | 0.16 (0.0009) | 0.30 (0.01) | 2.00 (0.03) |
CRNN Core Model | |||
Softmax Threshold | 0.066 (0.002) | 0.082 (0.004) | 0.41 (0.005) |
Entropy Regularization | 0.059 (0.0003) | 0.084 (0.004) | 0.41 (0.005) |
ODIN | 0.22 (0.0003) | 0.34 (0.02) | 1.66 (0.02) |
OpenMax | 3.39 (0.08) | 0.93 (0.02) | 5.41 (0.06) |
FCN Core Model | |||
Softmax Threshold | 0.099 (0.0004) | 0.22 (0.007) | 1.09 (0.01) |
Entropy Regularization | 0.14 (0.0008) | 0.21 (0.003) | 0.84 (0.03) |
ODIN | 0.43 (0.001) | 0.69 (0.002) | 3.16 (0.10) |
OpenMax | 3.64 (0.09) | 1.04 (0.02) | 6.04 (0.06) |
Model | Training Time (s) | ||
---|---|---|---|
MHEALTH | SPAR | SPARS9x | |
KNN | 3.08 (0.009) | 4.69 (0.02) | 5.58 (0.02) |
Kmeans | 1.98 (0.06) | 3.03 (0.03) | 3.50 (0.07) |
OCSVM | 2.43 (0.06) | 4.40 (0.03) | 5.74 (0.05) |
CRNN core | 81.2 (0.05) | 124 (0.7) | 144 (1.0) |
FCN core | 164 (6.0) | 261 (7.4) | 317 (1.0) |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2021 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
Boyer, P.; Burns, D.; Whyne, C. Out-of-Distribution Detection of Human Activity Recognition with Smartwatch Inertial Sensors. Sensors 2021, 21, 1669. https://doi.org/10.3390/s21051669
Boyer P, Burns D, Whyne C. Out-of-Distribution Detection of Human Activity Recognition with Smartwatch Inertial Sensors. Sensors. 2021; 21(5):1669. https://doi.org/10.3390/s21051669
Chicago/Turabian StyleBoyer, Philip, David Burns, and Cari Whyne. 2021. "Out-of-Distribution Detection of Human Activity Recognition with Smartwatch Inertial Sensors" Sensors 21, no. 5: 1669. https://doi.org/10.3390/s21051669
APA StyleBoyer, P., Burns, D., & Whyne, C. (2021). Out-of-Distribution Detection of Human Activity Recognition with Smartwatch Inertial Sensors. Sensors, 21(5), 1669. https://doi.org/10.3390/s21051669