Yiman00 / EEG-Motor-Imagery-Classification-CNNs-TensorFlow

EEG Motor Imagery Tasks Classification (by Channels) via Convolutional Neural Networks (CNNs)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EEG Motor Imagery Classification via Convolutional Neural Networks

EEG Motor Imagery Tasks Classification (by Channels) via Convolutional Neural Networks (CNNs)

Paper: Yimin Hou, Lu Zhou, Shuyue Jia, et al. A Novel Approach of Decoding EEG Four-Class Motor Imagery Tasks via Scout ESI and CNN [J]. Journal of Neural Engineering, 2019.

If you guys use this code as a part of your projects, please be sure to cite our paper. Thanks a lot.

Author: Shuyue Jia (Bruce Jia)

Date: December of 2018

NOTICE: The method in our paper is ESI + Morlet wavelet JTFA + CNNs, my job is using CNNs to classify the EEG data after the ESI + JTFA process. FYI, ESI donates EEG source imaging and JTFA refers to joint time-frequency analysis.

Meanwhile, the codes in this repository are based on the original dataset without the ESI and JTFA process and also achieve a good result. The main CNNs Tensorflow framework codes in the "MI_Proposed_CNNs_Architecture.py" are the same for both of the work. I could provide the datset which has been processed after the ESI and JTFA stage after June of 2020 in order to reproduce the results we used if you are interested in our work. (Email me: shuyuej.ml@gmail.com)

1. Python file: EEG_Test_Raw_Data/PhysioNet_MI_Dataset/MIND_Get_EDF.py

--- download all the EEG Motor Movement/Imagery Dataset .edf files from https://archive.physionet.org/pn4/eegmmidb/

2. Python file: EEG_Test_Raw_Data/Read_Raw_Data_Save_Into_Matlab_Files.py

--- Read the edf Raw data of different channels and save them to matlab .m files

--- At this stage, the Python file must be processed under a Python 2 environment (I recommend to use Python 2.7 version).

3. Matlab file: EEG_Test_Raw_Data/Saved_Matlab_Data/Preprocessing_Raw_Data.m

--- Pre-process the dataset (Data Normalization mainly) and save matlab .m files into Excel .xlsx Files

4. Python file: EEG_Test_Raw_Data/MI_Proposed_CNNs_Architecture.py

--- the proposed CNNs architecture

--- based on TensorFlow 1.12.0 with CUDA 9.0 or TensorFlow 1.13.1 with CUDA 10.0

--- The trained results are saved in the Tensorboard

--- Open the Tensorboard and save the results into Excel .csv files

--- Draw the graphs using Matlab or Origin

@article{hou2019novel,
 title={A novel approach of decoding EEG four-class motor imagery tasks via scout ESI and CNN},
 author={Hou, Yimin and Zhou, Lu and Jia, Shuyue and Lun, Xiangmin},
 journal={Journal of neural engineering},
 year={2019},
 publisher={IOP Publishing}
}

About

EEG Motor Imagery Tasks Classification (by Channels) via Convolutional Neural Networks (CNNs)


Languages

Language:Python 79.1%Language:MATLAB 20.9%