Giter Club home page Giter Club logo

automaticpcgclassification's Introduction

Automatic heart sound classification for pathology detection

This repository contains python implementation of one of the systems described in:

Bozkurt, B., Germanakis, I., & Stylianou, Y. (2018). A study of time-frequency features for CNN-based automatic heart sound classification for pathology detection. Computers in Biology and Medicine, 100(July 2017), 132โ€“143. http://doi.org/10.1016/j.compbiomed.2018.06.026.

This is part of a larger code collection used for running all experiments(90 distinct settings) defined in our paper: system with settings: CNN classifier using feature of Sub-band envelopes computed from asyncronous frames extracted with length of 2 seconds and hop size of 1 second.

Run the code at your own risk and please cite the publication if you use this code in your own work. This repo is not aimed for distributing a well-designed code package but more for quickly sharing part of our code for readers of our manuscript who would like to learn implementation details.

Dependencies (python packages used): numpy, spectrum, soundfile, keras, tensorflow, matplotlib, scipy, resampy, gammatone (https://github.com/detly/gammatone). (list of packages in the environment used for testing is available in environmentPackages.txt)

It is suggested that you create a virtual environment, install dependencies. Following that step, to run the experiments, activate your environment, cd to the 'scripts' folder and run in terminal: $python SingleRepeatedExperiment.py

The script downloads data(~200Mb) from Physionet site (https://www.physionet.org/physiobank/database/challenge/2016/) and runs the experiment. Physionet data involves train and validation sets. Physionet-validation set is used as the test set. Physionet-train set is splitted to form train and validation sets. Data augmentation is applied to train and validation sets.

The script performs 5 random experiments with random splits of train-validation sets (test set is fixed for all experiments). The results are written in data/results folder.

If you would like to simply check results produced for one sample run (5 learning experiments) on the shared system, example resulting files are available in the 'exampleResults4Physionet2016' folder including:

  • png files: plots of learning curves (acc vs epoch#, loss vs epoch#) and ROC curves
  • _res.txt files: contains measures for the system including confusion matrix, sensitivity, specificity, F-measure, etc.
  • other .txt files: log of experiments

Our manuscript discusses tests carried on 90 different settings (various segmentation strategies, feature types, dimensions, CNN models) on our proprietary PCG database. The ROCs for each system setting is shared in folder "results4allSystems_UocDba" which also includes sorting with respect to area under the ROC. All ROCs are computed via averaging results of 5 random experiments (since %20 of data is reserved as test data in each experiment). Scripts folder includes a sample script for running tests for a number of different systems settings: RepeatedExperiment_8systems.py

automaticpcgclassification's People

Contributors

barisbozkurt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.