ECG Classification with Self-Supervised Learning

Test ECG cardiovascular disease classification using a SimCLR pre-trained model fine-tuned on the PTB-XL dataset.

Model Performance: AUROC 0.8717 | Accuracy 0.8234 | 10% labeled data


Upload Your ECG

Multi-file upload supported! Upload multiple files at once, especially for WFDB pairs.

Clinical & Standardized Formats:

  • .dcm – DICOM (medical imaging, PACS systems)
  • .scp – SCP-ECG (European interoperability standard)
  • .xml – HL7 aECG / FDA XML (clinical trials, regulatory)

Research & PhysioNet Formats:

  • .hea + .dat – WFDB (MIT-BIH, PhysioNet) Upload both files together
  • .edf – European Data Format (multi-channel biosignals)

Generic / Export Formats:

  • .csv / .txt / .tsv – Text formats (auto-detects delimiter)
  • .npy – NumPy arrays
  • .mat – MATLAB format
  • .h5 / .hdf5 – HDF5 (efficient large-scale datasets)
  • .raw / .bin – Binary ECG data
  • .zip – Archive with multiple files

Architecture Auto-Conversion:

  • Multi-lead (12 leads): Used directly
  • Single-lead → Replicated to 12 leads
  • Auto-pads/trims to 5000 samples per lead

Supported Delimiters: Space, comma, tab (auto-detected)


💡 WFDB Tip: Upload both .hea and .dat files together in one go. The system will automatically detect the pair and process them correctly!

Results

Predictions appear here after classification.

Upload an ECG file to see predictions


About This Model

DOI: 10.57967/hf/8469 | Model Card | GitHub

Architecture: 1D CNN with SimCLR self-supervised pre-training

Training:

  • Pre-training: SimCLR on 17.5K unlabeled PTB-XL ECGs
  • Fine-tuning: Supervised on 1.7K labeled ECGs (10%)

Classes Predicted:

  • NORM: Normal ECG
  • MI: Myocardial Infarction
  • STTC: ST/T Changes
  • HYP: Hypertrophy
  • CD: Conduction Disturbances

Research Only - Not validated for clinical use