Skip to content

kusumikakd/EEG_DL

Repository files navigation


Welcome to EEG Deep Learning Library

EEG-DL is a Deep Learning (DL) library written by TensorFlow for EEG Tasks (Signals) Classification. It provides the latest DL algorithms and keeps updated.

License Python 3 TensorFlow 1.13.1

Documentation

The supported models include

No. Model Example
1 Deep Neural Networks DNN
2 Convolutional Neural Networks [Paper] [Tutorial] CNN
3 Deep Residual Convolutional Neural Networks [Paper] ResNet
4 Thin Residual Convolutional Neural Networks [Paper] Thin ResNet
5 Densely Connected Convolutional Neural Networks [Paper] DenseNet
6 Fully Convolutional Neural Networks [Paper] FCN
7 One Shot Learning with Siamese Networks [Paper] [Tutorial] Siamese Networks
8 Graph Convolutional Neural Networks [Paper] [Presentation] [Tutorial] GCN / Graph CNN
9 Deep Residual Graph Convolutional Neural Networks ResGCN
10 Densely Connected Graph Convolutional Neural Networks DenseGCN
11 Recurrent Neural Networks [Paper] RNN
12 Attention-based Recurrent Neural Networks [Paper] RNN with Attention
13 Bidirectional Recurrent Neural Networks [Paper] BiRNN
14 Attention-based Bidirectional Recurrent Neural Networks [Paper] BiRNN with Attention
15 Long-short Term Memory [Paper] LSTM
16 Attention-based Long-short Term Memory [Paper] LSTM with Attention
17 Bidirectional Long-short Term Memory [Paper] BiLSTM
18 Attention-based Bidirectional Long-short Term Memory [Paper] BiLSTM with Attention
19 Gated Recurrent Unit [Paper] GRU
20 Attention-based Gated Recurrent Unit [Paper] GRU with Attention
21 Bidirectional Gated Recurrent Unit [Paper] BiGRU
22 Attention-based Bidirectional Gated Recurrent Unit [Paper] BiGRU with Attention

One EEG Motor Imagery (MI) benchmark is currently supported. Other benchmarks in the field of EEG can be found here.

No. Dataset
1 EEG Motor Movement/Imagery Dataset [Tutorial]

The evaluation criteria consists of

Evaluation Metrics
Accuracy / Precision / Recall / F1 Score / Kappa Coefficient
Receiver Operating Characteristic (ROC) Curve / Area under the Curve (AUC)
Confusion Matrix
Paired-wise t-test (via R language [Tutorial])

The evaluation metrics are mainly supported for four-class classification. If you wish to switch to two-class or three-class classification, please modify this file to adapt to your personal Dataset classes. Meanwhile, the details about the evaluation metrics can be found in this paper.

Usage Demo: EEG Motor Movement/Imagery Dataset

  1. Download the EEG Motor Movement/Imagery Dataset via this script.
  2. Read the .edf files (One of the raw EEG signals formats) and save them into Matlab .m files via this script. FYI, this script must be executed under the Python 2 environment (Python 2.7 is recommended) due to some Python 2 syntax. If using Python 3 environment to run the file, there might be no error, but the labels of EEG tasks would be totally messed up.
  3. Preprocessed the Dataset via the Matlab and save the data into the Excel files (training_set, training_label, test_set, and test_label) via these scripts with regards to different models. FYI, every lines of the Excel file is a sample, and the columns can be regarded as features, e.g., 4096 columns mean 64 channels X 64 time points. Later, the models will reshape 4096 columns into a Matrix with the shape 64 channels X 64 time points. You should can change the number of columns to fit your own needs, e.g., the real dimension of your own Dataset.
  4. Train and test deep learning models for EEG signals / tasks classification via the EEG-DL library, which provides multiple SOTA DL models.
  5. Read evaluation criterias (through iterations) via the Tensorboard. You can follow this tutorial. Then you can save the criterias into Excel .csv files.
  6. Finally, draw beautiful paper photograph using Matlab or Python. Please follow these scripts.

P.S. I have tested all the files (Python and Matlab) under the macOS. Be advised that for some Matlab files, several Matlab functions are different between Windows Operating System (OS) and macOS. For example, I used "readmatrix" function to read CSV files in the MacOS. However, I have to use “csvread” function in the Windows because there was no such "readmatrix" Matlab function in the Windows. If you have met similar problems, I recommend you to Google or Baidu them. You can definitely work them out.

Citation

If you find our library useful, please considering citing our paper in your publications. We provide a BibTeX entry below.

@article{hou2019novel,  
    year = 2020,  
    month = {feb},  
    publisher = {IOP Publishing},  
    volume = {17},  
    number = {1},  
    pages = {016048},  
    author = {Yimin Hou and Lu Zhou and Shuyue Jia and Xiangmin Lun},  
    title = {A novel approach of decoding {EEG} four-class motor imagery tasks via scout {ESI} and {CNN}},  
    journal = {Journal of Neural Engineering}  
}

@inproceedings{Lun2020GCNs,
    title={GCNs-Net: A Graph Convolutional Neural Network Approach for Decoding Time-resolved EEG Motor Imagery Signals},
    author={Xiangmin Lun and Shuyue Jia and Yimin Hou and Yan Shi and Yang Li and Hanrui Yang and Shu Zhang and Jinglei Lv},
    year={2020}
}

@inproceedings{Hou2020DeepFM,
    title={Deep Feature Mining via Attention-based BiLSTM-GCN for Human Motor Imagery Recognition},
    author={Yimin Hou and Shuyue Jia and Shu Zhang and Xiangmin Lun and Yan Shi and Yang Li and Hanrui Yang and Rui Zeng},
    year={2020}
}

Our papers can be downloaded from:

  1. A Novel Approach of Decoding EEG Four-class Motor Imagery Tasks via Scout ESI and CNN
Project2

  1. GCNs-Net: A Graph Convolutional Neural Network Approach for Decoding Time-resolved EEG Motor Imagery Signals [Presentation]
Project2

  1. Deep Feature Mining via Attention-based BiLSTM-GCN for Human Motor Imagery Recognition
Project2
Project2

Contribution

We always welcome contributions to help make EEG-DL Library better. If you would like to contribute or have any question, please don't hesitate to contact me, and my email is shuyuej@ieee.org.

Organizations

The library was created and open-sourced by Shuyue Jia @ Human Sensor Laboratory, School of Automation Engineering, Northeast Electric Power University, Jilin, China.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published