A Hardware-Aware System for Five-Class EEG IED Detection Using CWT Scalograms and Deep Learning
Abstract
Interictal epileptiform discharges (IEDs) are key biomarkers for epilepsy, but their brief duration, morphological variability and overlap with background electroencephalography (EEG) make automated detection challenging. Most existing EEG analysis systems perform only binary or single-event detection, limiting clinical and real-time applicability. This work presents a system-oriented deep learning framework for five-class EEG classification: Normal, Delta-Slow-Waves, Spike-Wave, Sharp-and-Slow-Waves and Poly-Spikes. High-resolution Continuous Wavelet Transform scalograms were generated from segmented EEG windows, and a fine-tuned VGG16 model was trained on 1.6 million images with targeted data augmentation to address class imbalance. Evaluation on unseen EEG recordings achieved 77% accuracy, 74% macro recall and a macro F1-score of 0.61, with a total system latency of 42.7 ms per window, demonstrating real-time computational feasibility. The framework preserves both high- and low-frequency EEG features, enabling reliable event-level analysis suitable for modular EEG acquisition platforms. To our knowledge, this is among the first system-level frameworks for real-time five-class IED detection, enabling clinically meaningful and scalable EEG interpretation for diagnostic support, seizure localization and continuous monitoring.