| Format | 12-lead · 10 s · 500 Hz · WFDB |
|---|---|
| Patients | 92 |
| Records | 659 |
| Leads | 12 |
| License | ODbL 1.0 |
| Origin | Beth Israel Deaconess Medical Center — USA — Boston, MA |
The open demo subset of MIMIC-IV-ECG: 659 twelve-lead diagnostic ECGs from
92 patients at Beth Israel Deaconess Medical Center, in WFDB format at
500 Hz for 10 seconds. Records link to the rest of MIMIC-IV through
subject_id and study_id, and each carries an acquisition timestamp.
Two things shape how ECGBench splits it. First, the demo ships
no labels — record_list.csv holds identifiers and timestamps only,
and machine_measurements.csv (the report text and measurements) belongs
to the full release, not this one. There is nothing to stratify on, so the
split is purely patient-grouped. Second, records per patient are very
uneven — 1 to 52, median 5 — so grouping by subject_id is essential, and
fold sizes vary as a consequence (60 to 87 records across 10 folds).
For the ~800,000-record credentialed release, see [MIMIC-IV-ECG]({{ ‘/datasets/mimic-iv-ecg.html’ | relative_url }}).
| Property | Value |
|---|---|
| Lead order in every header | I, II, III, aVR, aVF, aVL, V1-V6 — aVF and aVL are transposed relative to the usual convention |
| Labels | none in this subset |
| Age / sex | not included |
| Records per patient | 1 to 52 (median 5) |
| Timestamps | date-shifted into the future by de-identification |
| Version | Records | Note |
|---|---|---|
| original | 659 | all records, with is_valid + quality_issues |
| clean | 645 | 97.9% pass rate |
| excluded | 14 | 12 with NaN samples, 13 with one or more flat leads (overlapping) |
ecgbench splits \
--dataset mimic_iv_ecg_demo \
--data-path /path/to/mimic-iv-ecg-demo/0.1/
from ecgbench import ECGDataset, ecg_collate_fn
from torch.utils.data import DataLoader
dataset = ECGDataset(
"mimic_iv_ecg_demo",
split="train",
version="clean",
data_path="/path/to/mimic-iv-ecg-demo/0.1/",
)
loader = DataLoader(dataset, batch_size=16, collate_fn=ecg_collate_fn)
for batch in loader:
signals = batch["signal"] # (B, 12, 5000) at 500 Hz
record_ids = batch["record_id"] # study_id values
break
# This dataset stores aVF BEFORE aVL, so signal[4] is a different physical
# lead here than in every other dataset. Selecting by name fixes that:
ds = ECGDataset("mimic_iv_ecg_demo", split="train",
data_path="/path/to/mimic-iv-ecg-demo/0.1/",
leads=["I", "II", "aVL", "V5"])
ds.lead_names # ('I', 'II', 'aVL', 'V5') — aVL is taken from stored row 5
# labels=True raises LabelsUnavailableError here: the demo ships none.