A toolbox to fairly evaluate automatic sleep staging algorithms
7.1K
To get started, choose your operating system below. Just follow the step-by-step guideline. This is the recommended method as it allows you to visualize the installation process directly in the shell.
| Linux | Mac | Windows |
|---|---|---|
![]() | ![]() | ![]() |
Step 1: Download linux_setup.sh | Step 1: Download macos_setup.sh | Step 1: Download win_setup.ps1 |
Step 2: Download docker-compose.yml | Step 2: Download docker-compose.yml | Step 2: Download docker-compose.yml |
Step 3: Place the .sh/.yml files in the same folder. | Step 3: Place the .sh/.yml files in the same folder. | Step 3: Place the .ps1/.yml files in the same folder. |
| Step 4: Open a terminal, navigate to the folder, and run: | Step 4: Open a terminal, navigate to the folder, and run: | Step 4: Open PowerShell as Administrator, navigate to the folder, and run: |
chmod +x linux_setup.sh && ./linux_setup.sh | chmod +x macos_setup.sh && ./macos_setup.sh | ./win_setup.ps1 |
❗Windows Users: SLEEPYLAND runs via Docker. Before running the script, ensure Docker Desktop is installed on your system. You can easily download it from Docker's official website.
In the future, this step will be handled automatically.
Once downloaded, check if Docker is installed and running by opening a terminal and typing:
docker --versionIf the command returns the Docker version, you are ready to proceed from the step 1.
❗SLEEPYLAND WebApp does not open automatically:
Ensure that all containers are running.
You can check the status of your Docker containers by executing this command in your terminal:docker psLook for a container named
guito confirm theguiservice is up.Access SLEEPYLAND via your browser.
Open your web browser and navigate to:http://localhost:8887This will open the SLEEPYLAND GUI where you can perform various tasks interactively.
❗How to Stop/Quit SLEEPYLAND:
SLEEPYLAND runs in the background, even if you close the web window.
To completely stop the application, execute the following command in the terminal from the folder containingdocker-compose.yml:docker-compose downIn the future, we will add a feature to close the app directly from the web UI.
| Local Processing & Privacy | Fair Model Training |
|---|---|
| All analyses run locally on your device, ensuring complete data privacy. Your data never leaves your laptop. | The included deep learning sleep staging models have been fairly trained and validated on consistent public datasets, ensuring robust and reliable performance for accurate sleep analysis and stage classification. |
All the exposed sleep staging models run locally on your CPU (GPU support is not yet available). As a result, some models, such as the
deepresnetmodel, may perform slowly when predicting or evaluating multiple combinations of EEG and EOG channels. We are actively working on optimizations and will release enhanced versions soon.
For instructions on navigating the UI and making the most of the analysis tools, check out this Quickstart Tutorial Video.
| Model | Description | Developed By | References | Available |
|---|---|---|---|---|
| POPS (Luna) | A feature-based model for sleep stage classification using manually engineered features from PSG data. | Luna Sleep Toolbox | Luna Resource | ❌ |
| YASA | A lightweight, open-source package for sleep staging, offering rapid sleep analysis using EEG/EOG/EMG signals. | Raphael Vallat, et al | Vallat R, Walker MP. An open-source, high-performance tool for automated sleep staging. Elife. 2021. | ✅ |
Note: Feature-based models are used only for predictions and have not been retrained from scratch on datasets within the SLEEPYLAND context.
| Model | Description | Developed By | References | Available |
|---|---|---|---|---|
| U-Sleep | A robust deep learning model designed to handle various PSG setups and mixed-cohort datasets for automated sleep staging. | Perslev, et al | Perslev M, Darkner S, et al. U-Sleep: resilient high-frequency sleep staging. NPJ Digital Medicine. 2021. | ✅ |
| DeepResNet | A deep residual network model for high-frequency sleep stage classification using PSG data. | Olesen, et al | Olesen AN, Jennum PJ, et al. Automatic sleep stage classification with deep residual networks in a mixed-cohort setting. Sleep. 2021. | ✅ |
| SleepTransformer | A transformer-based model that provides sleep staging with interpretability and uncertainty quantification. | Phan, et al | Phan H, Mikkelsen K, et al. Sleeptransformer: Automatic sleep staging with interpretability and uncertainty quantification. IEEE Transactions on Biomedical Engineering. 2022. | ✅ |
| L-SeqSleepNet | L-SeqSleepNet: Whole-cycle Long Sequence Modeling for Automatic Sleep Staging. | Phan, et al | Phan H, Lorenzen KP, et al. L-SeqSleepNet: Whole-cycle Long Sequence Modeling for Automatic Sleep Staging. IEEE Journal of Biomedical and Health Informatics. 2023. | ❌ |
All models have been implemented to ensure consistency and fairness in their evaluation on the NSRR datasets. Additionally, all models are now available in a single-channel configuration (EEG or EOG) and in the multi-channel configuration (EEG+EOG), offering flexibility to match user data and requirements.
Need additional help? Click the Quickstart Tutorial button for detailed step-by-step instructions.
NSRR Datasets Included for Model Train/Valid/Test
| Dataset | Subject Count | PSG Count | Age (µ ± σ) | Sex %M | BMI (µ ± σ) | Sleep Disorders | Annotation Format | Included |
|---|---|---|---|---|---|---|---|---|
| ABC | 49 | 132 | 48.8 ± 9.9 | 57.1 | 38.9 ± 3.0 | OSA | .xml | ✅ |
| APOE | 712 | 712 | 45.7 ± 13.6 | 59.1 | 27.2 ± 6.5 | SDB | .STA | ✅ |
| APPLES | 1094 | 1094 | 50.1 ± 12.9 | 63.2 | 32.1 ± 7.8 | OSA | .annot | ✅ |
| CCSHS | 515 | 515 | 17.7 ± 0.4 | 50.5 | 25.1 ± 5.9 | SRMD | .xml | ✅ |
| CFS | 144 | 730 | 41.4 ± 19.3 | 44.8 | 32.4 ± 9.5 | OSA | .xml | ✅ |
| CHAT | 1232 | 1638 | 7.0 ± 1.4 | 48.3 | 19.0 ± 4.9 | OSA | .xml | ✅ |
| HOMEPAP | 246 | 246 | 46.5 ± 11.9 | 60.3 | 37.2 ± 8.9 | OSA | .xml | ✅ |
| MESA | 2056 | 2056 | 69.9 ± 9.2 | 46.4 | 28.7 ± 5.6 | SDB | .xml | ✅ |
| MNC_CNC | 78 | 78 | 28.5 ± 16.9 | 51.3 | 23.2 ± 11.5 | NT1, NT2, IH | .xml | ✅ |
| MNC_DHC | 83 | 83 | 33.4 ± 14.8 | 50.0 | 24.8 ± 4.9 | - | .xml | ✅ |
| MNC_SSC | 767 | 767 | 45.4 ± 13.8 | 59.4 | 23.9 ± 6.5 | - | .xml | ✅ |
| MROS | 2905 | 3930 | 76.4 ± 5.5 | 100 | 27.2 ± 3.9 | SDB | .xml | ✅ |
| MSP | 105 | 105 | 26.8 ± 5.9 | 0 | 42.4 ± 6.6 | SDB | .annot | ✅ |
| NCHSDB | 3651 | 3950 | 8.8 ± 5.9 | 56.3 | 22.7 ± 9.9 | - | .tsv | ✅ |
| SHHS | 5797 | 8444 | 63.1 ± 11.2 | 47.6 | 28.2 ± 5.1 | OSA, SDB | .xml | ✅ |
| SOF | 453 | 453 | 82.9 ± 3.2 | 0 | 27.7 ± 4.6 | SDB | .xml | ✅ |
| WSC | 1123 | 2569 | 56.4 ± 8.1 | 54.1 | 31.7 ± 7.1 | SDB | .txt | ✅ |
Open Access Datasets Included for Model Testing
| Dataset | Subject Count | PSG Count | Age (µ ± σ) | Sex %M | BMI (µ ± σ) | Sleep Disorders | Annotation Format | Included |
|---|---|---|---|---|---|---|---|---|
| DCSM | 255 | 255 | - | - | - | - | .ids | ☑️ |
| DOD-H | 25 | 25 | - | - | - | - | .h5 | ☑️ |
| DOD-O | 55 | 55 | - | - | - | - | .h5 | ☑️ |
| PHYS | 994 | 994 | 55.2 ± 14.3 | 67 | - | SDB | .ids | ☑️ |
| SEDF_SC | 78 | 153 | 58.8 ± 22.0 | 47 | - | - | .edf | ☑️ |
| SEDF_ST | 22 | 44 | 40.2 ± 17.7 | 32 | - | - | .edf | ☑️ |
| ISRUC | 100 | 100 | 51.1 ± 13.7 | 35.2 | 25.0 ± 5.8 | - | .xml | ❌ |
Note: All the deep learning-based models for sleep staging have been trained, validated, and tested on in-domain (ID) training datasets - datasets included marked with a ✅. We assess the generalizability of the multiple models on the largest out-of-domain set of data - datasets included marked with a ☑️.
Content type
Image
Digest
sha256:5522f1ab1…
Size
472.8 MB
Last updated
7 months ago
docker pull bspsupsi/sleepyland:manager-api