MIT License

项目介绍

amrzhd/EEGNet 是一个托管在 GitHub 上的开源项目,主要使用 Jupyter Notebook 编写,采用 MIT License 许可证,目前获得 176 个 Star、13 次 Fork。

仓库全名
amrzhd/EEGNet
开源许可证
MIT License
Star 数
176
Fork 数
13
未关闭 Issue
3

README 摘要

EEGNet for Motor Imagery Classification Introduction Welcome to the EEGNet for Motor Imagery Classification repository! This project focuses on implementing a convolutional neural network (CNN) model based on the EEGNet architecture for classifying motor imagery tasks using electroencephalography (EEG) data. The model is designed to classify between four different motor imagery classes: Left Hand, Right Hand, Foot,…

完整内容见 GitHub 原始 README 或本页 。

常见问题

EEGNet 用什么语言开发?

主要使用 Jupyter Notebook 编写,采用 MIT License 许可证,目前有 176 个 Star。

EEGNet 可以免费商用吗?

仓库采用 MIT License 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 EEGNet 的源码?

可以直接克隆仓库:git clone https://github.com/amrzhd/EEGNet.git,默认分支为 main;安装与运行步骤见仓库 README。

EEGNet 最近还在维护吗?

仓库最近一次更新为 2024年9月9日,当前有 3 个未关闭 Issue;Star 数为 176,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

This project focuses on implementing CNN model based on the EEGNet architecture with Pytorch library for classifying motor imagery tasks using EEG data.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Jupyter Notebook
Python

贡献者

README

EEGNet for Motor Imagery Classification

Introduction

Welcome to the EEGNet for Motor Imagery Classification repository! This project focuses on implementing a convolutional neural network (CNN) model based on the EEGNet architecture for classifying motor imagery tasks using electroencephalography (EEG) data. The model is designed to classify between four different motor imagery classes: Left Hand, Right Hand, Foot, and Tongue.

Dataset

The EEG data used in this project is sourced from the BCI Competition IV 2a dataset. Key characteristics of the dataset include:

  • 9 Participants
  • 22 Ag/AgCl Electrodes
  • Sampling Frequency: 250 Hz
  • Epoched Data: [2, 6] seconds
  • Frequency Range: 0.5 - 100 Hz
  • Band Pass Filtered: 4 - 40 Hz (Using IIR Filter)
  • 4 Classes: Left Hand, Right Hand, Foot, Tongue
  • Both sessions of data (T & E) were used!

List of Events

The following events are annotated in the dataset:

  • ‘1023’: 1 Rejected trial
  • ‘1072’: 2 Eye movements
  • ‘276’: 3 Idling EEG (eyes open)
  • ‘277’: 4 Idling EEG (eyes closed)
  • ‘32766’: 5 Start of a new run
  • ‘768’: 6 Start of a trial
  • ‘769’: 7 Cue onset Left (class 1) : 0
  • ‘770’: 8 Cue onset Right (class 2) : 1
  • ‘771’: 9 Cue onset Foot (class 3) : 2
  • ‘772’: 10 Cue onset Tongue (class 4): 3

Events 7, 8, 9, and 10 were chosen for the classification.

Model

The EEGNet model architecture used in this project is detailed below:

  • Block 1: Two sequential convolutional steps are performed. First, F1 2D convolutional filters of size (1, 32) are applied to capture frequency information at 2Hz and above. Then, a Depthwise Convolution of size (C, 1) is used to learn a spatial filter. Batch Normalization and ELU nonlinearity are applied, followed by Dropout for regularization. An average pooling layer is used for dimensionality reduction.
  • Block 2: Separable Convolution is used, followed by Pointwise Convolutions. Average pooling is used for dimension reduction.
  • Classification Block: Features are passed directly to a softmax classification with N units, where N is the number of classes in the data.

For further details, refer to the original EEGNet implementation.

Training Setup

  • Optimizer: Adam
  • Batch size: 64
  • Epochs: 500
  • Learning Rate: 0.001
  • Loss Function: Cross Entropy

Requirements

To run the code in this repository, make sure you have the following dependencies installed:

  • Python == 3.7 or 3.8
  • PyTorch == 2.3 (verified working with 2.0 - 2.3, both for CPU and GPU)
  • torch-summary == 1.4.5
  • mne >= 0.17.1
  • scikit-learn >= 0.20.1
  • matplotlib >= 2.2.3

References

If you use this code or the EEGNet model architecture in your work, please cite the original paper of the orignal model:

V. J. Lawhern, A. J. Solon, N. R. Waytowich, S. M. Gordon, C. P. Hung, and B. J. Lance, “EEGNet: A compact convolutional neural network for EEG-based brain–computer interfaces,” Journal of Neural Engineering, vol. 15, no. 5, p. 056013, 2018.

If you used the dataset in your work, please cite the original paper of it:

C. Brunner, R. Leeb, G. Müller-Putz, A. Schlögl, and G. Pfurtscheller, “BCI Competition 2008–Graz data set A,” Institute for Knowledge Discovery (Laboratory of Brain-Computer Interfaces), Graz University of Technology, vol. 16, pp. 1-6, 2008.

评论

暂无评论