Deployment of TinyML-Based Stress Classification Using Computational Constrained Health Wearable
Top Cited Papers
Open Access
- 10 February 2025
- journal article
- research article
- Published by MDPI AG in Electronics
- Vol. 14 (4) , 687
Abstract
Stress has become a common mental health issue in modern society, causing individuals to experience acute behavioral changes. Exposure to prolonged stress without proper prevention and treatment may cause severe damage to one’s physiological and psychological health. Researchers around the world have been working to find and create solutions for early stress detection using machine learning (ML). This paper investigates the possibility of utilizing Tiny Machine Learning (TinyML) in developing a wearable device, comparable to a smartwatch, that is equipped with both physiological and psychological data detection system to enable edge computing and give immediate feedback for stress prediction. The main challenge of this study was to fit a trained ML model into the microcontroller’s limited memory without compromising the model’s accuracy. A TinyML-based framework using a Raspberry Pi Pico RP2040 on a customized board equipped with several health sensors was proposed to predict stress levels by utilizing accelerations, body temperature, heart rate, and electrodermal activity from a public health dataset. Moreover, a few selected machine learning models underwent hyperparameter tuning before a porting library was used to translate them from Python to C/C++ for deployment. This approach led to an optimized XGBoost model with 86.0% accuracy and only 1.12 MB in size, hence perfectly fitting into the 2 MB constraint of RP2040. The prediction of stress on the edge device was then tested and validated using a separate sub-dataset. This trained model on TinyML can also be used to obtain an immediate reading from the calibrated health sensors for real-time stress predictions.Keywords
Funding Information
- nict japan (PJ2022-03, DPK-2022-010)
- Universiti Kebangsaan Malaysia (PJ2022-03, DPK-2022-010)
This publication has 36 references indexed in Scilit:
- A Comparative Review of Microcontroller Architectures in Embedded Machine Learning: The Raspberry Pi Pico (RP2040) and Arduino Nano 33 IoT (SAMD21)2024
- Real-Time Stress Detection from Raw Noisy PPG Signals Using LSTM Model Leveraging TinyMLArabian Journal for Science and Engineering, 2024
- Multi-Sensory Stress Detection System2024
- Expression and Perception of Stress Through the Lens of Multimodal Signals: A Case Study in Interpersonal Communication Settings2023
- A Low Cost EDA-based Stress Detection Using Machine Learning2022
- A multimodal sensor dataset for continuous stress detection of nurses in a hospitalScientific Data, 2022
- A Review on Mental Stress Detection Using Wearable Sensors and Machine Learning TechniquesIEEE Access, 2021
- XGBoost Algorithm-Based Monitoring Model for Urban Driving Stress: Combining Driving Behaviour, Driving Environment, and Route FamiliarityIEEE Access, 2021
- Evaluating KNN Performance on WESAD Dataset2020
- CLAS: A Database for Cognitive Load, Affect and Stress Recognition2019