OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Deepsleepnet

DeepSleepNet is an open-source Python deep-learning model and research codebase that predicts sleep stages from raw, single-channel EEG.

Independent OpenViST project profile, based on linked sources.

Deepsleepnet — Research experiments using raw, single-channel EEG
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use DeepSleepNet when you want a documented research workflow for single-channel EEG sleep-stage scoring and can work with its specified environment and cross-validation process.

Who it is for

  • Researchers reproducing automated sleep-stage scoring experiments
  • Developers exploring EEG analysis workflows or comparing sleep-stage scoring methods

Documented uses

  • Prepare Sleep-EDF EEG recordings and stage labels for model input
  • Train models across cross-validation folds and predict stages for withheld subjects
  • Summarize prediction performance with accuracy and F1-score metrics
Before you choose

Requirements & limits

The repository is public and lists the Apache License 2.0; its README states use is for academic and non-commercial purposes. Access to the MASS dataset requires permission.

  • The model takes raw, single-channel EEG; the documented preparation examples select Fpz-Cz or Pz-Oz.
  • The described evaluation requires training all 20 folds before evaluating performance.
  • The reproduced environment uses older, specifically listed Python, TensorFlow-GPU, CUDA and cuDNN versions.
  • The README identifies TinySleepNet as a separate later model, not part of DeepSleepNet.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Prepare Sleep-EDF EEG data for the model

Download Sleep-EDF subjects and extract an EEG channel with corresponding sleep stages for the training workflow.

Before you start

  • Sleep-EDF dataset
  • Python environment matching the repository’s documented setup
  • Repository scripts and data directory

Steps

  1. From the data directory, run the documented download_physionet.sh script to download SC subjects.

  2. Run prepare_physionet.py with --data_dir data, an output directory, and --select_ch 'EEG Fpz-Cz' or 'EEG Pz-Oz'.

Expected outcome

Prepared EEG data and corresponding sleep stages in the selected output directory, ready for the documented training stage.

Guide limitations

  • The README’s MASS dataset route requires permission to access that dataset.
  • This guide covers data preparation, not model training or prediction.
Source-based practical guide

Train, predict and summarize a 20-fold evaluation

Run the repository’s documented cross-validation workflow and produce sleep-stage predictions and performance metrics.

Before you start

  • Prepared EEG data, such as the documented data/eeg_fpz_cz directory
  • The repository’s listed Python, TensorFlow-GPU, CUDA and cuDNN environment
  • Training and prediction scripts from the repository

Steps

  1. Run train.py for each fold, using fold indices 0 through 19; the README also provides batch_train.sh for batch training.

  2. After training every fold, run predict.py with the data, model and output directories.

  3. Run summary.py on the output directory to report overall accuracy, per-class F1-score and macro F1-score.

Expected outcome

Predictions are stored in NumPy files, and the summary script reports the documented performance metrics.

Guide limitations

  • The README says all 20 folds must be trained before evaluation.
  • The listed environment is the setup used to reproduce the work and does not establish compatibility with other versions.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
12 November 2026
Original website title
akaraspt/deepsleepnet · Official homepage title · retained in its source language