Skip to content

caoqing-ruijing/ECG_dataset_translation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ECG dataset translation

This repository translate the public ECG dataset PTB-XL into a compress json format and train and validation set. For the purpose of ECG EKnet training.

Requirements

  • wfdb;
  • gzip;

Usage

1. trans the ECG file into json:

first set the path in ptbXL2json.py:

input_dir = './ptb-xl-a-large-publicly-available-electrocardiography-dataset-1.0.1/'
out_dir = './orginal_jsonzip_ecgzip/'

then run with: python ptbXL2json.py

2. split the PTB_XL into train val:

first set the path in ptbXL2trainval.py:

input_csv = './ptbxl_data.csv'
data_dir = './orginal_jsonzip_ecgzip/'

then run with: python ptbXL2trainval.py

this will generate following csv for training: k0_train.csv k0_val.csv K0_train_val_stats.csv

About

ECG dataset translation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages