Link Search Menu Expand Document

DeepConvNet Usage

View source on GitHub

Table of contents

  1. DeepConvNet Usage
    1. About DeepConvNet
    2. Preparation for DeepConvNet’s input
      1. Downloading a particular dataset
      2. Preprocessing based on time domain EEG over the considered dataset
      3. Build, fit, and evaluate DeepConvNet

About DeepConvNet

If you use the DeepConvNet model in your research, please cite the following paper:

@article{hbm23730,
  author = {Schirrmeister Robin Tibor and 
            Springenberg Jost Tobias and 
            Fiederer Lukas Dominique Josef and 
            Glasstetter Martin and 
            Eggensperger Katharina and 
            Tangermann Michael and 
            Hutter Frank and 
            Burgard Wolfram and 
            Ball Tonio},
  title = {Deep learning with convolutional neural networks for EEG decoding and visualization},
  journal = {Human Brain Mapping},
  volume = {38},
  number = {11},
  pages = {5391-5420},
  keywords = {electroencephalography, EEG analysis, machine learning, end‐to‐end learning, brain–machine interface, brain–computer interface, model interpretability, brain mapping},
  doi = {10.1002/hbm.23730},
  url = {https://onlinelibrary.wiley.com/doi/abs/10.1002/hbm.23730}
}

Preparation for DeepConvNet’s input

An example of DeepConvNet’s input on the BCIC IV 2a dataset (All settings are set up as optimal settings in the original paper).

Downloading a particular dataset

View source on GitHub

python download_datasets.py --dataset 'BCIC2a'

Preprocessing based on time domain EEG over the considered dataset

View source on GitHub

python prep_time_domain.py --dataset 'BCIC2a'

Build, fit, and evaluate DeepConvNet

View source on GitHub

# Subject-dependent MI classification
python run_DeepConvNet.py --model_name 'DeepConvNet' --dataset 'BCIC2a' --train_type 'subject_dependent' --data_type 'time_domain' --num_class 2  --num_chs 20 --GPU 0

# Subject-independent MI classification
python run_DeepConvNet.py --model_name 'DeepConvNet' --dataset 'BCIC2a' --train_type 'subject_independent' --data_type 'time_domain' --num_class 2  --num_chs 20 --GPU 0

Arguments:

ArgumentsDescriptionDefault 
model_namestr prefix to save model‘DeepConvNet’ 
datasetstr prefix to pick up a particular dataset and save model‘BCIC2a’ 
train_typestr prefix to pick up a particular traning manner and save model‘subject_dependent’ 
data_typestr prefix to select data type of input‘time_domain’ 
num_classint number of classes2 
num_chsint number of classes20 
log_dirstr path to save model‘logs’ 
subjectsint or list of int or None list of range test subject, if None, use all subjectsNone 
GPUstr select GPU ID0-