Dataset

PTB-XL

21,799 clinical 12-lead ECGs (PhysioNet)

21,799 10-s 12-lead ECGs from 18,869 patients (Schiller devices, 1989–1996), annotated with 71 SCP-ECG statements (diagnostic, form, rhythm — rhythm statements include AF), with recommended 10-fold patient-wise splits (folds 9–10 human-validated). v1.0.3, 3.0 GB, open access. Source: PhysioNet page (fetched 2026-10-12).

License
CC BY 4.0

Original description

Electrocardiography (ECG) is a key diagnostic tool to assess the cardiac condition of a patient. Automatic ECG interpretation algorithms as diagnosis support systems promise large reliefs for the medical personnel - only on the basis of the number of ECGs that are routinely taken. However, the development of such algorithms requires large training datasets and clear benchmark procedures. In our opinion, both aspects are not covered satisfactorily by existing freely accessible ECG datasets.

The PTB-XL ECG dataset is a large dataset of 21799 clinical 12-lead ECGs from 18869 patients of 10 second length. The raw waveform data was annotated by up to two cardiologists, who assigned potentially multiple ECG statements to each record. The in total 71 different ECG statements conform to the SCP-ECG standard and cover diagnostic, form, and rhythm statements. To ensure comparability of machine learning algorithms trained on the dataset, we provide recommended splits into training and test sets. In combination with the extensive annotation, this turns the dataset into a rich resource for the training and the evaluation of automatic ECG interpretation algorithms. The dataset is complemented by extensive metadata on demographics, infarction characteristics, likelihoods for diagnostic ECG statements as well as annotated signal properties.

Verbatim fromPhysioNet· Licence: Creative Commons Attribution 4.0 International Public License

PTB-XL: overview

PTB-XL is the most used open 12-lead ECG dataset for machine learning. It holds 21,799 ten-second clinical ECGs from 18,869 patients (52% male, ages 0 to 95, median 62), recorded on Schiller devices between October 1989 and June 1996 and released by Germany's Physikalisch-Technische Bundesanstalt (PTB). Up to two cardiologists annotated each record with 71 SCP-ECG statements covering diagnoses, waveform form and rhythm, including AF. The dataset ships recommended patient-wise 10-fold splits, so results can be compared across papers. It is open under CC BY 4.0. There is no PPG, but it is a standard pretraining and evaluation set for ECG and ECG-PPG foundation models.

What's inside

Records
21,799 ten-second 12-lead ECGs from 18,869 patients (v1.0.3)
Leads
I, II, III, aVR, aVL, aVF, V1 to V6
Sampling
500 Hz (records500/), plus a 100 Hz downsampled copy (records100/); 16-bit, 1 µV/LSB
Labels
71 SCP-ECG statements (diagnostic, form, rhythm) with likelihoods; superclasses NORM 9,514, MI 5,469, STTC 5,235, CD 4,898, HYP 2,649
Metadata
ptbxl_database.csv (28 columns: demographics, report, heart axis, infarction stadium, noise and drift flags, strat_fold); scp_statements.csv
Splits
strat_fold 1 to 10, patient-wise; folds 9 and 10 human-validated
Size
3.0 GB uncompressed; 1.7 GB zip

How to access it

Host: PhysioNet

  1. Open access: no account needed.
  2. Download the 1.7 GB zip, mirror with wget -r -N -c -np https://physionet.org/files/ptb-xl/1.0.3/, sync from s3://physionet-open/ptb-xl/1.0.3/, or stream single records with wfdb.
  3. Use folds 1 to 8 to train, fold 9 to validate and fold 10 to test, as the authors recommend.

Licence: Creative Commons Attribution 4.0 International (CC BY 4.0)

What it allows: Any use, including commercial, with attribution.

Load PTB-XL in Python

Testedpip install wfdb pandas
import ast
import pandas as pd
import wfdb

base = "https://physionet.org/files/ptb-xl/1.0.3/"
db = pd.read_csv(base + "ptbxl_database.csv", index_col="ecg_id")
db.scp_codes = db.scp_codes.apply(ast.literal_eval)
af = db[db.scp_codes.apply(lambda d: "AFIB" in d)]
print(len(db), len(af))                  # all records, records with an AFIB statement

rec = wfdb.rdrecord("00001_lr", pn_dir="ptb-xl/1.0.3/records100/00000")
print(rec.fs, rec.p_signal.shape)        # 100 (1000, 12)

train = db[db.strat_fold <= 8]; val = db[db.strat_fold == 9]; test = db[db.strat_fold == 10]

Run on 11 Nov 2026: 21,799 records, 1,514 with an AFIB SCP code (any likelihood); record 00001_lr is 12 leads x 1,000 samples at 100 Hz.

Caveats

  • No PPG. Use it for ECG pretraining, rhythm teacher labels or ECG branches of multimodal models.
  • Recordings date from 1989 to 1996 on Schiller devices; resting clinical 10 s ECGs differ from wearable single-lead strips.
  • Labels are multi-label with likelihoods, and some reports were auto-generated by the device before review. Filter on validated_by_human or use folds 9 and 10 when label quality matters.
  • Version matters: 1.0.2 removed 36 duplicate records and 1.0.3 removed two more. Report the version with your results.
  • Ages over 89 are encoded as 300 for HIPAA compliance, and recording dates are randomly shifted per patient.
  • Split by patient with strat_fold, never by record.

Similar datasets

DatasetSubjectsSignalsLicence
MIT-BIH Arrhythmia Database (PhysioNet)25ecgOpen Data Commons Attribution License v1.0 (ODC-By)
PhysioNet/CinC Challenge 2017: AF classification from a short single-lead ECG (AliveCor)n/aecgOpen Data Commons Attribution License v1.0 (ODC-By)
Icentia11k single-lead continuous raw ECG (PhysioNet)n/aecgCC BY-NC-SA 4.0
Chapman–Shaoxing–Ningbo 12-lead ECG arrhythmia database (PhysioNet)45,152ecgCreative Commons Attribution 4.0 International (CC BY 4.0)

Sources: PTB-XL on PhysioNet · Wagner et al. 2020 · helme/ecg_ptbxl_benchmarking · Updated 2026-11-11

PTB-XL: ChatPPG research summary card

Key numbers

18,869
Subjects
1
Reference labels
AFIB
100 Hz
Released sampling rate
500 Hz (100 Hz downsampled copy)

How it works

How PTB-XL works: Devices & body sites → Signals recorded → TasksDevices & body sites: None (PPG site). Signals recorded: PTB-XL, 18,869 subjects · 100 Hz, signals ECG. Tasks: AF / rhythm.Devices & body sitesNone: PPG siteNonePPG siteSignals recordedPTB-XL18,869 subjects · 100 HzECGTasksAF / rhythmAF / rhythm
Sampling
500 Hz (100 Hz downsampled copy)
Reference labels
afib
Device roles
Clinical reference (ECG)

Leaderboard rows· 3

All leaderboards
TaskDatasetMetricValueRank
AFib / arrhythmiaPTB-XLf1 ↑0.920#1 / 1
Ecg diagnosisPTB-XLAUROC ↑90.3#1 / 1
Ecg diagnosisPTB-XLMacro-F1 ↑70.9#1 / 1

Papers and models using this dataset· 38

Papers

Show 15 more papers

Models

#4 of 186 most-used datasets by published papers and models · #4 of 78 ECG

Browse these 27 papers in the research explorer (filtered to PTB-XL)

FAQ

How many ECGs are in PTB-XL?

21,799 ten-second 12-lead ECGs from 18,869 patients in version 1.0.3.

What sampling rate is PTB-XL?

500 Hz, with a downsampled 100 Hz copy of every record provided for convenience.

Does PTB-XL include atrial fibrillation?

Yes. AFIB is one of the 71 SCP-ECG rhythm statements. The released ptbxl_database.csv (read on 11 November 2026) lists 1,514 records with an AFIB code.

What train/test split should I use for PTB-XL?

The authors recommend folds 1 to 8 for training, fold 9 for validation and fold 10 for testing. Folds are patient-wise, and folds 9 and 10 had at least one human evaluation.

Is PTB-XL free for commercial use?

Yes. It is released under CC BY 4.0, which allows commercial use with attribution.

Cite this dataset

Cite this dataset with the fields recorded here. Check it against the publisher before submitting.

PTB-XL [Data set]. (n.d.). physionet. https://doi.org/10.13026/kfzx-aw45
@misc{ptbxlptbxl,
  title         = {{PTB-XL}},
  howpublished  = {physionet},
  doi           = {10.13026/kfzx-aw45}
}

Cite the ChatPPG record

Cite the dated snapshot 2026-10 for a fixed, reproducible version. Please also cite the original publications listed above.

APA

ChatPPG. (2026). PTB-XL: dataset record (Version 2026-10) [Data set]. ChatPPG Research Hub. https://chatppg.com/research/datasets/ptb-xl

BibTeX
@misc{chatppg_dataset_ptb_xl,
  author       = {{ChatPPG}},
  title        = {{PTB-XL: dataset record}},
  year         = {2026},
  month        = nov,
  version      = {2026-10},
  howpublished = {\url{https://chatppg.com/research/datasets/ptb-xl}},
  note         = {ChatPPG Research Hub, Snapshot 2026-10, https://chatppg.com/research/snapshots/2026-10}
}
CITATION.cff
cff-version: 1.2.0
message: "If you use this resource, please cite it as below."
type: dataset
title: "PTB-XL: dataset record"
authors:
  - name: "ChatPPG"
url: "https://chatppg.com/research/datasets/ptb-xl"
repository-artifact: "https://chatppg.com/research/snapshots/2026-10"
version: "2026-10"
date-released: "2026-11-24"

History

  1. Record updated