This guide provides detailed instructions for obtaining and preparing all datasets used in the CLEF project. All datasets are available through PhysioNet, except for AuroraBP, which can be downloaded upon request.
| Dataset | Size | URL |
|---|---|---|
| PTB-XL | ~3.2 GB | physionet.org/content/ptb-xl/1.0.3/ |
| MIMIC-IV-ECG | ~90.4 GB | physionet.org/content/mimic-iv-ecg/1.0/ |
| Chapman | ~5.4 GB | physionet.org/content/ecg-arrhythmia/1.0.0/ |
| Icentia11k | ~1.1 TB | physionet.org/content/icentia11k-continuous-ecg/1.0/ |
| Aurora-BP | ~21 GB | github.com/microsoft/aurorabp-sample-data |
| MC-MED | ~757 GB | physionet.org/content/mc-med/1.0.1/ |
| MUSIC | ~90.2 GB | physionet.org/content/music-sudden-cardiac-death/1.0.1/ |
Please download all required datasets to your local directory for model evaluation.
For model pretraining, you will also need to download the noise data file DATA_noises_real.mat from this PhysioNet link and place it in the dataset folder.
Two of the datasets, Chapman and Icentia11k require additional processing.
For MIMIC-IV, AuroraBP, MUSIC, MC-MED and PTB-XL, no processing is needed.
To prepare the Chapman dataset, please follow these steps:
a. CSV Files
The following files that mark the train/val/test split are included in this repository (originally from the HeartLang repository) and are located in dataset/chapman/:
chapman_train.csvchapman_val.csvchapman_test.csv
b. Preprocessing
Run the preprocessing script (a modified version from HeartLang that keeps the original sampling rate of 500 Hz) to generate corresponding data files:
python preprocess/preprocess_chapman.pyAfter running the preprocessing script, a data folder will be created inside the dataset/chapman directory. This folder will contain the processed .npy files for the train, validation, and test splits. Your directory structure should look like the following:
dataset/
└── chapman/
├── chapman_train.csv
├── chapman_val.csv
├── chapman_test.csv
└── data/
├── train_data.npy
├── train_labels.npy
├── val_data.npy
├── val_labels.npy
├── test_data.npy
├── test_labels.npy
To preprocess the Icentia11k dataset for both beat and rhythm tasks, use the provided script with the following instructions:
Run the Preprocessing Script
Execute the script with the desired arguments. For example, to preprocess both beat and rhythm tasks:
python preprocess/preprocess_icentia.py --data_path <path_to_icentia_data> --output_dir dataset/Icentia11K --task all--data_path: Path to the Icentia data directory--output_dir: Output directory for preprocessed data--task: Which task to preprocess data for (beat,rhythm, orall)
For the following datasets, no data processing is required. You only need to specify the correct data file in config/dataset.
-
MC-MED:
The processed labels for MC-MED are provided indataset/mcmed/variables_encounter_all.csv. -
MIMIC-IV (labels from ECGFounder):
For MIMIC-IV, we use the labels generated by ECGFounder, which are available indataset/mimic-iv/LVEF.csv. -
MUSIC:
The outcome labels for the MUSIC dataset are stored indataset/music/standard-outcome-variables.csv.
Some records are missing from the dataset; a list of these missing files can be found indataset_ori/music/music_missing_files.txt. -
PTB-XL:
No additional processing is needed for PTB-XL. The filesraw100.npyandraw500.npywill be generated automatically underdataset/ptbxl. -
AuroraBP:
No extra processing is required for AuroraBP.