All Projects → xiangzhang1015 → Deep-Learning-for-BCI

xiangzhang1015 / Deep-Learning-for-BCI

Licence: MIT license
Resources for Book: Deep Learning for EEG-based Brain-Computer Interface: Representations, Algorithms and Applications

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deep-Learning-for-BCI

brain-powered
With the Brain Powered honourscourse at the UvA we aimed to control a drone using brain signals, measured by means of EEG, only.
Stars: ✭ 13 (-79.37%)
Mutual labels:  eeg, bci
EEGwithRaspberryPI
Open-Source board for converting RaspberryPI to Brain-computer interface
Stars: ✭ 402 (+538.1%)
Mutual labels:  eeg, bci
ganglion-ble
Web Bluetooth client for the Ganglion brain-computer interface by OpenBCI
Stars: ✭ 27 (-57.14%)
Mutual labels:  eeg, bci
neurosky-android-sdk
Android SDK for the NeuroSky MindWave Mobile Brainwave Sensing Headset
Stars: ✭ 39 (-38.1%)
Mutual labels:  eeg, bci
EEGReader
EEG Reader is an Android mobile application, which reads EEG signal from NeuroSky mobile device connected to smartphone via Bluetooth.
Stars: ✭ 36 (-42.86%)
Mutual labels:  eeg, bci
EEGEdu
Interactive Brain Playground - Browser based tutorials on EEG with webbluetooth and muse
Stars: ✭ 91 (+44.44%)
Mutual labels:  eeg, bci
TSception
PyTorch implementation of TSception
Stars: ✭ 52 (-17.46%)
Mutual labels:  eeg
EEG-Motor-Imagery-Classification-CNNs-TensorFlow
EEG Motor Imagery Tasks Classification (by Channels) via Convolutional Neural Networks (CNNs) based on TensorFlow
Stars: ✭ 125 (+98.41%)
Mutual labels:  eeg
pybv
A lightweight I/O utility for the BrainVision data format, written in Python.
Stars: ✭ 18 (-71.43%)
Mutual labels:  eeg
eeg-explorer
Visual EEG readings from the Muse EEG Headset
Stars: ✭ 35 (-44.44%)
Mutual labels:  eeg
AttnSleep
[IEEE TNSRE] "An Attention-based Deep Learning Approach for Sleep Stage Classification with Single-Channel EEG"
Stars: ✭ 76 (+20.63%)
Mutual labels:  eeg
FortniteTracker
🔎 A tracker for the various Fortnite Files
Stars: ✭ 32 (-49.21%)
Mutual labels:  datamining
Discord-Datamining
Datamining Discord changes from the JS files
Stars: ✭ 1,441 (+2187.3%)
Mutual labels:  datamining
rteeg
[DEPRECATED: use MNE-Python] Python module to stream and analyze EEG data in real-time
Stars: ✭ 28 (-55.56%)
Mutual labels:  eeg
DGFraud-TF2
A Deep Graph-based Toolbox for Fraud Detection in TensorFlow 2.X
Stars: ✭ 84 (+33.33%)
Mutual labels:  datamining
ScouseTom
Open Source EIT system using Keithley 6221 current source and EEG systems
Stars: ✭ 17 (-73.02%)
Mutual labels:  eeg
tabula
A Go library for working with rows, columns, or matrix (deprecated, see https://github.com/shuLhan/share/tree/master/lib/tabula).
Stars: ✭ 11 (-82.54%)
Mutual labels:  datamining
dataset-ssvep-exoskeleton
SSVEP-based BCI recording of 12 subjects operating an upper limb exoskeleton during a shared control task. The exoskeleton is either controlled with a touchless interface detecting hand poses or with BCI.
Stars: ✭ 36 (-42.86%)
Mutual labels:  bci
EEG convolutional neural net
A convolutional neural network developed in python using the Keras machine learning framework used to categorize brain signal based on what a user was looking at when the EEG data was collected.
Stars: ✭ 20 (-68.25%)
Mutual labels:  eeg
eeguana
A package for manipulating EEG data in R.
Stars: ✭ 16 (-74.6%)
Mutual labels:  eeg

Deep Learning for Brain-Computer Interface (BCI)

Book authors: Dr. Xiang Zhang ([email protected]), Prof. Lina Yao ([email protected])

Tutorial contributor: Ziyu Liu

Update

The whole well-processed and DL-ready data of 109 subjects from EEGMMIDB are uploaded!

Overview

This tutorial contains implementable python and jupyter notebook codes and benchmark datasets to learn how to recognize brain signals based on deep learning models. This tutorial associates our survey on DL-based noninvasive brain signals and book on DL-based BCI: Representations, Algorithms and Applications.

  • We present a new taxonomy of BCI signal paradigms according to the acquisition methods. ECOG: Electrocorticography, EEG: Electroencephalography, fNIRS: functional near-infrared spectroscopy, fMRI: functional magnetic resonance imaging, EOG: Electrooculography, MEG: Magnetoencephalography.

  • We systemically introduce the fundamental knowledge of deep learning models. MLP: Multi-Layer Perceptron, RNN: Recurrent Neural Networks, CNN: Convolutional Neural Networks, LSTM: Long Short-Term Memory, GRU: Gated Recurrent Units, AE: Autoencoder, RBM: Restricted Boltzmann Machine, DBN: Deep Belief Networks, VAE: Variational Autoencoder, GAN: Generative Adversarial Networks. D-AE denotes Stacked-Autoencoder which refers to the autoencoder with multiple hidden layers. Deep Belief Network can be composed of AE or RBM, therefore, we divided DBN into DBN-AE (stacked AE) and DBN-RBM (stacked RBM).

  • Moreover, the guidelines for the investigation and design of BCI systems are provided from the aspects of signal category, deep learning models, and applications. The following figures show the distribution on signals and DL models in frointer DL-based BCI studies.
Distribution on signals Distribution on DL models
Distribution on signals Distribution on DL models



  • Special attention has been given to the state-of-the-art studies on deep learning for EEG-based BCI research in terms of algorithms. Specically, we introduces a number of advanced deep learning algorithms and frameworks aimed at several major issues in BCI including robust brain signal representation learning, cross-scenario classification, and semi-supervised classification.

  • Furthermore, several novel prototypes of deep learning-based BCI systems are proposed which shed light on real-world applications such as authentication, visual reconstruction, language interpretation, and neurological disorder diagnosis. Such applications can dramatically benefit both healthy individuals and those with disabilities in real life.

BCI Dataset

Collection of brain signals is both financially and temporally costly. We extensively explore the benchmark data sets applicable to rain signal research and provides 31 public data sets with download links that cover most brain signal types.

Brain Signals  Dataset #-Subject #-Classes Sampling Rate (Hz) #-Channels Download Link
FM EcoG BCI-C IV, Data set IV 3 5 1000 48 -- 64 Link
MI EcoG BCI-C III 
Data set I
1 2 1000 64 Link
Sleeping EEG Sleep-EDF Telemetry 22 6 100 2 EEG, 1 EOG, 1 EMG Link
Sleeping EEG Sleep-EDF: Cassette 78 6 100, 1 2 EEG (100 Hz), 1 EOG (100 Hz),
1 EMG (1 Hz)
Link
Sleeping EEG MASS-1 53 5 256 17/19 EEG, 2 EOG, 5 EMG Link
Sleeping EEG MASS-2 19 6 256 19 EEG, 4 EOG, 1EMG Link
Sleeping EEG MASS-3 62 5 256 20 EEG, 2 EOG, 3 EMG Link
Sleeping EEG MASS-4 40 6 256 4 EEG, 4 EOG, 1 EMG Link
Sleeping EEG MASS-5 26 6 256 20 EEG, 2 EOG, 3 EMG Link
Sleeping EEG SHHS 5804 N/A 125, 50 2 EEG (125 Hz), 1EOG (50 Hz),
1 EMG (125 Hz)
Link
Seizure EEG CHB-MIT 22 2 256 18 Link
Seizure EEG TUH 315 2 200 19 Link
MI EEG EEGMMI 109 4 160 64 Link
MI EEG BCI-C II, Data set III 1 2 128 3 Link
MI EEG BCI-C III, Data set III a 3 4 250 60 Link
MI EEG BCI-C III, Data set III b 3 2 125 2 Link
MI EEG BCI-C III, Data set IV a 5 2 1000 118 Link
MI EEG BCI-C III, Data set IV b 1 2 1001 119 Link
MI EEG BCI-C III, Data set IV c 1 2 1002 120 Link
MI EEG BCI-C IV, Data set I 7 2 1000 64 Link
MI EEG BCI-C IV, Data set II a 9 4 250 22 EEG, 3 EOG Link
MI EEG BCI-C IV, Data set II b 9 2 250 3 EEG, 3 EOG Link
Emotional EEG AMIGOS 40 4 128 14 Link
Emotional EEG SEED 15 3 200 62 Link
Emotional EEG DEAP 32 4 512 32 Link
Others EEG Open MIIR 10 12 512 64 Link
VEP BCI-C II, Data set II b 1 36 240 64 Link
VEP BCI-C III, Data set II 2 26 240 64 Link
fMRI ADNI 202 3 N/A N/A Link
fMRI BRATS 65 4 N/A N/A Link
MEG BCI-C IV, Data set III 2 4 400 10 Link

In order to let the readers have a quick access of the dataset and can play around it, we provide the well-processed and ready-ro-use dataset of EEG Motor Movement/Imagery Database (EEGMMIDB). This dataset contains 109 subjects while the EEG signals are recorded in 64 channels with 160 Hz sampling rate. After our clearning and sorting, each npy file represents a subject: the data shape of each npy file is [N, 65], the first 64 columns correspond to 64 channel features, the last column denotes the class label. The N varies for different subjects, but N should be either 259520 or 255680. This is the inherent difference in the original dataset.

Running the code

In our tutorial files, you will learn the pipline and workflow of BCI system including data acquiction, pre-processing, feature extraction (optional), classification, and evaluation. We present necessary references and actionable codes of the most typical deep learning models (GRU, LSTM, CNN, GNN) while taking advantage of temporal, spatial, and topographical depencencies. We also provide python codes that are very handy. For example, to check the EEG classification performance of CNN, run the following code:

python 4-2_CNN.py 

For PyTorch beginners, we highly recommond Morvan Zhou's PyTorch Tutorials.

Chapter resources

For the algorithms and applications introduced in the book, we provide the necessary implementary codes (TensorFlow version):

Citing

If you find our research is useful for your research, please consider citing our survey or book:

@article{zhang2020survey,
  title={A survey on deep learning-based non-invasive brain signals: recent advances and new frontiers},
  author={Zhang, Xiang and Yao, Lina and Wang, Xianzhi and Monaghan, Jessica JM and Mcalpine, David and Zhang, Yu},
  journal={Journal of Neural Engineering},
  year={2020},
  publisher={IOP Publishing}
}

@book{zhang2021deep,
  title={Deep Learning for EEG-based Brain-Computer Interface: Representations, Algorithms and Applications},
  author={Zhang, Xiang and Yao, Lina},
  year={2021},
  publisher={World Scientific Publishing}
}

Requirements

The tutorial codes are tested to work under Python 3.7.

Recent versions of Pytorch, torch-geometric, numpy, and scipy are required. All the required basic packages can be installed using the following command: ''' pip install -r requirements.txt ''' Note: For toch-geometric and the related dependices (e.g., cluster, scatter, sparse), the higher version may work but haven't been tested yet.

Miscellaneous

Please send any questions you might have about the code and/or the algorithm to [email protected].

License

This tutorial is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].