Close
0%
0%

Early and low cost detection of Heart Failure

Heart Failure is a debilitating condition that most old people encounters. A PoC uses coded signals, Doppler and a sound ML classifier.

Similar projects worth following
Heart failure (HF) is a complex heart syndrome. It prevents the heart from fulfilling the circulatory demands of the body. A patient is characterized by breathlessness, ankle swelling and fatigue. Medicine doctors formulated several criteria to determine the presence of HF, however there is no remedy.

We propose to use a point of care device, composed of a low cost Doppler device with a trained classifier ,to detect suspicion of HF in primary care.

In order to detect HF with a ML classifier, we train it to recognize features in sounds from the Physionet Cinc or similar competitions.

In our case, signals acquired with a low cost fetal Doppler, are connected to a Linux box hosting the classifier and user GUI. It records heart beats without needs of any gel. We will later code the Doppler signal to obtain more features, specially about fibrous tissues. In a further iteration we will implement the ML classifier on a low cost controller.

Short list of the features:

* This device can measure the acoustic impedance of heart and lung tissues even in non medical environment, no need to move to a medical center.

* This device measures the acoustic impedance of tissues by a home carer, without need for medical staff.

* This device mitigate issues due to unanticipated skin colors, sweating or medical conditions, as it can "phone home" if it found anomalous results. Conversely it receives updates automatically, so what is learn from a single case, is send to every devices at their next update.

* It is very low cost: Certainly less than $150 in its final version.

* It can be used for a long time without creating skin problems, as it uses no gel and is easy to clean.

Actually ultrasound specialists also use such artifacts to detect cysts, tumors, calcifications. B-line is an artifact that is used in ultrasound imaging (or lack of!) to infer medical conditions.

Acoustic impedance:

It is well known that the density of degenerated tissues is lower than those of normal tissues. This is due both to intracellular and extracellular damages.

While using machine learning to detect heart failure is not new, using ML features symptomatic of fibrous tissues is entirely new.

Based on the acoustic impedance the tissue could be classified as: normal, degenerated, granulated and fibrous. Each category indicates specific problems mostly in connective tissues.

Changes in tissues acoustic impedance alone, do not mean in themselves that the medical condition changed. What makes it accurate is that this device can recognize signatures of degenerated tissue thanks to modern statistical technologies such as Hidden Markov Chains.

Sourcing the Transducer

A critical component of this system is the ultrasound transducer. A piezoelectric transducer element transmits energy into the body and receive the resulting reflections.

While we use in our PoC a commercial 3 MHz ultrasound probe, it is possible to build one. The DGH 6000 Scanmate A transducer consists of a single piezo - ceramic element that runs at a center frequency of 10.0 MHz nominal.

Please have a look at this excellent project for suggestions of bill of materials:
https://hackaday.io/project/9281-murgen-open-source-ultrasound-imaging

High-Voltage Transmitters (Pulser)

We need to transmit two frequencies for “0” and “1”, because we code our transmission with pulse’s ID, time’ ID and ECC (maybe Golay code).
We transmit those information in order to gather impedance information.

High-voltage pulsers quickly switch the transducer element to the appropriate programmable high-voltage supplies to generate the transmit waveform.

To generate a simple bipolar transmit waveform, a transmit pulser alternately connects the element to a positive and negative transmit supply voltage

Portable Network Graphics (PNG) - 139.30 kB - 06/08/2017 at 08:16

Preview Download

  • 1 × 3 MHz low cost ultrasound probe It costs only $50, but indeed it does not offer beam forming!
  • 1 × A ultrasound pulser This is done with transistors and other discrete components!
  • 1 × Analog front end It uses ordinary operational amplifiers
  • 1 × ML classifier To detect features in the training set, I used a modified subset of jAudio. The training set comes from Physionet, but there are other freely accessible on the net. The classifier is a HMM derived from a speech processing project. I want to use a HMM because it is able to predit states and offer an explanation of the model (the probability of transitions between states)

  • Heart beat detection and segmentation

    Jean Pierre Le Rouzic06/15/2017 at 21:18 0 comments

    You can find a good description of the current detection and segmentation of the heart rate on the Padirac Innovation web site:
    https://padiracinnovation.org/2017/06/15/heart-beat-detection-and-segmentation/

    Why is segmentation so important? Because we want to be able to explain our classification result. This means that we share understanding and vocabulary with cardiologists. This is opposed to current approaches to deep learning like "deep forest" that fit their internal model with features that might be only remotely connected to the physiology.

    Why is it important to be able to understand what is going on at physiological level? Because the horror stories here are studies that claim to be able to predict with 98% accuracy re-hospitalization next year in diseases such as diabetes or heart failure, simply by looking at medical records. Obviously one does not need deep forest algorithms to predict that someone with a HF condition will be re-hospitalized next year.

    We must make credible statements, if we want MDs and scientists to take us seriously.


  • A library, a few modifications to GUI and feature detection

    Jean Pierre Le Rouzic06/15/2017 at 06:56 0 comments

    In order to work toward a controller implementation, I separated the core Hjertle (early heart failure detection) and its GUI.
    The new Hjertle library could be found at:
    https://github.com/Hjertesvikt/HjerteLib/

    Minor modifications were made to the GUI and to feature detection:
    https://github.com/Hjertesvikt/Hjerte

  • A milestone between phase 0 and phase 1.

    Jean Pierre Le Rouzic06/11/2017 at 10:35 0 comments

    When I started this project I stated there would be several phases:

    - The phase 0: Fetal Doppler and Linux box, which was possible for you to implement from the onset thanks to the code from Physionet 2016.

    - The phase 1 is a dedicated device (Arduino?) combining a 3Mhz ultrasound probe and associated software .

    - The phase 2 hardware (phase 1 + fibrous tissue detection) will be also under a BSD or MIT license.

    Today we achieved a milestone between phase 0 and phase 1. A HMM software for Hjerte has been uploaded on Github in the master branch.
    https://github.com/Hjertesvikt/Hjerte

    It enables to train a HMM and classify another heart sound file with respect to this HMM. This software addresses the limitation I perceived in the Physionet code (no GUI, huge computing needs, black box solution). There is still no device, so you still have to use a Linux box (whatever kind as long as it runs Java 1.2) with a commercial low cost Fetal Doppler.

    I will now take a break to think about my other HaD project, and then resume the work toward phase 1. Comments or suggestions are heartily welcomed!

  • A GUI to manage HMMs

    Jean Pierre Le Rouzic06/07/2017 at 17:43 0 comments

    Our tool is intended to explore several HMMs and find how they perform on different training sets. This implies there is a need to manage HMMs.
    A HMM may have an author, an intended usage, belonging to a portfolio, and having a name. It can be saved and loaded and shown in a pretty way.
    However this is mostly not implemented at the moment, it is just the initial effort.
    https://github.com/Hjertesvikt/Hjerte/tree/Hjertesvikt_draft_1/


    Stay tuned!

  • New branch

    Jean Pierre Le Rouzic06/04/2017 at 21:59 0 comments

    The previous branch ..../draft_0 was removed and replaced by :
    https://github.com/Hjertesvikt/Hjerte/tree/Hjertesvikt_draft_1
    It brings a slightly different GUI and a better detection of small features in heart sounds.

  • Heart sound files

    Jean Pierre Le Rouzic06/04/2017 at 09:22 0 comments


    Not much to show, but some news: Sounds files have problems that I did not anticipated. What I was expecting from the analysis of Physionet 2016 submissions was noise, spikes, weird amplitude and similar distortions of the signal.
    What I found was different, there is little noise while you filter it a bit, there are few spikes.
    However sometimes the signal is biased (more negative values than positive), the signal also appears to have little in common with textbooks, I can easily detect S1 and S2 events, but it is difficult to find S3 and S4.

    When you hear the sounds, half of them looks weird, I am not a cardiologist, but I find it difficult to find what I could hear in a "textbook" heart sound.
    This makes me think again about the Physionet 2016, successful submissions where mainly about heavily filtering, dealing with spikes with sophisticated algorithms and finding characteristics (features in ML slang) that encompass the whole file such as RR variability as in:

    https://en.wikipedia.org/wiki/Heart_rate_variability

    Clearly my approach is different, I focus on what identify a heart beat, which is entirely new. But I still plan to implement the RR variability analysis and tied it to my HMM classifier which will become quite hybrid in the process.

  • A Github account and some code

    Jean Pierre Le Rouzic05/27/2017 at 08:01 0 comments

    We have added a tool to explore a tiny training set (100 files) and training a HMM.

    There is no code for classification at the moment, only for training.

    This is a draft, whose purpose is to be open and provide hints to where we are aiming, but in no ways the quality of the code should be asserted, we expect much, much work on it.

    It is deliberately in Java 1.2 for making it easy to port it to controllers that support Java or to a language that have an enough similar syntax (for ex. Go)

    The Github account for Hjerte:
    https://github.com/Hjertesvikt/Hjerte

    The branch where the new code was pushed:

    https://github.com/Hjertesvikt/Hjerte/tree/Hjertesvikt-dratf_0

  • Challenges in writing a Viterbi function for heart sounds detection.

    Jean Pierre Le Rouzic05/03/2017 at 07:28 0 comments

    There is an update on https://padiracinnovation.org/2017/05/03/early-and-low-cost-detection-of-heart-failure/

    Basically it discusses of the need and challenges of writing a Viterbi function for heart sounds detection. I just wrote one in Java which looks good, but it needs to be improved in various aspects.
    One improvement is indeed to port this Java implementation to a microcontroller, maybe on a Atmel device which includes a tiny Java machine. However this is planned for the end of the year, currently there are other stuff to work on.

  • Start of the project

    Jean Pierre Le Rouzic03/21/2017 at 20:31 0 comments

    What I did until now is summarized here:
    I bought a fetal Doppler from Amazon and tested it on myself.

    I found there is no need for gel, and that it is quite easy to find my own heart. It is probably much more difficult to find the heart of a baby in the womb. Future mothers must be warned that it is not a magic tool, my heart is probably one hundred times bigger than a fetus heart. In retrospect those fetal Doppler are impressive!

    I acquire my heart sounds and transfered them on a Linux box. There I studied their spectrum and other characteristics.

    Next I studied the Physionet Cinc 2016 challenge in order to train their most successful software on my heart sounds.

    Alas I do not have bought the Matlab libraries that are needed and an attempt to use Octave (open source alternative) gives no satisfactory outcome.

    Anyway as my goal is to implement this on a low cost processor of the Arm family or even less powerful, Matlab/Octave was out of question.

    As I can program in Java I wrote my own program, which mimics the winning physionel 2016 code. I have great confidence that I can translate this Java code in machine language (I used to work on a small Java machine long ago). And the Java code could be a reference implementation.

View all 9 project logs

  • 1

    At the moment all you need is to buy a Fetal Doppler ($70) and connect it to a Linux box, where you will have downloaded, both the Physionet 2016 training set and the winning Matlab code (and associated libraries) by Christhian Potes and Saman Parvaneh.

  • 2

    As people asked for a Github repository, I created one with Potes and Parvaneh submission to Physionet 2016.
    However I added missing libraries and a documentation folder.
    In my view those two docs are worth much more than the code. They tell you the same story that Kaggle and similar competitions taught: The deep learning algorithm is not interesting, what has value is the feature detection, and it is hard!
    Indeed this remark should have a strong impact on design of any medical device.
    The Github is:https://github.com/Hjertesvikt/Physionet_2016

  • 3

    About copywrites, licenses, regulations and safety:
    - The code of Potes and Parvaneh, indeed belong to them and is licensed in GPL.
    - The current hardware (phase 0: Fetal doppler and Linux box), you have to buy it somewhere as I do not provide it, so if they have licenses, you are responsible to behave accordingly.
    - The phase 1 device, that I will design (a combo of a 3Mhz ultrasound probe and associated software providing roughly the same services as the fetal doppler, the Linux box and the code of Potes and Parvaneh) will be under a liberal open source like BSD or MIT.
    - The phase 2 hardware (phase 1 + fibrous tissue detection) will be also under a BSD or MIT license.
    - The software for phase 2 hardware will be either a community version under a BSD or MIT license or a commercial license whose code may differ from the community version.
    - About regulations: In most countries you cannot use this project in a medical context. It as to be approved beforehand by regulators. I will probably apply in EU for a device *helping to* and not *making* a diagnosis. It will be in a year or two and I will need lot of money and help from people at that time. Be careful, even if my organization obtain someday an EU authorization, that will not grant any authorization to other makers except the current right to study this device and for personal usage.
    - About safety, be careful, piezo-electric drivers have voltages in the hundred range. If they are not isolated (battery/transformer) they are dangerous. Same for any gel that you could buy by yourself. Another thing is about the outcome of the device, it may vary depending on the gender, age, weight, ambient noises, etc... It is not safe to assume that it is correct if you are not trained.




View all 3 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates