Submitted:
27 March 2025
Posted:
27 March 2025
You are already at the latest version
Abstract

Keywords:
1. Introduction

2. Background and Related Work
2.1. Accelerometer and Inertial Data
2.2. Convolutional Neural Networks for Human Activity Recognition using Mobile and Wearable Sensors
2.3. Human Activity Recognition using Tiny Machine Learning
3. Target Platform
4. Methodology
4.1. Raw Data Collection
4.2. Dataset Construction, Preparation and Curation

4.2.1. Dataset Analysis and Curation

4.2.2. Feature Extraction
4.3. Model Training
4.3.1. Edge Impulse
4.3.2. TensorFlow
- The training set is used to train the model.
- The validation set is used to measure how well the model is performing during training.
- The testing set is used to test the model after training.
5. Proposed Embedded System for Real-Time Exercise HAR
6. Android Mobile Application
- Connection screen - to connect/disconnect from the embedded system or do a test read.
- Exercises screen - to choose the exercise that will be performed.
- Exercise Detail screen - show the detailed of the chosen exercise and the counters: in green the number of correctly made exercises and orange the wrongly done.
7. Experimental Results
8. 3D-Printable Case
| Exercise | Precision | Recall | F1 Score | Accuracy (%) | Training time (s) |
|---|---|---|---|---|---|
| Bicep Curl | 0.80 | 0.80 | 0.80 | 80.0% | 181 |
| Shoulder Press | 0.95 | 0.94 | 0.94 | 94.1% | 181 |
| Tricep Extension | 0.73 | 0.72 | 0.72 | 72.2% | 180 |
| Exercise | Precision | Recall | F1 Score | Accuracy (%) | Training time (s) |
|---|---|---|---|---|---|
| Bicep Curl | 0.76 | 0.65 | 0.64 | 65% | 336 |
| Shoulder Press | 0.60 | 0.63 | 0.60 | 59% | 350 |
| Tricep Extension | 0.60 | 0.60 | 0.60 | 60% | 317 |
9. Conclusions and Future Work
| Memory (KB) | Edge Impulse | TFLite | ||||||
|---|---|---|---|---|---|---|---|---|
| Bicep Curl | Shoulder Press | Tricep Extension | All | Bicep Curl | Shoulder Press | Tricep Extension | All | |
| Model Size | N/A | N/A | N/A | N/A | 256.8 | 256.7 | 256.4 | 256.8 |
| Quantized Model | N/A | N/A | N/A | N/A | 73.5 | 73.4 | 73.2 | 73.6 |
| TFLite Model | 348.0 | 348.0 | 348.0 | 348.0 | 453.7 | 453.0 | 451.8 | 453.9 |
Source files
Funding
Data Availability Statement
Conflicts of Interest
References
- Shah, D. Human Activity Recognition (HAR): Fundamentals, Models, Datasets, 2023.
- Brownlee, J. Evaluate Machine Learning Algorithms for Human Activity Recognition. Machine Learning Mastery 2020. [Google Scholar]
- Baheti, P. A Simple Guide to Data Preprocessing in Machine Learning. Website V7 Labs 2021. [Google Scholar]
- Peter, W.; Daniel, S. TinyML - Machine Learning with TensorFlow Lite on Arduino and Ultra-Low-Power Microcontrollers; O’Reilly Media, 2019.
- Diab, M.S.; Rodriguez-Villegas, E. Embedded Machine Learning Using Microcontrollers in Wearable and Ambulatory Systems for Health and Care Applications: A Review. Sensors 2022. [Google Scholar]
- Rueda, F.M.; Grzeszick, R.; Fink, G.A.; Feldhorst, S.; ten Michael Hompel. Convolutional Neural Networks for Human Activity Recognition Using Body-Worn Sensors. Informatics, volume 5, issue 2 of the journal in 2018 2018.
- Nguyen, L.T.; Yu, B.; Mengshoel, O.J.; Jiang Zhu, P.W.; Zeng, J.Z.M. Convolutional Neural Networks for Human Activity Recognition using Mobile Sensors. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 2014.
- Boureau, Y.L.; Ponce, J.; Fr, J.P.; Lecun, Y. A Theoretical Analysis of Feature Pooling in Visual Recognition, 2010.
- Price, B.A.; Gooch, D.; Bandara, A.K.; Bennasar, B.N.M. Significant Features for Human Activity Recognition Using Tri-Axial Accelerometers. MedCentral 2022. [Google Scholar]
- Groh, B.H.; Kautz, T.; Schuldhaus, D. IMU based Trick Classification in Skateboarding. Workshop on Large-Scale Sports Analytics as part of the 21st ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 2015. [Google Scholar]
- Jensen, U.; Schmidt, M.; Hennig, M.; Dassler, F.A.; Jaitner, T.; Eskofier, B.M. An IMU-based Mobile System for Golf Putt Analysis. Sports Engineering 2015. [Google Scholar] [CrossRef]
- Jarning, J.M.; Mok, K.M.; Hansen, B.H.; Bahr, R. Application of a tri-axial accelerometer to estimate jump frequency in volleyball. Sports Biomechanics 2015. [Google Scholar] [CrossRef]
- Kautz, T.; Groh, B.H.; Hannink, J.; Jensen, U.; Strubberg, H.; Eskofier, B.M. Activity recognition in beach volleyball using a Deep Convolutional Neural Network. Data Mining and Knowledge Discovery 2017. [Google Scholar] [CrossRef]
- Rindal, O.M.H.; Seeberg, T.M.; Tjønnås, J.; Haugnes, P. ; Øyvind Sandbakk. Automatic Classification of SubTechniques in Classical Cross-Country Skiing Using a Machine Learning Algorithm on Micro-Sensor Data. Sensors, 2017. [Google Scholar]
- Brock, H.; Ohgi, Y.; Lee, J. Learning to Judge Like a Human: Convolutional Networks for Classification of Ski Jumping Errors. Proceedings of the 2017 ACM International Symposium on Wearable Computers (ISWC) 2017. [Google Scholar]
- Buckley, C.; Reilly, M.O.; Farrel, A.V.; Clark, L.; Longo, V. Binary Classification of Running Fatigue using a Single Inertial Measurement Unit. Proceedings of the IEEE 14th International Conference on Wearable and Implantable Body Sensor Networks (BSN) 2017. [Google Scholar]
- Bulling, A.; Blanke, U.; Schiele, B. A Tutorial on Human Activity Recognition Using Body-Worn Inertial Sensors. ACM Computing Surveys 2014. [Google Scholar] [CrossRef]
- Chowdhary, M.; Saha, S.S. On-Sensor Online Learning and Classification Under 8 KB Memory. Journal of Machine Learning Research 2023. [Google Scholar]
- Yala, B.F.N. Feature extraction for human activity recognition on streaming data. Journal of Ambient Intelligence and Humanized Computing 2015. [Google Scholar]
- Balestra, G.; Rosati, M.K.S. Comparison of Different Sets of Features for Human Activity Recognition by Wearable Sensors. PubMed Central 2018. [Google Scholar]
- Xia, S.; de Godoy, D.; Islam, B.; Islam, M.T.; Nirjon, S.; Kinget, P.R.; Jiang, X. Improving Pedestrian Safety in Cities using Intelligent Wearable Systems. IEEE Transactions on Mobile Computing 2019. [Google Scholar]
- Wang, Z.; Wu, Y.; Jia, Z.; Shi, Y.; Hu, J. Lightweight Run-Time Working Memory Compression for Deployment of Deep Neural Networks on Resource-Constrained. IEEE Transactions on Neural Networks and Learning Systems 2021. [Google Scholar]
- Zhou, P.; Shi, W.; Tian, J.; Qi, Z.; Li, B.; Hao, H.; Xu, B. Attention-based bidirectional long short-term memory networks for relation classification. 54th Annual Meeting of the Association for Computational Linguistics (ACL 2016) - Short Papers 2016, pp. 207–212. [CrossRef]
- Mutegeki, R.; Han, D.S. A CNN-LSTM Approach to Human Activity Recognition. In Proceedings of the Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR).; IEEE, 2020. [Google Scholar]
- Lazarova, M.; Tsokov, A.A.P.S. Accelerometer-based human activity recognition using 1D convolutional neural network. Journal of Ambient Intelligence and Humanized Computing 2021. [Google Scholar]
- Brownlee, J. 1D Convolutional Neural Network Models for Human Activity Recognition. Machine Learning Mastery 2020. [Google Scholar]
- Bang, J.; Huynh-The, T.; Lee, J.; Kim, J.I.; Lee, S.; Hur, T. Iss2Image: A Novel Signal-Encoding Technique for CNN-Based Human Activity Recognition. Sensors 2018. [Google Scholar]
- Shalev-Shwartz, S.; Ben-David, S. Understanding Machine Learning: From Theory to Algorithms. Published 2014 by Cambridge University Press. 2014. [Google Scholar]
- Gonçalves, T.A. Convolutional Neural Network for Hand Gesture Identification on FPGAs. Master’s thesis, Instituto Superior Técnico de Lisboa, 2022.
- Emily, C.; J, S.A.; Kevin, B.; Sam, R. Machine and deep learning for sport-specific movement recognition: a systematic review of model development and performance. Journal of Sports Sciences 2018. [Google Scholar]
- Hayajneh, A.M.; Hafeez, M.; Zaidi, S.A.R.; McLernon, D. TinyML Empowered Transfer Learning on the Edge. IEEE Transactions on Emerging Topics in Computing 2024. [Google Scholar]
- Banbury, C.; Zhou, C.; Fedorov, I.; Navarro, R.M.; Thakker, U.; Gope, D.; Reddi, V.J.; Mattina, M.; Whatmough, P.N. BAMBURY micronets neural network architectures for deploying tinyml applications on commodity microcontrollers. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 2021. [Google Scholar]
- Gupta, S. A TinyML Approach to Human Activity Recognition. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies, 2022. [Google Scholar]
- Preece, S.J.; Goulermas, J.Y.; Kenney, L.P.; Howard, D.; Meijer, K.; Crompton, R. Activity identification using body-mounted sensors - A review of classification techniques, 2009. [CrossRef]
- Twomey, N.; Diethe, T.; Fafoutis, X.; Elsts, A.; McConville, R.; Flach, P.; Craddock, I. A comprehensive study of activity recognition using accelerometers. Informatics 2018, 5. [Google Scholar] [CrossRef]
- Lattanzi, E.; Donati, M.; Freschi, V. Exploring Artificial Neural Networks Efficiency in Tiny Wearable Devices for Human Activity Recognition. Sensors 2022. [Google Scholar]
- K.R.Baskaran, M. K.R.Baskaran, M. Machine Learning Algorithms for Human Activity Recognition. International Journal of Engineering & Technology, 2019. [Google Scholar]
- Chollet, Francois et al.. Keras. Available online: https://github.com/fchollet/keras (accessed on 12.03.2025).
- AI, G. Tensor flow lite - deploy machine learning models on mobile and edge devices. https://www.tensorflow.org/lite, 2012.
- Impulse, E. Edge Impulse website. Available online: https://docs.edgeimpulse.com/ (accessed on 12.03.2025).
- OutSystems. OutSystems website. Available online: https://www.outsystems.com/ (accessed on 12.03.2025).







| Total duration | 4h |
|---|---|
| Subjects (female / male) | 8 subjects: 6 male, 2 female |
| Range of ages | 19 to 57 years |
| Skill level | From beginner to professional athlete |
| Sample rate | 50Hz |
| Sensor Placement | On the Dumbbell |
| Reference | Manually labeled raw data |
| Place | ISEL Building F (DEETC) |
| Accelerometer Resolution | The accelerometer in the LSM6DS3 outputs data with a 16-bit resolution for each of the X, Y, and Z axes. |
| Acceleration () | The constant 9.80665f (standard acceleration due to gravity on Earth) is used to convert the raw accelerometer data from units of g (where ) to . |
| Bicep Curl Correct | Shoulder Press Correct | Tricep Extensions Correct |
|---|---|---|
| Data collected: 4m 8s59 samples of 3s each80% Train / 20% test | Data collected: 4m 8s59 samples of 3s each | 80% Train 20% test | Data collected: 4m 38s59 samples of 3s each80% Train 20% test |
| Bicep Curl Wrong | Shoulder Press Wrong | Tricep Extensions Wrong |
| Data collected: 5m 5s64 samples of 3s each80% Train 20% test | Data collected: 4m 2s36 samples of 3s each80% Train / 20% test | Data collected: 4m 8s50 samples of 3s each80% Train / 20% test |
| Real ∖ Predicted | BicepCurl Correct | BicepCurl Wrong |
|---|---|---|
| BicepCurl Correct | 92.31 | 7.69 |
| BicepCurl Wrong | 52.38 | 47.62 |
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. |
© 2025 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/).