Skip to content

biomedical-signal-processing/multi-scored-sleep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

Releases

No releases published

Packages

No packages published

Languages