The seizure is the most common disease which has affected more than 65 million people causing deaths of 15% to 20% of them. Most current computational medical research focuses on seizure detection at the time of the occurrence of brain abnormalities. By performing brainwave analytics we can predict the future occurrence of a seizure and save the lives of millions of people.

What it does

Our web application targets patients with brain abnormalities such as seizure and epilepsy. We analyzed the EEG waves as a time series prediction task using Machine Learning. The pre-trained model predicts the future occurrence of seizure by analyzing the EEG brainwaves of the user. By constantly wearing the Muse Headband, the user feeds input to the model to improve its prediction accuracy. With optimal hyperparameter selections, our model can predict new patients' wave patterns AND whether or not a seizure is likely to occur at a future timestamp with 91% accuracy.

How we built it

We followed the approach by the state of the art epileptic seizure prediction architecture presented in the prestigious Computers in Biology and Medicine International Journal. We used a Long short-term memory (LSTM) network to pre-train a model on published EEG datasets of children with epileptic disorders by splitting the dataset into training(70%), testing(20%), and validation(10%) sets. Then we created a web application which provides real-time EEG monitoring and seizure prediction and we used Cloud Machine Learning Engine to calculate predictions of EEG signals intercepted from the Muse Headband, and deployed our app on Google Cloud Platform(GCP).

Challenges we ran into

First off, the Muse headband SDK is deprecated. Secondly, we spent a good 7 hours on data cleaning and feature extraction because contrary to common time-series data where there is one data point per time unit per sample, EEG signals outputs different channels correlated to different parts of the brain signals per second. We basically had trouble shaping our data into the correct dimension. Given our lack of background in the medical field, we struggled with understanding the implementation of the research paper comparing the output EEG signals of the Muse Headband against the standard EEG channel representations. Figuring out EEG feature extraction was also a struggle. We eventually found out that we could calculate the insightful Power Spatial Density values from the input EEG signal dataset by applying Fast Fourier Transformation using python libraries we discovered.

Accomplishments that we're proud of

We successfully reproduced the architecture presented in the journal in a field that is foreign to us all. In spite of not having expertise in a particular field, we learned how to hack different aspects of the project by learning them and by collaborating with each other.

What we learned

We learned skills like time management, teamwork, decision making, and critical thinking.

What's next for Brainalyzer - Seizure Predictor

We are looking forward to improving the project for more accuracy. We will perform more feature extraction methods and conduct more parameter tuning on the trained model. Furthermore, we more attempt to implement other time series forecasting ML models for detecting brain abnormalities. We look forward to helping as many people as possible who are suffering from brain disorders.

Built With

  • cloud-ml-engine
  • flask
  • gcp
  • keras
  • lstm
  • python
  • rest-api
  • tensorflow
Share this project: