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
To run our code, you need:
- Download data required (link)
- 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) - 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:
- Dataset: "DODO", "DODH" or "ISRC"
- 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:
- Figure_Hypnogram.png
- Figure_Hypnodensity.png
You can specify four parameteres:
- Architecture: "DSNL", "SSN"
- Dataset: "DODO", "DODH", "ISRC"
- Pre-trained Model: "LSSC", "LSU", "base"
- 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)