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.
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 |
Two EEG Motor Imagery (MI) benchmarks are currently supported. Other benchmarks in the field of EEG can be found here.
No. | Dataset |
---|---|
1 | EEG Motor Movement/Imagery Dataset [Tutorial] |
2 | High Gamma 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.
- Download the EEG Motor Movement/Imagery Dataset via this script.
- 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.
- 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.
- Train and test deep learning models for EEG signals / tasks classification via the EEG-DL library, which provides multiple SOTA DL models.
- Read evaluation criterias (through iterations) via the Tensorboard. You can follow this tutorial. Then you can save the criterias into Excel .csv files.
- 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.
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:
- GCNs-Net: A Graph Convolutional Neural Network Approach for Decoding Time-resolved EEG Motor Imagery Signals [Presentation]
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 [email protected].
The library was created and open-sourced by Shuyue Jia @ Human Sensor Laboratory, School of Automation Engineering, Northeast Electric Power University, Jilin, China.