Skip to content

PTB-XL Diagnostics Dataset

Overview

This dataset consists of 21837 clinical 12-lead ECGs from 18885 patients. The ECGs were recorded at a sampling frequency of 500 Hz and a resolution of 16 bits per sample. The dataset includes 21837 ECGs, 21837 ECGs with diagnostic labels, and 21837 ECGs with rhythm labels. The diagnostic labels include 71 classes, and the rhythm labels include 9 classes.

Please visit Physionet for more details.

Usage

Example

from pathlib import Path
import neuralspot_edge as nse
import heartkit as hk

ds = hk.DatasetFactory.get('ptbxl')(
    path=Path("./datasets/ptbxl")
)

# Download dataset
ds.download(force=False)

# Create signal generator
data_gen = self.ds.signal_generator(
    patient_generator=nse.utils.uniform_id_generator(ds.patient_ids, repeat=True, shuffle=True),
    frame_size=256,
    samples_per_patient=5,
    target_rate=100,
)

# Grab single ECG sample
ecg = next(data_gen)

Funding

This work was supported by BMBF (01IS14013A), Berlin Big Data Center, Berlin Center for Machine Learning, and EMPIR project 18HLT07 MedalCare.

License

This database is available under Creative Commons Attribution 4.0 International Public License

References