Experimental Study of Long Short-Term Memory and Transformer Models for Fall Detection on Smartwatches
Abstract
1. Introduction
- Evaluate the offline trained best variant of Transformer and LSTM models in real-time on a fall detection application (SmartFall) running on a commodity-based smartwatch running on WearOS.
- Demonstrate that though CNN-LSTM performs better with an F1-Score of 86.7% in offline evaluation, the basic Transformer that has an offline F1-Score of only 82.6% can maintain better performance in real-time testing, making it a more suitable and dependable model for real-world deployment.
- Demonstrate that both variants of Transformers and LSTMs perform better as the size of the dataset increases.
- Demonstrate that the Transformer can maintain better Recall and generate fewer False Positives in real-time testing. This can be ascribed to its sophisticated capacity or self-attention to recognize and comprehend the underlying patterns in the data.
2. Related Work
3. Architecture of Models
3.1. LSTM
3.2. Transformer
4. Methodology
4.1. Dataset
4.2. Input Data Processing
| Algorithm 1 Sliding window algorithm |
|
5. The Computational Model
5.1. Hyperparameters
5.2. Training and Evaluation
5.3. Evaluation Metric
5.4. Model Evaluation Method
6. Results
6.1. Results of Traditional Offline Model Evaluation
6.2. Results of Real-Time Evaluation
7. Conclusions
8. Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Falls. World Health Organization. Available online: www.who.int/news-room/fact-sheets/detail/falls (accessed on 13 June 2023).
- Tacconi, C.; Mellone, S.; Chiari, L. Smartphone-based applications for investigating falls and mobility. In Proceedings of the 2011 5th International Conference on Pervasive Computing Technologies for Healthcare (PervasiveHealth) and Workshops, Dublin, Ireland, 23–26 May 2011; pp. 258–261. [Google Scholar] [CrossRef]
- Chen, L.; Li, R.; Zhang, H.; Tian, L.; Chen, N. Intelligent fall detection method based on accelerometer data from a wrist-worn smart watch. Measurement 2019, 140, 215–226. [Google Scholar] [CrossRef]
- Medical Life Alert Systems. Available online: http://www.lifealert.com (accessed on 13 June 2023).
- Mobilehelp Smart. Available online: https://www.mobilehelp.com/pages/smart (accessed on 18 November 2019).
- Mauldin, T.R.; Ngu, A.H.; Metsis, V.; Canby, M.E. Ensemble Deep Learning on Wearables Using Small Datasets. ACM Trans. Comput. Healthc. 2021, 2, 1–30. [Google Scholar] [CrossRef]
- Mauldin, T.R.; Canby, M.E.; Metsis, V.; Ngu, A.H.; Rivera, C.C. SmartFall: A Smartwatch-Based Fall Detection System Using Deep Learning. Sensors 2018, 18, 3363. [Google Scholar] [CrossRef] [PubMed]
- Ngu, A.H.; Metsis, V.; Coyne, S.; Srinivas, P.; Mahmud, T.; Chee, K.H. Personalized Watch-Based Fall Detection Using a Collaborative Edge-Cloud Framework. Int. J. Neural Syst. 2022, 32, 2250048. [Google Scholar] [CrossRef]
- Guan, Y.; Plötz, T. Ensembles of Deep LSTM Learners for Activity Recognition Using Wearables. Proc. ACM Interact. Mob. Wearable Ubiquitous Technol. 2017, 1, 11:1–11:28. [Google Scholar] [CrossRef]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, Ł.; Polosukhin, I. Attention is all you need. In Proceedings of the NIPS, Long Beach, CA, USA, 4–9 December 2017. [Google Scholar]
- Nahian, M.J.A.; Raju, M.H.; Tasnim, Z.; Mahmud, M.; Ahad, M.A.R.; Kaiser, M.S. Contactless fall detection for the elderly. In Contactless Human Activity Analysis; Springer: Cham, Switzerland, 2021; pp. 203–235. [Google Scholar]
- Habib, M.A.; Mohktar, M.S.; Kamaruzzaman, S.B.; Lim, K.S.; Pin, T.M.; Ibrahim, F. Smartphone-based solutions for fall detection and prevention: Challenges and open issues. Sensors 2014, 14, 7181–7208. [Google Scholar] [CrossRef] [PubMed]
- Liu, S.H.; Cheng, W.C. Fall Detection with the Support Vector Machine during Scripted and Continuous Unscripted Activities. Sensors 2012, 12, 12301. [Google Scholar] [CrossRef]
- Theodoridis, T.; Solachidis, V.; Vretos, N.; Daras, P. Human fall detection from acceleration measurements using a Recurrent Neural Network. In Precision Medicine Powered by pHealth and Connected Health; Springer: Berlin/Heidelberg, Germany, 2018; pp. 145–149. [Google Scholar]
- Kwolek, B.; Kepski, M. Human fall detection on embedded platform using depth maps and wireless accelerometer. Comput. Methods Programs Biomed. 2014, 117, 489–501. [Google Scholar] [CrossRef]
- Musci, M.; De Martini, D.; Blago, N.; Facchinetti, T.; Piastra, M. Online Fall Detection using Recurrent Neural Networks. arXiv 2018, arXiv:1804.04976. [Google Scholar]
- Sucerquia, A.; López, J.D.; Vargas-Bonilla, J.F. SisFall: A fall and movement dataset. Sensors 2017, 17, 198. [Google Scholar] [CrossRef]
- Khojasteh, S.B.; Villar, J.R.; Chira, C.; González, V.M.; de la Cal, E. Improving Fall Detection Using an On-Wrist Wearable Accelerometer. Sensors 2018, 18, 1350. [Google Scholar] [CrossRef]
- Fall Data Collected Using Microsoft Band Smartwatch. Available online: http://www.cs.txstate.edu/~hn12/data/SmartFallDataSet (accessed on 18 April 2019).
- Yu, X.; Qiu, H.; Xiong, S. A Novel Hybrid Deep Neural Network to Predict Pre-impact Fall for Older People Based on Wearable Inertial Sensors. Front. Bioeng. Biotechnol. 2020, 8, 63. [Google Scholar] [CrossRef] [PubMed]
- Ordóñez, F.J.; Roggen, D. Deep Convolutional and LSTM Recurrent Neural Networks for Multimodal Wearable Activity Recognition. Sensors 2016, 16, 115. [Google Scholar] [CrossRef] [PubMed]
- Mohammed Sharook, K.; Premkumar, A.; Aishwaryaa, R.; Amrutha, J.M.; Deepthi, L.R. Fall Detection Using Transformer Model. In ICT Infrastructure and Computing: Proceedings of ICT4SD 2022; Springer Nature: Singapore, 2022; pp. 29–37. [Google Scholar]
- Fall Detection Using a Transformer. Available online: https://www.edgeimpulse.com/blog/save-yourself-a-trip-fall-detect-using-a-transformer-model (accessed on 14 August 2023).
- Wang, S.; Wu, J. Patch-Transformer Network: A Wearable-Sensor-Based Fall Detection Method. Sensors 2023, 23, 6360. [Google Scholar] [CrossRef] [PubMed]
- Katrompas, A.; Ntakouris, T.; Metsis, V. Recurrence and self-attention vs the transformer for time-series classification: A comparative study. In Proceedings of the International Conference on Artificial Intelligence in Medicine, Halifax, NS, Canada, 14–17 June 2022; pp. 99–109. [Google Scholar]
- Chaudhuri, S.; Thompson, H.; Demiris, G. Fall Detection Devices and their use with Older Adults: A Systematic Review. J. Geriatr. Phys. Ther. 2014, 37, 178–196. [Google Scholar] [CrossRef] [PubMed]
- Gulati, A.; Qin, J.; Chiu, C.C.; Parmar, N.; Zhang, Y.; Yu, J.; Han, W.; Wang, S.; Zhang, Z.; Wu, Y.; et al. Conformer: Convolution-augmented Transformer for Speech Recognition. arXiv 2020, arXiv:2005.08100. [Google Scholar]
- Maray, N.; Ngu, A.H.; Ni, J.; Debnath, M.; Wang, L. Transfer Learning on Small Datasets for Improved Fall Detection. Sensors 2023, 23, 1105. [Google Scholar] [CrossRef] [PubMed]
- Lu, Y.; Li, Z.; He, D.; Sun, Z.; Dong, B.; Qin, T.; Wang, L.; Liu, T.Y. Understanding and improving transformer from a multi-particle dynamic system point of view. arXiv 2019, arXiv:1906.02762. [Google Scholar]
- Micucci, D.; Mobilio, M.; Napoletano, P. UniMiB SHAR: A Dataset for Human Activity Recognition Using Acceleration Data from Smartphones. Appl. Sci. 2017, 7, 1101. [Google Scholar] [CrossRef]
- Yu, X.; Jang, J.; Xiong, S. A large-scale open motion dataset (KFall) and benchmark algorithms for detecting pre-impact fall of the elderly using wearable inertial sensors. Front. Aging Neurosci. 2021, 13, 692865. [Google Scholar] [CrossRef]
- Yasmin, A.; Mahmud, T.; Debnath, M.; Ngu, A. An Empirical Study on AI-Powered Edge Computing Architectures for Real-Time IoT Applications. In Proceedings of the IEEE Computers, Software, and Applications Conference (COMPSAC 2024), Osaka, Japan, 2–4 July 2024. [Google Scholar]
- Brew, B.; Faux, S.G.; Blanchard, E. Effectiveness of a Smartwatch App in Detecting Induced Falls: Observational Study. JMIR Form Res. 2022, 6, e30121. [Google Scholar] [CrossRef] [PubMed]
- Databrary—Videos of Falls in Long Term Care. Available online: https://www.sfu.ca/ipml/research/data-sharing.html (accessed on 13 June 2023).









| SmartFallMM | UniMib | K-Fall | |
|---|---|---|---|
| Number of ADLs | 560 | 710 | 2729 |
| Number of Fall | 400 | 486 | 2346 |
| Number of Subjects | 16 | 30 | 32 |
| Sampling Frequency | 32 Hz | 50 Hz | 100 Hz |
| Type of devices | Kinect cameras, phone, watch, meta sensors | Phone | 9 axis IMU |
| Device placement | Left and right wrists and hips | Left and right pockets of pants | Lower back |
| Names | Models | |
|---|---|---|
| Transformer * | LSTM * | |
| Learning Rate | 0.001 | 0.001 |
| Epochs | 100 | 100 |
| Batch Size | 64 | 64 |
| Optimizer | Adam | Adam |
| Loss Function | BCE | BCE |
| Encoder | 4 | - |
| MHA Heads | 4 | - |
| MHA Dim | 128 | - |
| MLP Dimension | 16 | 128 |
| Dataset | Window Size | Metrics | Transformers | LSTM | |||
|---|---|---|---|---|---|---|---|
| Transformers | ConvTransformers | LSTM | CNN-LSTM | LSTM w/Self-Attn | |||
| SmartFallMM | 64 | Precision | 84.9 | 64.1 | 64.8 | 74.7 | 71.3 |
| Recall | 65.8 | 72.3 | 77.2 | 89.4 | 82.1 | ||
| F1-Score | 74.0 | 67.9 | 71.2 | 81.3 | 76.3 | ||
| 128 | Precision | 88.9 | 74.4 | 76.5 | 83.2 | 76.5 | |
| Recall | 77.0 | 83.1 | 83.2 | 92.5 | 82.9 | ||
| F1-Score | 82.6 | 78.5 | 79.7 | 87.6 | 79.6 | ||
| 256 | Precision | 78.3 | 72.9 | 64.3 | 83.5 | 75.2 | |
| Recall | 84.0 | 89.0 | 76.8 | 79.2 | 79.6 | ||
| F1-Score | 81.1 | 80.8 | 70.1 | 81.3 | 77.3 | ||
| UniMib | 64 | Precision | 79.1 | 78.4 | 84.1 | 94.4 | 85.0 |
| Recall | 75.5 | 80.5 | 89.1 | 93.6 | 89.3 | ||
| F1-Score | 77.2 | 79.4 | 86.1 | 93.7 | 87.1 | ||
| 128 | Precision | 84.8 | 85.6 | 71.3 | 83.1 | 85.8 | |
| Recall | 77.2 | 87.7 | 88.4 | 91.2 | 93.5 | ||
| F1-Score | 80.8 | 86.6 | 79.1 | 87.5 | 89.4 | ||
| 256 | Precision | 70.1 | 79.0 | 61.3 | 85.4 | 81.1 | |
| Recall | 83.9 | 85.0 | 81.2 | 96.1 | 86.1 | ||
| F1-Score | 76.4 | 81.9 | 70.2 | 90.3 | 83.6 | ||
| K-fall | 64 | Precision | 82.6 | 72.5 | 82.4 | 83.5 | 78.8 |
| Recall | 84.9 | 86.3 | 78.7 | 81.5 | 83.9 | ||
| F1-Score | 83.8 | 78.8 | 80.1 | 82.2 | 80.1 | ||
| 128 | Precision | 84.8 | 81.1 | 89.1 | 85.4 | 81.0 | |
| Recall | 86.8 | 89.0 | 85.6 | 89.1 | 89.2 | ||
| F1-Score | 85.8 | 84.9 | 87.3 | 87.4 | 84.3 | ||
| 256 | Precision | 88.5 | 93.4 | 95.3 | 93.1 | 91.5 | |
| Recall | 93.5 | 95.7 | 89.6 | 96.3 | 93.1 | ||
| F1-Score | 90.9 | 94.0 | 92.2 | 95.5 | 92.3 | ||
| Metrics | Transformer | CNN-LSTM | |
|---|---|---|---|
| Participant 1 | Precision | 65.7 | 53.1 |
| Recall | 100 | 100 | |
| F1-Score | 78.7 | 69.2 | |
| Accuracy | 80.0 | 66.1 | |
| Participant 2 | Precision | 73.5 | 55.5 |
| Recall | 100 | 100 | |
| F1-Score | 84.3 | 70.9 | |
| Accuracy | 86.1 | 69.2 | |
| Participant 3 | Precision | 52.0 | 59.4 |
| Recall | 100 | 88.0 | |
| F1-Score | 68.4 | 70.6 | |
| Accuracy | 64.6 | 76.9 | |
| Average | Precision | 63.7 | 56.0 |
| Recall | 100 | 96.0 | |
| F1-Score | 77.1 | 70.2 | |
| Accuracy | 76.9 | 70.7 |
| Transformer | CNN-LSTM | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Trial 1 | Trial 2 | Trial 3 | Trial 4 | Trial 5 | Trial 1 | Trial 2 | Trial 3 | Trial 4 | Trial 5 | ||
| Participant 1 | Front Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Back Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Left Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Right Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Rotate Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Participant 2 | Front Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Back Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Left Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Right Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Rotate Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Participant 3 | Front Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Back Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
| Left Fall | Yes | Yes | Yes | Yes | Yes | Yes | No | No | Yes | Yes | |
| Right Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | Yes | Yes | |
| Rotate Fall | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 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 (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Haque, S.T.; Debnath, M.; Yasmin, A.; Mahmud, T.; Ngu, A.H.H. Experimental Study of Long Short-Term Memory and Transformer Models for Fall Detection on Smartwatches. Sensors 2024, 24, 6235. https://doi.org/10.3390/s24196235
Haque ST, Debnath M, Yasmin A, Mahmud T, Ngu AHH. Experimental Study of Long Short-Term Memory and Transformer Models for Fall Detection on Smartwatches. Sensors. 2024; 24(19):6235. https://doi.org/10.3390/s24196235
Chicago/Turabian StyleHaque, Syed Tousiful, Minakshi Debnath, Awatif Yasmin, Tarek Mahmud, and Anne Hee Hiong Ngu. 2024. "Experimental Study of Long Short-Term Memory and Transformer Models for Fall Detection on Smartwatches" Sensors 24, no. 19: 6235. https://doi.org/10.3390/s24196235
APA StyleHaque, S. T., Debnath, M., Yasmin, A., Mahmud, T., & Ngu, A. H. H. (2024). Experimental Study of Long Short-Term Memory and Transformer Models for Fall Detection on Smartwatches. Sensors, 24(19), 6235. https://doi.org/10.3390/s24196235

