Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 3 KB

readme.md

File metadata and controls

53 lines (41 loc) · 3 KB

XSleepNet

XSleepNet


**NOTE: the code is not completed yet. Currently, only setups for MASS, SleepEDF-20, and SleepEDF-78 databases are availble, those for Physionet2018 and SHHS will be updated soon.

These are source code and experimental setup for SHHS, MASS, Physionet 2018, Sleep-EDF Explanded (both version with 20 and 78 subjects) databases. We try to keep the experiments separately for each database to ease exploring them invididually.

The pretrained models can be downloaded from Part 1/2 and Part 2/2 to be used in combination with the code to re-produce the results in the paper.

How to use:

  1. Download the databases. This may require to apply for licences (for example, MASS and SHHS). Information on how to obtain it can be found in the corresponding website. WE recommend to start with Sleep-EDF Expanded database which is the smallest one.
  2. Data preparation
  • Change the current directory corresponding to the database you want to experiment with
  • Run data preparation steps in run_all.m
  1. Network training and testing
  • Change directory to a specific network in ./tensorflow_nets/, for example ./tensorflow_nets/xsleepnet2/
  • Run a bash script, e.g. bash run_1chan.sh. This may take a long time depending on the resouces available.
  1. Evaluation
  • Execute the steps in run_all.m to compute performance metrics.


**NOTE for SleepEDF-20 and SleepEDF-78: meta information (e.g. light on time, light off time, etc.) are needed to process the edf files. These information is given in the directory in sleepedf-20/__sleepedf20_meta_info/ and sleepedf-78/__sleepedf78_meta_info/, respectively. They should be copied into the directory where the databases are stored.

Environment:

  • Matlab v7.3 (for data preparation)
  • Python3.7
  • Tensorflow GPU 1.x (x >= 3) (for network training and evaluation)
  • numpy
  • scipy
  • h5py
  • sklearn

Some results:

Sleep scoring results with the networks across the experimental databases:

scoring

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