Git Product home page Git Product logo

multi-scored-sleep's Introduction

Multi-Scored Sleep Databases: How to Exploit the Multiple-Labels in Automated Sleep Scoring

In this repository we provide an easy-to-use Google Colab Notebook to evaluate DeepSleepNet-Lite [Fiorillo et al.] and SimpleSleepNet [Guillot et al.] architectures, as described in our [arXiv-preprint]. We evaluate the pre-trained models on three open access datasets DOD-H, DOD-O, IS-RC. Specifically, for each dataset, we upload one of the k-fold pre-trained model.

[arXiv-preprint] Fiorillo L, Pedroncelli D, Favaro P, Faraci FD. Multi-Scored Sleep Databases: How to Exploit the Multiple-Labels in Automated Sleep Scoring. arXiv preprint arXiv:2207.01910. 2022 Jul 5.

Developed by: Pedroncelli Davide, Fiorillo Luigi

Requirements

To run our code, you need:

  1. Google Account
  2. Google Drive
  3. Google Colab

Usage

  1. Download data required (link)
  2. Unzip the file and upload the folder "Experiments" to your Google Drive
    (note do not modify the name/content of the downloaded data, any change could affect the correct execution of the notebook)
  3. Open our Google Colab Notebook (link)
    (note To speed up the execution, a connection to a GPU runtime is recommended)

Now you are ready to go and to use our Notebook!

The first step is to run the code cell/block:

# Clone git, install libraries
!git clone https://github.com/biomedical-signal-processing/multi-scored-sleep
!pip install torchcontrib

# Mount Drive
from google.colab import drive
drive.mount('/content/drive')

Mounting your Drive is required to access previously uploaded data.

Then, you can run three code cells/blocks:

1) !python /content/multi-scored-sleep/SSN/predict.py "DODO" "LSSC"
2) !python /content/multi-scored-sleep/SSN/predict.py "DODO" "LSSC"

These two code blocks perform a prediction with DSNL and SSN respectively.
You can specify two parameteres, as to execute the code on different dataset and pre-trained models:

  1. Dataset: "DODO", "DODH" or "ISRC"
  2. Pre-trained Model: "LSSC", "LSU", "base"
3) !python /content/multi-scored-sleep/plots/plot_subj.py "DSNL" "DODO" "LSSC" "1"

This code block generates the hypnogram and the hypnodensity-graph for a specific test-subject:

  1. Figure_Hypnogram.png
  2. Figure_Hypnodensity.png

You can specify four parameteres:

  1. Architecture: "DSNL", "SSN"
  2. Dataset: "DODO", "DODH", "ISRC"
  3. Pre-trained Model: "LSSC", "LSU", "base"
  4. Subject Index: from 0 to 4 for DODO, 0 for DODH, from 0 to 6 for ISRC
    (for each dataset each index correspond to a different test-subject)

(note Each time you execute the plot_subj.py script, the .png figures previously generated will be automatically overwritten)

multi-scored-sleep's People

Contributors

biomedical-signal-processing avatar davide-pedroncelli avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

puddingss

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.