Skip to content

Efficient Transfer Learning with Meta Update for Cross Subject EEG Classification

Notifications You must be signed in to change notification settings

nothing7744/MUPS-EEG

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MUPS-EEG

Python PyTorch

Code for MUPS-EEG model introduced in "Ultra Efficient Transfer Learning with Meta Update for Cross Subject EEG Classification".

Setting up environment

The model is implemented with Pytorch, we recommend python 3.5 and PyTorch 0.4.0 with Anaconda.

Create a new environment and install python packages in it:

   conda create --name mups python=3.5
   conda activate mups
   conda install pytorch=0.4.0 -c pytorch
   conda install scipy scikit-learn

Install other dependencies:

   pip install six tqdm tensorboardX

Clone the repository:

   git clone https://github.com/tiehangd/MUPS-EEG

Dataset preparation

Download BCI-IV 2a dataset from http://bnci-horizon-2020.eu/database/data-sets, Four class motor imagery (001-2014)

Place the 18 files inside ./data folder

Data preprocess, run from command line

   python ./dataloader/data_preprocessing.py

This produces data for our cross subject task, which is stored in ./data/cross_sub

Running the model

  1. Pretraining of feature extractor

    python pre_train.py
    
  2. Meta adaptation

    python meta_adapt.py
    

Citation

Please cite our paper if it is helpful to your work:

@misc{duan2021ultra,
      title={Ultra Efficient Transfer Learning with Meta Update for Cross Subject EEG Classification}, 
      author={Tiehang Duan and Mihir Chauhan and Mohammad Abuzar Shaikh and Jun Chu and Sargur Srihari},
      year={2021},
      eprint={2003.06113},
      archivePrefix={arXiv},
      primaryClass={cs.LG}
}

Acknowledgements

Implementation of MUPS model utilized code from the following repositories:

1) https://github.com/yaoyao-liu/meta-transfer-learning
2) https://github.com/aliasvishnu/EEGNet

About

Efficient Transfer Learning with Meta Update for Cross Subject EEG Classification

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%