Clinical AI Research Project

Classification of Life-Threatening Arrhythmia ECG Signals Using Deep Learning

A multi-label ECG diagnostic system trained on PTB-XL with metadata fusion and 1D CNN modeling to predict five clinically relevant superclasses.

Project Snapshot

  • Dataset: PTB-XL (12-lead ECG)
  • Scope: 21,000+ recordings
  • Labels: 5 diagnostic superclasses
  • Best Model: Metadata + ECG 1D CNN
  • Target Use: Research & educational demonstration

89%

Peak Binary Accuracy

21K+

ECG Records

12

Standard Leads

5

Diagnostic Outputs

How Model Training Was Conducted

The training pipeline is designed as a reproducible clinical ML workflow that combines metadata processing with signal-based deep learning.

  1. Data ingestion: metadata and waveform files are loaded from PTB-XL with WFDB tooling.
  2. Clinical label mapping: SCP statements are consolidated into five superclasses (NORM, MI, STTC, CD, HYP).
  3. Feature engineering: seven metadata features are standardized; ECG traces are normalized for stable optimization.
  4. Patient-aware splitting: train/validation/test partitions are generated before model fitting.
  5. Model training: early stopping + checkpointing select the best weights by validation binary accuracy.
  6. Augmentation branch: Model03 adds random sliding windows and Gaussian noise for robustness testing.

Data Used in This Project

PTB-XL is a large-scale, publicly available ECG corpus with expert annotations suitable for supervised diagnostic modeling.

Superclass Clinical Meaning Records
NORMNormal ECG9,528
MIMyocardial Infarction5,486
STTCST/T Change5,250
CDConduction Disturbance4,907
HYPHypertrophy2,655

Waveform format: 12-lead clinical ECG recordings. Model input supports both metadata-only and dual-input (metadata + signal) inference modes.

Model Portfolio

Model01

Metadata-Only Baseline

~75% binary accuracy

Dense network using seven patient/context features, designed as a baseline and fallback when waveform data are unavailable.

Model02 (Recommended)

Metadata + 1D CNN ECG

~89% binary accuracy

Dual-branch architecture combining metadata embedding with deep temporal signal features. This is the strongest-performing configuration.

Model03

Augmented Training Variant

~87% binary accuracy

Extends Model02 with augmentation policies (windowing + noise) to evaluate resilience under signal variation.

Interactive Inference Environment

The deployment page embeds the hosted Streamlit interface for direct testing with ECG files and metadata. It is configured for demonstration and educational review.

Launch Live Demo Page