Skip to content

In this project, we propose a CNN-LSTM model to classify single-channel EEG for driver drowsiness detection. We designed a visualization technique by taking advantage of the hidden states output by the LSTM layer. Results show that the model not only has a high accuracy but also learns biologically explainable features, e.g., Alpha spindles, as …

License

Notifications You must be signed in to change notification settings

cuijiancorbin/Subject-Independent-Drowsiness-Recognition-from-Single-Channel-EEG-with-an-Interpretable-CNN-LSTM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subject-Independent-Drowsiness-Recognition-from-Single-Channel-EEG-with-an-Interpretable-CNN-LSTM

Pytorch implementation of the paper "Subject-Independent Drowsiness Recognition from Single-Channel EEG with an Interpretable CNN-LSTM model". https://doi.org/10.1109/CW52790.2021.00041

If you find the codes useful, pls cite the paper:

J. Cui et al., "Subject-Independent Drowsiness Recognition from Single-Channel EEG with an Interpretable CNN-LSTM model," 2021 International Conference on Cyberworlds (CW), 2021, pp. 201-208, doi: 10.1109/CW52790.2021.00041.

The project contains 3 code files. They are implemented with Python 3.6.6.

"CNNLSTM.py" contains the model. required library: torch

"LeaveOneOut_acc.py" contains the leave-one-subject-out method to get the classifcation accuracies. It requires the computer to have cuda supported GPU installed. required library:torch,scipy,numpy,sklearn

"CNNLSTM_VisualizationTech.py" contains the visualization technique based on the modification of the LSTM model. It requires the computer to have cuda supported GPU installed. required library:torch,scipy,numpy,matplotlib,mne

The processed dataset has been uploaded to: https://figshare.com/articles/dataset/EEG_driver_drowsiness_dataset/14273687

If you have any problems, please Contact Dr. Cui Jian at cuij0006@ntu.edu.sg

About

In this project, we propose a CNN-LSTM model to classify single-channel EEG for driver drowsiness detection. We designed a visualization technique by taking advantage of the hidden states output by the LSTM layer. Results show that the model not only has a high accuracy but also learns biologically explainable features, e.g., Alpha spindles, as …

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages