Accurate Identification of Cardiac Anomalies through Deep Learning

CSEF · 2019 Computational Systems & Analysis (Senior Division Only)

Overview

Objectives The objective of this research was to develop a neural network to automatically identify arrhythmia in the electrocardiogram (ECG) at diagnostically accurate levels. Methods 108,240 heartbeats were extracted from the MIT-BIH Arrhythmia Database, comprising 11 beat types (normal beat + 10 types of arrhythmia) using the WFDB software package. Heartbeats were constructed encompassing the PQRST complex, from 0.25s before to 0.45s after the R peak, for a total of 256 data points per beat at 360 Hz. The heartbeats were converted into 256x256 grayscale images and labeled by heartbeat type. The images were randomly shuffled and divided 80/10/10 into training, validation, and test sets. A convolutional neural network comprising 4 convolutional layers and 2 fully connected layers was developed in Python using the Keras and TensorFlow machine learning packages. The network was trained over 500 epochs, achieving maximum training and validation accuracy without overfitting. Misclassified heartbeats were reviewed to identify potential sources of error during hyperparameter tuning. The test data set was evaluated by the network. Results The neural network achieved accuracy of 99.06% on the test data with an f1 score of 0.99. Individual beat level precision ranged from 0.846 to 1 and recall ranged from 0.733 to 0.999. Beat types of smaller sample size had precision and recall at the lower end of the range, although still at diagnostically useful levels. Conclusions This research demonstrates that deep convolutional neural networks can accurately classify cardiac arrhythmia from heartbeats that have been converted into images. This approach requires no feature engineering or noise reduction, producing high precision and recall results at diagnostically meaningful levels across all arrhythmia beat types. Although this project used a relatively small amount of data on a consumer-class GPU, the results suggest that this is a promising approach for further research at larger scale.

Summary statement

I developed a convolutional neural network that automatically identifies cardiac arrhythmia in ECG data at diagnostically accurate levels.

Help received

I designed and programmed the neural network myself.

Competition history

  • CSEF 2019 Computational Systems & Analysis (Senior Division Only) · Entry S0819

Resources

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: California Science & Engineering Fair public projects

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google