Skip to content

Used RNN architectures to classify the respiratory sound samples into four different categories. This will in turn help detect respiratory diseases in patients.

Notifications You must be signed in to change notification settings

yashmaniya0/Respiratory-Sound-Classification-with-BiGRU-and-BiLSTMs

Repository files navigation

Respiratory Sound Classification

In this project, we construct a hybrid framework for the classification task of respiratory sounds. The framework initially uses a wide range techniques to extract time-domain and spectral features. Then it trains BiGRU with Attention mechanism to extract more advanced features of respiratory sounds for XGBoost to classify.

Dataset

We use a dataset of respiratory sounds from the International Conference on Biomedicine and Health Informatics (ICBHI 2017) Challenge. The dataset has 539 audio files, 539 text files and 539 .hea files corresponding to 539 patients.

  • .wav audio files contain respiratory audio samples
  • .txt files contain data indicating the presence of crackles and wheezes at different intervals of time in audio sample. ( columns = [start time, end time, crackles, wheezes] )
  • .hea files have information about the internal organ part from where the sound is recorded.

Access the Dataset from here : download dataset

Feature Extraction

We extract two sets of features from each sample of respiratory sounds :

  • Time-Domain Features :
    1. Short-term Average Zero-crossing Rate
    2. RMS Energry
  • Spectral Features :
    1. Spectral Centroid
    2. Spectral Slope
    3. Spectral Contrast
    4. Chromaticity
    5. MFCC

After feature extraction, the dataset has shape : (539, 862, 47).
Here 539 is number of datapoints (number of patients), 862 is the frames we extract from each audio sample and 47 are the number of extracted features each audio samples have.

Training Models

We trained different RNN architectures to get the best results. Following are two of them :

  • Initial Model :

Bi-LSTM + Deep Layers

  • Final Model :

Bi-LSTM + Deep Layers + Attention Layer

Results

Bi-LSTM + Deep Layers + Attention Layer

About

Used RNN architectures to classify the respiratory sound samples into four different categories. This will in turn help detect respiratory diseases in patients.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published