Skip to content

Implements data-driven approaches for the detection of coughs in patients with respiratory illnesses.

Notifications You must be signed in to change notification settings

mhdadk/cough-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cough Detection

This project demonstrates different data-driven approaches for the detection of coughs in patients with respiratory illnesses. The dataset used is available here. It consists of 135 cough files and 52 non-cough files from Google's AudioSet, 40 cough files and 1,960 non-cough files from the ESC-50 dataset, and 256 cough files and 10,801 non-cough files from the FSDKaggle2018 dataset. The utils/download_audioset.py file can be used to download the files from AudioSet. The following approaches were investigated:

  • MobileNetV2: This implementation involves MobileNetV2. In classifiers/mobilenetv2/main.py, the AudioDataset class from classifiers/mobilenetv2/AudioDataset.py is used to load data, the train function from classifiers/mobilenetv2/train.py is used to train the net, the validate function from classifiers/mobilenetv2/validate.py is used to validate, and finally, the test function from classifiers/mobilenetv2/test.py is used to test.
  • SVM: The Net class in feature_extractor/net.py creates the network architecture detailed in this paper and loads the parameters from feature_extractor/mx-h64-1024_0d3-1.17.pkl. This network is then used in feature_extractor/extract_features.py to extract 1024-dimensional feature vectors from files in the dataset, which are saved in features/X.npy and their associated labels are saved in features/labels.pkl. This implementation is loosely based on this one. Finally, the feature vectors in features/X.npy and their labels in features/labels.pkl are used in classifiers/svm/main.py to train a support vector machine with a radial basis function kernel to classify coughs and non-coughs.
  • Gaussian Naïve Bayes, Independent Components, and AdaBoost: The same feature extractor in the feature_extractor directory is used to compute 1024-dimensional feature vectors, which are stored in features/X.npy and with their associated labels in features/labels.pkl. Next, in the classifiers/gnb/main.py file, 512 independent components are extracted from each of the 1024-dimensional feature vectors. 5 Gaussian Naïve Bayes classifiers are then combined and trained using the AdaBoost algorithm to classify coughs and non-coughs.

About

Implements data-driven approaches for the detection of coughs in patients with respiratory illnesses.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages