This is an implementation based on this paper, "ECG arrhythmia classification using a 2-D convolutional neural network", Tae Joon Jun et al., CVPR 2018." with some personal modifications
This repo adapts MIT-BIH Arrhythmia Database as training and testing dataset.
The download file can be found under /mit_arrythmia_dat/
dataset_downloader.sh
the script is modified from MIT-BIH-Arrhythmia-Downloader
To turn ECG signals to images, the script can be found under /mit_arrhythmua_dat/
readDataset.py
The script will output EIGHT types of heart beats based on the annotations that the officials provide. A heart beat is defined by the peak of R waves according to the contents on the websites.
-
According to the paper, each images is form by the following formula
T(Qpeak(n − 1) + 20) ≤ T(n) ≤ T(Qpeak(n + 1) − 20)
where n is the number of peak and 20 is the time slice.
Following this formula to produce images results in that the length of each image is not constent. Therefore, in this repo the formula is changed to the following,
T(Qpeak(n) - 96) ≤ T(n) ≤ T(Qpeak(n) + 96)
-
The output size of images are 196x128 instead of 128x128 proposed in the paper.
According to the paper, each image is cropped and resized to 9 versions. ...
There are more contents to be fulfilled in the future.