An End-to-End Automated Pipeline for EEG Classification on TinyML Platforms: From Signal to On-Device Inference
Abstract
This paper presents an optimized methodology for processing electroencephalogram signals on resource-constrained TinyML platforms, targeting emotion recognition and epileptic seizure detection. We integrate the Reaction-Diffusion Transform (RDT) for efficient preprocessing, automated hyperparameter optimization using Optuna, and model deployment on the ESP32 microcontroller via Edge Impulse. The approach leverages the GAMEEMO dataset (four emotional states) and the ESR dataset (five seizure-related categories) to develop compact, high-performance models. Preliminary experiments validate the pipeline’s feasibility, achieving 92.6% accuracy with a 15 ms inference time (int8 quantization) for seizure detection on ESR, and 79.9% accuracy (raw data, 16 filters) with RDT preprocessing reducing inference time to 146 ms (77.9% accuracy, 85% on-device with 20 samples, int8) for emotion recognition on GAMEEMO. RDT reduces data dimensionality, enabling a five-fold latency decrease compared to raw data processing, while maintaining discriminative features critical for classification. These results highlight the potential for real-time EEG analysis on low-power devices with limited resources (520 KiB RAM, 240 MHz CPU), offering a scalable solution for wearable biomedical systems. By addressing inter-subject variability and computational constraints, this work advances point-of-care diagnostics for epilepsy monitoring and mental health applications, laying a foundation for future enhancements in temporal resolution and generalization.
Fields of Study & Subjects
EEG and Brain-Computer Interfaces
Emotion and Mood Recognition
Epilepsy research and treatment
Publication details
- Journal / source
- IEEE Access
- Volume
- 14
- Pages
- 8918–8937
- Publication date
- 1 January 2026