Use the scripts in master repository to generate synthetic ECG images for the PTB-XL dataset.
Download (and unzip) the PTB-XL dataset. We will use ptb-xl as the folder name that contains the data for these commands (the full folder name for the PTB-XL dataset is currently ptb-xl-a-large-publicly-available-electrocardiography-dataset-1.0.3), but you can replace it with the absolute or relative path on your machine.
Add information from various spreadsheets from the PTB-XL dataset to the WFDB header files:
Add the file locations for the synthetic ECG images to the WFDB header files. (The expected image filenames for record 12345.png are of the form 12345-0.png, 12345-1.png, etc., which should be in the same folder.) You can use the ptb-xl/records100/00000 folder for the train_model step:
Remove the waveforms, certain information about the waveforms, and the demographics and diagnoses to create a version of the data for inference. You can use the ptb-xl/records100_hidden/00000 folder for the run_model step, but it would be better to repeat the above steps on a new subset of the data that you will not use to train your model:
Task Summary
Use the scripts in master repository to generate synthetic ECG images for the PTB-XL dataset.
Download (and unzip) the PTB-XL dataset. We will use
ptb-xl
as the folder name that contains the data for these commands (the full folder name for the PTB-XL dataset is currentlyptb-xl-a-large-publicly-available-electrocardiography-dataset-1.0.3
), but you can replace it with the absolute or relative path on your machine.Add information from various spreadsheets from the PTB-XL dataset to the WFDB header files:
Generate synthetic ECG images on the dataset:
Add the file locations for the synthetic ECG images to the WFDB header files. (The expected image filenames for record
12345.png
are of the form12345-0.png
,12345-1.png
, etc., which should be in the same folder.) You can use theptb-xl/records100/00000
folder for thetrain_model
step:Remove the waveforms, certain information about the waveforms, and the demographics and diagnoses to create a version of the data for inference. You can use the
ptb-xl/records100_hidden/00000
folder for therun_model
step, but it would be better to repeat the above steps on a new subset of the data that you will not use to train your model: