In medicine, the ability to identify diseases and pathologies early can mean the difference between life and death. Even for senior physicians, diagnostic medicine is often a difficult task met with uncertainty. However, the recent explosion in machine learning, AI, and big data has provided the healthcare industry with powerful data driven tools to deliver increasingly accurate medical care. Motivated by these efforts, we trained a neural network on heartbeat data (hosted on to identify and categorize healthy hearts against those with murmurs.

Additional inspiration from the problem posed by Peter Bently et. al. ( who also inspired the Kaggle Heartbeat-sounds Dataset.

What it does

Heart Tester Version 3 uses a convolutional neural network (CNN) in order to categorize a user provided audio recording of heart beats as either normal, murmur, or anomalous.

How we built it

The entire project is written in Jupyter Notebooks The TensorFlow backend for Keras was used to create a CNN. The CNN was trained on labelled heartbeat audio files which were recorded using a stethoscope app for iPhone. This app relied on the iPhones built-in microphone. The training data set also included recordings which do not correspond to heart beats as examples of anomalies.

Challenges we ran into

The training data set is fairly small containing only 176 data points, some of which are unlabelled. This made it difficult to build a model which is both well fit to the training data and which can be validated with confidence.

What we learned

CNNs can be hard to set up, even with nice python modules like Keras. Cell phone microphones are surprisingly effective at capturing heart beat audio. We also learned some of the details of using Keras and selecting parameters for a CNN.

What's next for Heart Tester Version 3

The CNN can be deployed on a server and a client app can be created which is able to record a heart beat sound which can then be catagorized by the server.


The categorization results of this project cannot be guaranteed to be medically accurate; No medical warranty is implied

Built With

  • jupyter-notebook
  • keras
  • python
  • tensorflow
Share this project: