Skip to content

papichoolo/heartclassification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heartclassification

Implemented a Heart Audio Classifier using Methods of CNN and RNN in Deep Learning.

Dataset used;

For the Heart Sound Challenge, the most ideal dataset to use was the PhysioNet/PASCAL database because the dataset's audio file has been taken via both clinical methods (i.e. a Digital Stethoscope) and also general methods (i.e. an iPhone Stethoscope app).
Note: The Repo does not contain the audio files for Heart Sounds, this repo only showcases the code for the algorithms used

Main code is shown in Classification.ipynb

CNN Approach

In the CNN approach, a spectrogram was made using a Short Term Fourier Transform of all the Audio Files using the tf.signal module. All the spectrograms were then all spaced out to a consistent length for the CNNs input size.
Screenshot_20230215_134958

The Convolutional Neural Network was used for a multiclass Image Classification using the tensorflow keras library. It has 2 Conv2D layers which gets flattened into a Fully Connected Layer which classifies audio data.

download (1)

RNN Approach

For The RNN Approach, we first built a dataloading function loading audio file and extracting the features using Mel Frequency Cepstrum Coefficients (MFCCs)

download (6)

We then built a Bidirectional LSTM Model with the extracted Features. Bidirectional LSTM (BiLSTM) is a recurrent neural network. Unlike standard LSTM, the input flows in both directions, and it’s capable of utilizing information from both sides. It’s also a powerful tool for modeling the sequential dependencies between audio signals in both directions of the sequence.

lstm

Test-set accuracies

The outcome after running both the models: -

CNN Model - It achieved an Accuracy of 80%. RNN Model - It achieved an Accuracy of 75%

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors