Machine Learned Stethoscope

Medical application of machine learning

Github Files
Image 1

Automated Medicine

A big topic in AI is not just the automation of basic skills, but skills performed by highly trained professionals. Doctors have a lot of responsibilities and are very costly. Giving people access to diagnosis and reducing doctors workload are worthy goal for AI and ML research.

Image 2

The Dataset

This project used the ICBHI Respiratory Sound Database. This is a collection of sound data from 126 different patients in Portugal and Greece. The project is a classification task, producing a model that guesses what disease, if any, a patient has based on the sound their lungs produce.

Image 3

The Data

The Dataset contains data collected from different devices using different techniques. The data collection points can be seen here. Each of these different points create different sound data given the same patient. This is necessary as different diseases can be more easily detected in different collection spots. This is why a doctor checks multiple spots when they check your breath in a check-up.

Image 4

Data Processing - 1

As is the case with the majority of machine learning projects, data processing is a big part of this project. The first steps are to take the data, and filter it to fill gaps and smooth imperfections. It was chosen early on in this project to test a CNN-classification network on this data. CNNs handle structures in visual data. So the next step was to take this filtered data and transform it into 2D arrays.

Image 5

Data Processing - 2

From the visual data, the data is then segmented into individual breathing cycles. The data is further augmented to match frequency and breathing cycle times.

Image 6

Data Processing - 3

Lastly, the augmented data is padded to give it a consistent size. CNNs need the same size of data to function. This is why the data is padding into the same size. THe largest data is kept the same and the rest of the data is padded to match.

Image 7

Machine Learning

The final step is the implementation of the CNN model. This passes the data through a series of Convolutional Neural Networks (CNNs) and then through layers of dense neural networks. The CNNs act to find patters withing the visual data. The dense neural networks attempt to classify these patterns into a diagnosis. This project did not have high enough diagnosis to prototype a product for it. However, this was a valuable learning experience. And a great introduction into Machine Learning.

Special Thanks:

Course: Machine Learning with TensorFlow

Opencampus.SH

Return to projects page here:

Return to homepage here: