分享

TensorFlow处理运动想象分类任务

 脑机接口社区 2021-07-01

更多技术干货第一时间送达

本文代码来源于东北电力大学和长春理工大学研究团队的研究成果《A novel approach of decoding {EEG} four-class motor imagery tasks via scout ESI and CNN》。

本文中的方法是EEG源成像(ESI)+ Morlet小波联合时频分析(JTFA)+卷积神经网络(CNN)。原始数据已使用Matlab ToolkitBrainstorm处理。在ESI + JTFA过程处理之后,使用CNN对EEG数据进行分类。

EEG Motor Imagery Signals (Tasks) Classification 

via Convolutional Neural Networks (CNN)



代码地址:

https://github.com/SuperBruceJia/EEG-Motor-Imagery-Classification-CNNs-TensorFlow

安装使用

  1. Python file: PhysioNet_MI_Dataset/MIND_Get_EDF.py

    --- download all the EEG Motor Movement/Imagery Dataset .edf files from here!

    (Under Any Python Environment) $ python MIND_Get_EDF.py
  2. Python file: Read_Raw_Data_Save_Into_Matlab_Files.py

    --- Read the edf Raw data of different channels and save them into 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).

    (Under Python 2.7 Environment) $ python Read_Raw_Data_Save_Into_Matlab_Files.py
  3. Matlab file: 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: 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

    (Under Python 3.6 Environment) $ python MI_Proposed_CNNs_Architecture.py

CNN网络架构代码:MI_Proposed_CNNs_Architecture

    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多