GithubHelp home page GithubHelp logo

hzam / seqsleepnet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pquochuy/seqsleepnet

0.0 0.0 0.0 526.06 MB

SeqSleepNet: End-to-End Hierarchical Recurrent Neural Network for Sequence-to-Sequence Automatic Sleep Staging

Shell 42.91% Python 44.17% MATLAB 12.92%

seqsleepnet's Introduction

SeqSleepNet

SeqSleepNet

These are source code and experimental setup for the 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.

Currently, SeqSleepNet and two baselines E2E-ARNN and Multitask E2E-ARNN are available (E2E-DeepSleepNet baseline is still missing, we will clean it up and make it available shortly). Output of t nheetworks are also included, so that you can re-produce the results with the evaluation scripts. However, you can repeat the experiments following the steps below.

How to run:

  1. Download the database
  • MASS database is available here. Information on how to obtain it can be found therein.
  1. Data preparation
  • Change directory to ./data_processing/
  • Run main_run.m
  1. Network training and testing
  • Change directory to a specific network in ./tensorflow_net/, for example ./tensorflow_net/SeqSleepNet/
  • Run a bash script, e.g. bash run_seq20.sh, to repeat 20 cross-validation folds.
  1. Evaluation
  • Execute a specific evaluation Matlab script, for example eval_seqsleepnet.m

An example:

Matlab files of the used database can be requested but it's best to request for the orignial MASS database. So far, many told that requests for the database were not responded/took so long. I'd suggest to be patient.

In order to give an idea about the data structure and how to run the networks, I have added a small example

  1. Matlab files and data list of the example stored in ./example_data/
  2. Network training and testing
  • Change directory to a specific network in ./tensorflow_net/, for example ./tensorflow_net/SeqSleepNet/
  • Run a bash script, e.g. run_example_seq10_3chan.sh, to train and test SeqSleepNet-10 with the example data.

Environment:

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

Some results:

Sleep scoring with SeqSleepNet for one subject of MASS databaset:

scoring

Illustration of attention weights learned by SeqSleepNet on five epochs of different sleep stages:

attention_weights

Contact:

Huy Phan

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

License

MIT © Huy Phan

seqsleepnet's People

Contributors

phan0035 avatar pquochuy 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.