Prologue

Recenly the interest on wearing device is increasing, and the convolutional neural network (CNN) supervised learning must be one strong tool to analyse the signal of the body and predict the heart disease of our body.

When I scanned a few reseach papers, the 1 dimensional signal and the regular pattern of the heart beat reminds me of musical signals I researched in that it requires a signal process and neural network, and it has much potential to bring healthier life to humar races1, so I want to present the introductory post. I would post a brief introduction first, and then would enlarge it gradually when I have more time and more understanding.

Heart beat can be regarded as a regular electronical signal. Similar to music I was working on, and it is simpler because the periodic pattern of it is more obvious.

First of all, we can consider an 1D convolutional neural network model to train the signal data. I want to avoid to call this heart beat is time series signal. It is almost periodic. Then, 1D CNN can be enough. The research group at Stanford University is doing this research2.

There was also a research to using a 2D image CNN model.

When I overlooked the paper, however, it is not clear 2D CNN model should be superior. I think their data augmentation was critical to improve the precision, not the 2D convolution.

However, the approch to this cardiological research using Fourier transform is too intriguing. The periodic pattern of the normal heart beat signal would cause simple discrete Fourier transfomed data, and it will be easily distinguishable from irregular heart beat by disease.

There was also an approch to using STFT (short time Fourier transform) of the signal. I had used the spectrogram from STFT to classify musical genres for my own work, and it was very effective. However, STFT is useful when the signal has timly evolving characteristic. The research paper is not open, so I did not read it yet.

At Github, I found an open source for 1D CNN supervised learning. It was based on the codes they joined the CINC competition3.

This deep open source includes two approaches, feature based one and deep learning one. I skipped feature based one, and focused only on CNN one.

Stanford Group also opend their source, but did not open the data they used for the research paper, and they used a dosen of features of the trainset. This CINC source uses only 4 categorized trainset. If the differece of data from different category is clear, it could also improve the quality of training.

The open datasets for the ECG trainers at Github is provided by Physionet. In my observation, I have not yet found the good ECG Github open source using deep learning and MIT-BIH database, so this is my first goal.

Recently, I have an interesting and brief open source for flask-based image classifying web-application. Using its idea, we can make a web-app to predict from uploaded CSV and can deploy the app easily using a Docker. This work is going to be my 2nd goal.

My 3rd goal is to test other dataset using the trained model.


  1. While proceeding this project, I have realized the apple watch started applying the ECG diagnosis app. ↩︎

  2. Look at the introduction at their research blog. https://stanfordmlgroup.github.io/projects/ecg/ and https://stanfordmlgroup.github.io/projects/ecg2/ ↩︎

  3. The linked webistes opened the awarded sources, and mostly based on Matlab. ↩︎