Giter Club home page Giter Club logo

eeg_sleep_stage_classification's Introduction

License Code style: black GitHub pull requests GitHub issues

Transparency in Sleep Staging: Deep Learning Method for EEG Sleep Stage Classification with Model Interpretability

This repository contains code, results, and dataset links for our arxiv paper titled Transparency in Sleep Staging: Deep Learning Method for EEG Sleep Stage Classification with Model Interpretability. ๐Ÿ“

Authors: 1Shivam Kumar Sharma, 1Suvadeep Maiti, S.Mythirayee, Srijithesh Rajendran, Bapi Raju

1Equal contribution

More details on the paper can be found here. Raise an issue for any query regarding the code, paper, or for any support.

Table of contents

  • Introduction
  • Highlights
  • Results
  • Dataset
  • Getting started
  • Getting the weights
  • License and Citation

Introduction ๐Ÿ”ฅ

Automated Sleep stage classification using raw single channel EEG is a critical tool for sleep quality assessment and disorder diagnosis. However, modelling the complexity and variability inherent in this signal is a challenging task, limiting their practicality and effectiveness in clinical settings. To mitigate these challenges, this study presents an end-to-end deep learning (DL) model which integrates squeeze and excitation blocks within the residual network to extract features and stacked Bi-LSTM to understand complex temporal dependencies. A distinctive aspect of this study is the adaptation of GradCam for sleep staging, marking the first instance of an explainable DL model in this domain with alignment of its decision-making with sleep expert's insights. We evaluated our model on the publically available datasets (SleepEDF-20, SleepEDF-78, and SHHS), achieving Macro-F1 scores of 82.5, 78.9, and 81.9, respectively. Additionally, a novel training efficiency enhancement strategy was implemented by increasing stride size, leading to 8x faster training times with minimal impact on performance. Comparative analyses underscore our model outperforms all existing baselines, indicating its potential for clinical usage.

Highlights โœจ

  • A supervised model trained on Electroencephalography (EEG) data beating the current SOTA models ๐Ÿ’ฅ.
  • Complete pre-processing pipeline, augmentation, and training scripts are available for experimentation.
  • Pre-trained model weights are provided for reproducibility.

Results ๐Ÿ•บ

Linear evaluation results on Sleep-EDF-20, Sleep-EDF-78 and SHHS datasets.

Accuracy ฮบ Macro F1-score
Sleep-EDF-20 87.5 0.82 82.5
Sleep-EDF-78 83.8 0.77 78.9
SHHS 76.75 0.83 81.9

1D-GradCAM visualization of raw EEG epochs along with sleep micro-structures shown in green boxes.

Getting started ๐Ÿฅท

Setting up the environment

TODO

What each file does

TODO

Training the model

TODO

Testing the model

TODO

Logs and checkpoints

  • The logs are saved in logs/ directory.
  • The model checkpoints are saved in checkpoints/ directory.

Getting the weights ๐Ÿ‹๏ธ

TODO

License and Citation ๐Ÿ“ฐ

Please cite the following paper if you have used this code:

@misc{sharma2023deep,
      title={A Deep Dive into Sleep: Single-Channel EEG-Based Sleep Stage Classification with Model Interpretability}, 
      author={Shivam Sharma and Suvadeep Maiti and S. Mythirayee and Srijithesh Rajendran and Bapi Raju},
      year={2023},
      eprint={2309.07156},
      archivePrefix={arXiv},
      primaryClass={eess.SP}
}

eeg_sleep_stage_classification's People

Contributors

suvadeepmaiti avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.