AI-ECG vs NT-proBNP

Screen for reduced ejection fraction
from a 12-lead ECG

A 1-D residual neural network estimates the probability that the left-ventricular ejection fraction is ≤35%, ≤40% or <50%. Your ECG never leaves your device: parsing, preprocessing and inference run locally in the browser.

For research only. The model is not a medical device and must not be used for individual diagnosis or treatment decisions.

1

Upload an ECG

Recommended WFDB .hea + .dat of the same record (format 16, 500 Hz), or CSV with a header row of lead names (I, II, III, aVR, aVL, aVF, V1–V6), one sample per row, mV, 500 Hz.
Experimental Image of a paper ECG — PNG / JPG scan or a straight, flat photo. Lower reliability, see the warning shown after upload.
Loading model…
    2

    Result

    The prediction will appear here once an ECG is analysed.

    How it works

    01

    Load an ECG

    Choose a WFDB record or CSV export of a 10-second, 12-lead ECG — or, experimentally, a picture of a paper ECG.

    02

    Preprocess locally

    The page reproduces the training pipeline in your browser: lead ordering, baseline removal, smoothing and resampling to 250 Hz.

    03

    Score on device

    A 1-D residual network runs with WebAssembly and returns probabilities for LVEF ≤35%, ≤40% and <50%.

    About the model

    0.885
    AUROC, evaluation cohort
    12,770 patients · 95% CI 0.879–0.892
    84.7%
    Sensitivity at 0.0614
    specificity 77.1%
    1.14 M
    Parameters
    1-D residual CNN
    • Trained with R torch on MIMIC-IV-ECG waveforms labelled with MIMIC-IV-Echo transthoracic LVEF (44,567 ECG–TTE pairs; patients disjoint from the evaluation cohort).
    • Development-validation AUROC (LVEF ≤40%): 0.925. The evaluation cohort comes from the same institution.
    • Preprocessing: lead ordering → baseline removal with a 1-s moving average → [1 2 1]/4 smoothing → 250 Hz → clipping at ±10 mV.
    • Developed on single-centre data; performance and calibration may differ in other populations.

    Image-mode validation

    Experimental

    Image mode was tested on synthetic paper ECGs rendered from evaluation-cohort waveforms (red grid, calibration pulse, lead labels, header text, baseline wander), digitised by exactly the code this page runs, and scored by the model. Thresholds were fixed beforehand on 1,200 digitised development-validation images with mixed JPEG, low-resolution and rotation artefacts.

    ConditionnAUROC digital fileAUROC image (95% CI)Sens / spec, imageSens / spec, digitalSame call as digital
    Clean scan, 3×4+rhythm4000.8780.787 (0.739–0.837)87% / 54%81% / 80%68%
    JPEG quality 60, 3×42000.8490.776 (0.699–0.850)82% / 56%80% / 79%72%
    Low resolution (5 px/mm ≈ 127 dpi), 3×42000.8490.747 (0.667–0.829)92% / 38%80% / 79%58%
    Rotated 1–2°, 3×42000.8490.773 (0.697–0.841)85% / 56%80% / 79%74%
    Grey/black grid, 3×41500.8090.796 (0.691–0.884)90% / 58%74% / 78%74%
    Clean scan, 6×23000.8730.752 (0.688–0.810)86% / 49%83% / 79%68%
    Clean scan, 12×13000.8730.824 (0.766–0.877)76% / 75%83% / 79%86%

    Information ceiling. Even with perfect digitisation, a 3×4 print shows each lead for only 2.5 s (6×2: 5 s). In 3,000 evaluation ECGs this alone lowers AUROC from 0.883 to 0.818 (3×4) and 0.835 (6×2). To compensate, limb leads are completed with Einthoven/Goldberger identities and two reconstructions (segment in place, and whole R–R cycles tiled to 10 s) are averaged.

    Image-mode thresholds (LVEF ≤40%, 85% / 90% sensitivity on development images): 3×4 0.123 / 0.098 · 6×2 0.114 / 0.081 · 12×1 0.120 / 0.104.

    Sens / spec = sensitivity / specificity for LVEF ≤40% at the primary threshold (image: 85%-sensitivity threshold; digital: 0.0614). “Same call as digital” = share of ECGs with the same positive/negative result as the digital file. These are synthetic, flat, well-lit renderings from the same institution; real photographs (perspective, shadows, curved or creased paper, handwriting) are expected to perform worse and were not tested.