TinyML-Based ECG Abnormality Detection for Resource-Constrained Embedded Systems
DOI:
https://doi.org/10.31224/8569Keywords:
ECG Classification, Embedded machine learning, Neural network quantization, ESP32-S3, Edge AIAbstract
This work investigates a lightweight neural-network approach for binary ECG beat classification on resource-constrained embedded systems. Using the MIT-BIH Arrhythmia Database, 84,708 annotated beats were extracted and divided into source-aware training and testing groups, with normal beats classified against selected abnormal annotations. Reducing each beat from 180 to 90 raw ECG samples halved input storage while maintaining comparable performance. A compact 90–8–1 multilayer perceptron was selected, containing 737 trainable parameters and requiring 728 multiply-accumulate operations per inference. The floating-point model achieved 86.27% accuracy and 53.94% F1-score, while an integer-style implementation using INT8 weights and activations with INT32 accumulators achieved 86.28% accuracy and 53.98% F1-score. The quantized model required 1,500 bytes for the reported model constants and 130 bytes of inference working memory. The integer implementation reproduced the Python reference predictions for all 27,054 test vectors with zero mismatches. The model was subsequently deployed to an ESP32-S3 in Wokwi, where 100 selected test vectors also produced complete agreement with the reference implementation. These results demonstrate an end-to-end approach for implementing compact ECG classification models using integer-based inference on resource-constrained embedded platforms.
Downloads
Downloads
Posted
License
Copyright (c) 2026 Mclawrence Okoror

This work is licensed under a Creative Commons Attribution 4.0 International License.