GithubHelp home page GithubHelp logo

deepheart's Introduction

DeepHeart

DeepHeart is a neural network designed for the [2016 Physionet Challenge] (http://physionet.org/physiobank/database/challenge/2016/) in predicting cardiac abnormalities from phonocardiogram (PCG) data. The challenge provides heart recordings from several patients labeled as normal or abnormal. It is difficult to predict patient health from PCG data because of noise from several sources: talking, breathing, intestinal sounds, etc.

To combat the excessive amount of noise and relatively small sample size, a convolutional neural network is trained using Google's [Tensorflow] (http://github.com/tensorflow/tensorflow). Tensorflow provides an easy to use interface for compiling and efficiently running neural networks.

Ideally the raw wav files would be fed into a very deep Tensorflow network and, with some careful regularization, the model would learn to accurately separate signal from noise. To reduce the cost of training, the number of hidden units is reduced in favor of some old school feature engineering: the fast fourier transform (FFT). The FFT is a signal processing technique for converting a signal into a frequency domain. The original signal is also filtered with a high pass Butterworth filter aimed at removing noise above 4Hz (or 240 beats per minute). The filtered signal is again transformed to it's approximate frequency domain. A combination of the above fourier coefficients are fed into the convolutional neural network.

Installing

To run, set up a virtual environment (ensure python2.7, virtualenv, and pip are in your PATH)

>> cd deepheart
>> virtualenv env
>> source env/bin/activate
>> pip install -r requirements.txt

Download the physionet dataset

>> wget http://physionet.org/physiobank/database/challenge/2016/training.zip
>> unzip training.zip

Install tensorflow from Tensorflow's site (pip install recommended)

Build a feature vector from the raw data and train the CNN

>> python deepheart/train_model.py <path_to_physionet_data> <do load previously saved data>
e.g.,
>> python deepheart/train_model.py training/ f

Note: by default this saves tensorboard statistics to /tmp which can be launched using

>> tensorboard --logdir=/tmp/train

Performance

Currently physionet data is scoring using the mean of sensitivity and specificity (Fraction of True positives and True Negatives). These summaries are calculated and logged in tensorboard as well as printed to terminal.

Currently, the tensorflow CNN model converges to a mean score of 0.78.

Disclaimer

This software is not intended for diagnostic purposes. It is only designed for the physionet data science competition. All statements have not been evaluated by the FDA. This product is not intended to diagnose, treat, cure, or prevent any disease.

deepheart's People

Contributors

jisaacso avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.