Skip to content

Emotion classification from Brain EEG signals using a hybrid CNN-Transformer model and various ML algorithms.

Notifications You must be signed in to change notification settings

ahmed-alllam/Brain-EEG-Emotion-Classifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License LinkedIn


Emotions classifier Model from Brain EEG Signals

Report Bug · Request Feature

About The Project

The Emotions classifier Model from Brain EEG Signals project focuses on developing a model for classifying emotions based on brain EEG signals. The project employs a combination of deep learning and machine learning techniques to achieve accurate emotion classification. The model's architecture includes both Convolutional Neural Network (CNN) and Transformer components, inspired by the EEG Conformer architecture introduced by Song et al. in their 2023 IEEE paper1.

Features:

The project offers the following features:

  • Utilizes a hybrid architecture combining Convolutional Neural Network (CNN) and Transformer components for effective EEG-based emotion classification1.
  • Implements various machine learning models, including Logistic Regression, Support Vector Machine (SVM), Random Forest Classifier, and Multi-Layer Perceptron (MLP) Neural Network, to compare performances.
  • Employs data visualization using tools like Seaborn to gain insights into EEG signal characteristics.

Conformer Architecture

Data Source

The EEG data used for this project is sourced from a study that employed four dry extra-cranial electrodes via a commercially available MUSE EEG headband2. The EEG data was collected from two subjects (1 male, 1 female, aged 20-22) for each of the six emotional states (positive, negative, neutral) evoked by specific film clips. The dataset includes 324,000 data points collected from the brain's waves, which were resampled to 150Hz. Neutral brainwave data was also collected, serving as a third class representing the resting emotional state of the subjects. The EEG data was recorded from four electrodes (TP9, AF7, AF8, TP10) and was processed to generate a dataset of statistical features extracted through a sliding window of 1 second, beginning at t=0 and t=0.52. This resulted in a dataset with both EEG features and emotion labels.

Tech Stack

The project utilizes the following technologies and libraries:

  • PyTorch
  • Scikit-Learn
  • Pandas
  • Seaborn

Contact

Ahmed Allam - LinkedIn - [email protected]

References

Footnotes

  1. Song, Yonghao et al. "EEG Conformer: Convolutional Transformer for EEG Decoding and Visualization." IEEE Transactions on Neural Systems and Rehabilitation Engineering 31 (2023): 710-719. 2

  2. Bird, Jordan et al. "Mental Emotional Sentiment Classification with an EEG-based Brain-machine Interface." Proceedings of a Conference (2019). 2

About

Emotion classification from Brain EEG signals using a hybrid CNN-Transformer model and various ML algorithms.

Topics

Resources

Stars

Watchers

Forks