Code Monkey home page Code Monkey logo

tsgl-eegnet's Introduction

TSGL-EEGConv

This is the Repository of TSGL-EEGNet. TSGL-EEGNet is a kind of Convolutional Network for pre-processed EEG signals to predict classes. TSGL-EEGNet is based on EEGNet which you can find it here.

Dataset

You need to do some pre-processing works before using it. Maybe you need MATLAB and EEGlab tools to read these datas and transform them to *.mat file format.

Features

Framework for EEG

  • Cross Validation Framework
  • Grid Search Framework
  • Cropped Training with CV and GS
  • Visualization Framework

Implemented Models

  • EEGNet [1]
  • TSGL-EEGNet
  • DeepConvNet [2]
  • ShallowConvNet [2]
  • Multi-branch 3D CNN [3] Not supported yet.
  • FBCSP

Upgrade Log

  • v1.1
    • use a new code construction to do cropped training
    • use generator to train on a large dataset
    • rename core.train to core.training, to be different from .train
    • add maxmin normalization
    • separate code test and model test
    • fix some bugs
  • known issues
    • cv testing and model ensemble (stacking) are not adapted
  • next
    • use generator to load a large dataset

Usage

Requirement

  • Python >= 3.6 && <= 3.8
  • Python >= 3.7 (when your GPU is newer than Nvidia 30xx)
  • tensorflow-gpu >= 2.0.0 && <= 2.3.0
  • tensorflow >= 2.4.1 (pip) (when your GPU is newer than Nvidia 30xx)
  • scikit-learn >= 0.21.3
  • scipy >= 1.3.1
  • numpy >= 1.17.3
  • tensorflow-addons (pip)
  • hdf5 >= 1.10.4
  • h5py >= 2.9.0
  • matplotlib >= 3.1.1 && <=3.3.4 (optional)
  • pydot >= 1.4.1 (optional)
  • graphviz >= 2.38 (optional)
  • mne >= 0.20.7 (pip) (optional)
  • braindecode == 0.2.0 (pip) (fbcsp) (optional)

It is recommended to use conda environment. tensorflow-addons Requirement Optional packages are for visualization

Quick Start

# training models
python train.py

# testing single model
python model_test.py

# testing CV models (not adapted)
# python model_cv.py

# ensemble models (not adapted)
# python model_ensemble.py

# stacking models (not adapted)
# python model_stacking.py

# visualization
python vis.py

Code Structure

TODO

Paper Citation

If you use the EEGNet model in your research and found it helpful, please cite the following paper:

@article{Lawhern2018,
    author={Vernon J Lawhern and Amelia J Solon and Nicholas R Waytowich and Stephen M Gordon and Chou P Hung and Brent J Lance},
    title={EEGNet: a Compact Convolutional Neural Network for EEG-based Brain–computer Interfaces},
    journal={Journal of Neural Engineering},
    volume={15},
    number={5},
    pages={056013},
    url={http://stacks.iop.org/1741-2552/15/i=5/a=056013},
    year={2018}
}

If you use the TSGL-EEGNet model in your research and find this Repository is helpful, please cite the following paper:

@article{Deng2021,
    author={Deng, Xin and Zhang, Boxian and Yu, Nian and Liu, Ke and Sun, Kaiwei},
    journal={IEEE Access},
    title={Advanced TSGL-EEGNet for Motor Imagery EEG-Based Brain-Computer Interfaces},
    year={2021},
    volume={9},
    number={},
    pages={25118-25130},
    doi={10.1109/ACCESS.2021.3056088}
}

License

MIT License

tsgl-eegnet's People

Contributors

johnboxann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tsgl-eegnet's Issues

how to preprocess data?

Can you explain what did you do in your method? I didn't find this part in your paper.
And in you data, it's different from raw data. I'm curious about it cuz I put raw data in your model and found the accuracy is about 10% lower than yours.

how to run code?

Hi
I can't run your code.
Please explain how should run it at README.md
Thank you.

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.