This repository is the official implementation of MMCNN: A Multi-branch Multi-scale Convolutional Neural Network for Motor Imagery Classification.
To install requirements:
pip install -r requirements.txt
* keras
* tensorflow
* numpy
* scipy
* pylab
* sklearn
* random
We Evaluated our model using BCI Competition IV 2a and 2b dataset and we have cut the main part of the data which have been transformed to the .npy file.
This file is used to load datasets and augment data.
This file is used to implement the functions in the model.
This file is used to evaluate the model.
The main file to run the model.
We conducted experiments under
- python 3.7.3
- tensorflow 1.13.1
- kaggle gpu
To train the model(s) in the paper, run this command:
train:
eg1:python main.py --get2apath bci2a-npy/ --choosedata 2a
eg2:python main.py --get2bpath bci2b-npy/
The commands above are examples to train the model with dataset 2a or 2b.The evaluation is follow the training process.The final results are 5-fold cross-validation with all datas from all subjects.If you want to train model with a centain one subject,you can change in the main.py file.
Our model achieves the following performance :