Optimized Edge AI Framework for Wearable Epilepsy Seizure Monitoring on Microcontrollers
摘要
Reliable real-world seizure monitoring remains a major challenge in epilepsy care, particularly outside clinical environments where conventional electroencephalography (EEG) is impractical. Existing wearable solutions provide partial support using limited sensor modalities and often rely on smartphones or gateway devices for processing, which limits autonomy and real-time responsiveness. Moreover, current platforms lack support for synchronized clinical annotation and structured dataset generation, both of which are essential for training and validating seizure detection algorithms in early development phases. To address these limitations, we present a complete, low-power, end-to-end Internet of Things (IoT) framework for wearable seizure detection. The system integrates multimodal physiological sensing (electrodermal activity (EDA), electromyography (EMG), and temperature (TEMP)) with a modular and containerized architecture for real-time data ingestion, historical storage, and expert annotation. Unlike prior solutions that are application-specific or tied to proprietary hardware, our platform enables flexible deployment and supports decoupled annotation pipelines, empowering both clinical teams and researchers to co-develop high-quality datasets from real-world patient data. Built upon this foundation, we demonstrate the deployment of a quantized convolutional neural network (CNN) model capable of sub-15 ms inference directly on ESP32 microcontrollers, enabling autonomous, real-time detection without external processing. Additionally, a post-processing method is introduced to reduce false negatives during prolonged seizure episodes. Validated on clinical data from the Regional University Hospital of Málaga, the proposed framework illustrates a scalable and practical path toward next-generation wearable seizure detection systems that are both intelligent and self-contained.