pquochuy / MultitaskSleepNet

Joint Classification and Prediction CNN Framework for Automatic Sleep Stage Classification
39 stars 19 forks source link

MultitaskSleepNet

These are source code and experimental setup for two sleep databases: SleepEDF Expanded database and MASS database, used in our above arXiv preprint. Although the networks have many things in common, we try to separate them and to make them work independently to ease exploring them invididually.

You need to download the databases to run the experiments again

Currently for MASS database, Tsinalis et al.'s network and DeepSleepNet1 (Supratak et al.) are still missing. We are currently cleaning them up and and will update them very shortly.

How to run:

  1. Download the databases
  2. Data preparation
    • Change directory to [database]/data_processing/, for example MASS/data_processing/
    • Run main_run.m
  3. Network training and testing
    • Change directory to a specific network in [database]/tensorflow_net/, for example MASS/tensorflow_net/multitask_1max_cnn_1to3/
    • Run a bash script, for example bash run_3chan.sh to repeat 20 cross-validation folds.
      Note1: You may want to modify and script to make use of your computational resources, such as place a few process them on multiple GPUs. If you want to run multiple processes on a single GPU, you may want to modify the Tensorflow source code to change GPU options when initializing a Tensorflow session.
      Note2: All networks, except those based on raw signal input like Chambon et al., DeepSleepNet1 (Supratak et al.), Tsinalis et al. on MASS database, require pretrained filterbanks for preprocessing. If you want to repeat everything, you may want to train the filterbanks first by executing the bash script in [database]/tensorflow_net/dnn-filterbank/
  4. Evaluation
    • Go up to [database]/ directory, for example MASS/
    • Execute a specific evaluation Matlab script, for example eval_1maxcnn_one2many.m

Environment:

Contact:

Huy Phan

School of Electronic Engineering and Computer Science
Queen Mary University of London
Email: h.phan{at}qmul.ac.uk

License

CC-BY-NC-4.0