Real-Time ECG with Adaptive Model Selection
Heart-rate-aware adaptive inference reached 91.5% accuracy at 1.33 ms on Raspberry Pi 4, with no misses in the 1,000-sample deadline evaluation.
Matching Inference Depth to the Heartbeat
A faster heart rate leaves less time to classify the next ECG window. At North Carolina State University, I co-developed heart-rate-aware Adaptive Model Selection and a parameter-shared Anytime CNN, allowing inference depth to change with the available time budget.
The network combines ECG waveform features with inter-beat timing and exposes three early exits in one shared backbone. This gives the controller lightweight, intermediate, and full-depth inference paths without loading separate models. I also corrected preprocessing and label alignment, then benchmarked the system on Raspberry Pi 4.
Accuracy Within a Real-Time Budget
In the reported two-cycle evaluation, adaptive inference reached 91.5% accuracy and 90.6% F1 at 1.33 ms mean latency, with no deadline misses among 1,000 evaluated samples.
| Two-Cycle Configuration | Accuracy | F1 | Mean Latency | Deadline Misses |
|---|---|---|---|---|
| AMS + Anytime CNN | 91.5% | 90.6% | 1.33 ms | 0 / 1,000 |
| CNN-LSTM baseline | 87.3% | 87.6% | 3.33 ms | 1,000 / 1,000 |
Against the strongest literature-based baseline in this comparison, the adaptive configuration improved accuracy by 4.2 percentage points while reducing mean latency by approximately 60%. The result made the accuracy–latency trade-off an explicit runtime decision.
This work was published at IEEE RTCSA 2025; I am the second author of Adaptive Model Selection for Real-Time Heart Disease Detection on Embedded Systems.