Skip to content

lil-aditya/mind-to-text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

🧠 EEG-Based BCI for Mind-to-Text Communication

A Brain-Computer Interface (BCI) system that decodes P300 EEG signals into text using both classical machine learning and deep learning (EEGNet).

This project enables communication for ALS patients by translating brain signals into five-letter Spanish words via a 6×6 P300 speller matrix.


Key Highlights

  • Dataset: BNCI Horizon 2020 — P300 Dataset (008-2014)
  • Subjects: 8
  • Sampling Rate: 250 Hz
  • EEG Channels: Fz, Cz, P3, Pz, P4, PO7, PO8, Oz
  • Output: Decoded 5-letter words
  • Approaches:
  • Classical Machine Learning (6 models)
  • Deep Learning (EEGNet + Optuna tuning)

System Overview

Pipeline

  1. Raw EEG Signals
  2. Preprocessing & Feature Extraction
  3. Classification (ML / EEGNet)
  4. Row-Column Decoding
  5. Word Reconstruction

Project Structure

File Description
classical.py Classical ML pipeline with 6 classifiers
eegnet_final.py EEGNet deep learning pipeline
FINAL_RESULTS_COMPARISON Aggregated results
requirements.txt Dependencies
README.md Documentation

Models Used

Classical ML Models

  • Linear Discriminant Analysis (LDA)
  • Logistic Regression
  • Support Vector Machine (RBF Kernel)
  • Support Vector Machine (Linear Kernel)
  • K-Nearest Neighbors (KNN)
  • Gaussian Naive Bayes

Deep Learning Model

EEGNet Architecture:

  • Temporal Convolution → (F1 = 32, Kernel = 64)
  • Depthwise Spatial Convolution → (D = 2)
  • Separable Convolution → (F2 = 32)
  • Fully Connected Layer

Training Features:

  • Weighted Binary Cross-Entropy Loss
  • pos_weight × 1.5
  • F2-score based early stopping
  • Optuna hyperparameter tuning

Installation

Install all dependencies:

pip install -r requirements.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors