Skip to content

SupratikB23/Epilepsy-Prediction-and-Detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 EEG Seizure Detection and Prediction using Deep Learning

This repository explores the application of deep learning algorithms for both seizure detection and seizure prediction using Electroencephalogram (EEG) signals.

📊 Project Overview

We implement and compare various deep learning models to detect and predict seizures in patients with neurological disorders. The models are trained and evaluated on Raw EEG samples.

🧪 Dataset

The ‘Seina Scalp Dataset’, was utilized having clinical EEG recordings from epilepsy patients using the 10-20 EEG system and having sampling rate of 512 Hz.

  • Frontal (FP1, FP2, F3, F4, F7, F8, FZ)
  • Central (C3, C4, CZ)
  • Parietal (P3, P4, P7, P8, PZ)
  • Temporal (T7, T8)
  • Occipital (O1, O2)
image

3 channels of EEG data are shown namely - FZ, CZ, PZ channels respectively, along with their categorization of 3 states of seizure – preictal, ictal, postictal.

⚙️ Feature Engineering

  • Down-sampling: EEG recordings were down-sampled from 512 Hz to 128 Hz to reduce computational overhead without any compromise of vital brainwave dynamics.
  • Segmentation: EEG signals were divided into 5-second windows (640 samples per window at 128 Hz). This can help in better detection and prediction without overlapping.
  • Normalization: A specific type of feature scaling is done, called ‘z-score standardization’ in which single EEG epochs were individually normalised, i.e. by subtracting the mean and dividing by the standard deviation. This is applied so that it can reduce inter-patient data variation.
  • Artifact Management: These EEG Segments having extreme outliers, NaN values, or non-biological noise, were clipped, interpolated and removed.

🚀 Models Used

Seizure Prediction

  • Hybrid CNN-BiLSTM
  • Attention-Augmented Multilayer Perceptron (MLP)
  • Transformer-based Model

Seizure Detection

  • Feedforward Neural Network (FNN)
  • Transformer-based Model

🏛️ Model Architecture

DL Architectures Method Pipeline with Deep Learning Model Architectures

📈 Results

Seizure Prediction

Model Accuracy Average Prediction Probabilities
CNN-BiLSTM 0.9833 (98.33%) 0.9692
Autoencoder 0.9696 (96.96%) 0.9383
Attention Model 0.9567 (95.67%) 0.8157

Visual Representation

image

Probability of Preictal Detection across the Temporal Domain of Testing Dataset

Seizure Detection

Model True Positive Area False Positive Area Approx. Accuracy
FNN 0.3 min 0.1 min 0.75 (75 %)
Transformer Model 1 min 0.2 min 0.89 (~90 %)

Visual Representation

image

Temporal Overlay Plot for Seizure Detection

📂 Repository Structure

Poker Hand Prediction
├── Seizure Detection.ipynb  
├── Seizure Detection.ipynb
├── LICENSE 
├── NOTICE 
└── README.md                    

About

Deep Learning algorithms for both seizure detection and prediction on Electroencephalogram (EEG) signals.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors