Coder Social home page Coder Social logo

eeg-tcnet's Introduction

Copyright (C) 2020 ETH Zurich, Switzerland. SPDX-License-Identifier: Apache-2.0. See LICENSE file for details.

Authors: Thorir Mar Ingolfsson, Michael Hersche, Xiaying Wang, Nobuaki Kobayashi, Lukas Cavigelli, Luca Benini

EEG-TCNet

This project provides the experimental environment used to produce the results reported in the paper EEG-TCNet: An Accurate Temporal Convolutional Network for Embedded Motor-Imagery Brain-Machine Interfaces available on arXiv. If you find this work useful in your research, please cite

@misc{ingolfsson2020eegtcnet,
      title={EEG-TCNet: An Accurate Temporal Convolutional Network for Embedded Motor-Imagery Brain-Machine Interfaces}, 
      author={Thorir Mar Ingolfsson and Michael Hersche and Xiaying Wang and Nobuaki Kobayashi and Lukas Cavigelli and Luca Benini},
      year={2020},
      eprint={2006.00622},
      archivePrefix={arXiv},
      primaryClass={eess.SP}
}

Getting started

Prerequisites

Also the dataset 2a of the BCI Competition IV needs to be downloaded and put into the /data folder. It is available on here

Installing

Navigate to EEG-TCNet's main folder and create the environment using Anaconda: (We have two environments (one for GPU and one for CPU)) for GPU do:

$ conda env create -f EEG-TCNet-GPU.yml -n EEG-TCNet

For CPU do

$ conda env create -f EEG-TCNet.yml -n EEG-TCNet

Usage

We provide the models under /models/EEG-TCNet inside there we have 9 subdirectories /S1 to /S9 each representing each subject. Inside each subdirectory there are 6 files. model.h5 is the saved keras model of variable EEG-TCNet and model_fixed.h5 is the saved keras model of fixed EEG-TCNet. Then there are two pipeline files in each subdirectory which vary depending on if data normalization was used or not. Please refer to Accuracy_and_kappa_scores.ipynb in the main directory to see how these pipelines are produces. There you also find the accuracy score and kappa score verification of EEG-TCNet.

Under /utils you find the data loading and model making files. Then also a small sample of how to train is given with sample_train.py, please note that because of the stochastic nature of training with GPUs it's very hard to fix every random variable in the backend. Therefore to reproduce the same or similar models one might need to train a couple of times in order to get the same highly accurate models we present.

License and Attribution

Please refer to the LICENSE file for the licensing of our code.

eeg-tcnet's People

Contributors

okbalefthanded avatar thoriri avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.