eeg-motor-imagery-classification

EEG Motor Imagery Classification Using CNN, Transformer, and MLP

https://github.com/reshalfahsi/eeg-motor-imagery-classification

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.7%) to scientific vocabulary

Keywords

eeg-classification mne-python motor-imagery-classification
Last synced: 6 months ago · JSON representation ·

Repository

EEG Motor Imagery Classification Using CNN, Transformer, and MLP

Basic Info
  • Host: GitHub
  • Owner: reshalfahsi
  • Language: Jupyter Notebook
  • Default Branch: master
  • Homepage:
  • Size: 9.05 MB
Statistics
  • Stars: 29
  • Watchers: 2
  • Forks: 5
  • Open Issues: 1
  • Releases: 0
Topics
eeg-classification mne-python motor-imagery-classification
Created over 2 years ago · Last pushed 7 months ago
Metadata Files
Readme Citation

README.md

EEG Motor Imagery Classification Using CNN, Transformer, and MLP

colab

CNN-Transformer-MLP An illustration of the CNN-Transformer-MLP model.

The electroencephalogram, or EEG for short, is one of the biosignals that display brain activity in the form of time-series data. EEG can be used to help amputees or paralyzed people move their prosthetic arms via a brain-computer interface (BCI). In order to identify the correct limbs to control from the EEG signal, a combination of CNN, Transformer, and MLP is utilized in this work for motor imagery (MI) classification. CNN converts the epoched EEG signal into meaningful representation in accordance with the signal's non-stationary nature. Transformer finds the global relationship of the given representation from CNN. MLP classifies the expected upper limbs to move based on the extracted information from the Transformer. To gauge the capability of the CNN-Transformer-MLP model, PhysioNet's EEG Motor Movement/Imagery Dataset is used. The model attains an accuracy of 76.4% on the test set.

Experiment

To run the experiment, click here.

Result

Quantitative Result

To quantitatively validate the capability of the CNN-Transformer-MLP model, certain evaluation metrics are employed: accuracy and loss. Accuracy measures how many times the model makes a correct prediction in a particular split of the dataset. Loss quantifies how close the prediction is to the actual label. The loss calculation is utilized in the training stage as well. In this work, the binary cross-entropy (BCE) loss is adopted for the loss function.

Dataset Split | Accuracy | Loss ------------ | ------------- | ------------- Train | 82.9% | 0.201 Validation | 84.4% | 0.269 Test | 76.4% | 0.856

Accuracy and Loss Curve

acc_curve
Accuracy curve on the train set and the validation set.

loss_curve
Loss curve on the train set and the validation set.

Qualitative Result

Here, the qualitative performance of the model is presented.

true_right
Correct prediction on the right arm class.

true_left
Correct prediction on the left arm class.

false_right
False prediction on the left arm class.

Citation

If you think this repository is helpful for your research, you may cite it:

@misc{eegal-fahsi, title = {EEG Motor Imagery Classification Using CNN, Transformer, and MLP}, url = {https://github.com/reshalfahsi/eeg-motor-imagery-classification}, author = {Resha Dwika Hefni Al-Fahsi}, }

Credit

Owner

  • Name: Resha Dwika Hefni Al-Fahsi
  • Login: reshalfahsi
  • Kind: user
  • Location: Yogyakarta, Indonesia

Experienced Tensorbender Strolling in the Latent Space

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you think this repository is helpful for your research, you may cite it:"
title: "EEG Motor Imagery Classification Using CNN, Transformer, and MLP"
authors:
  - family-names: Al-Fahsi
    given-names: Resha Dwika Hefni
url: https://github.com/reshalfahsi/eeg-motor-imagery-classification

GitHub Events

Total
  • Watch event: 11
  • Issue comment event: 1
  • Push event: 1
  • Fork event: 2
Last Year
  • Watch event: 11
  • Issue comment event: 1
  • Push event: 1
  • Fork event: 2

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 2
  • Total pull requests: 0
  • Average time to close issues: less than a minute
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.5
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • ValentinaMiller (2)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels