GithubHelp home page GithubHelp logo

frtn70---project-muse-s's Introduction

Predicting a Subject’s Card with the Muse-S Headband

Authors

Theodora Gaiceanu, Diego Figueroa, Daniel Díaz

Description

In this project, we have developed a Brain-Computer Interface system to predict the card a subject is focusing on in real-time with P300 evoked potentials (P300 EPs) recorded with a Muse-S headband. Firstly, we built our dataset, named 4-card dataset: we told subjects to focus on one out of four cards, then showed the cards in intervals of 200 ms, labelling differently the P300 EPs whether the subject was focusing on the current displayed card or not. Secondly, we tested different models to filter and classify the P300 EPs by telling subjects to focus on a card of their choice, then showed cards in intervals of 200 ms to see which one evoked the P300 EPs that correspond to focusing. We conducted offline classification using an existing dataset in order to analyze the performance of several models. Afterwards, we conducted offline classification on the 4-card dataset using the models that performed satisfactory on the existing dataset and some new models. The best model for the existing dataset (obtaining a precision of 0.32 and a recall of 0.69) and for the 4-card dataset (with an average precision of 0.65 and an average recall of 1) used ERP covariances and Xdawn for spatial filtering and Logistic Regression for classification. Lastly, we tested this model for the real-time experiment, obtaining an average precision of 0.07 and an average recall of 0.71.

Flowchart of the project

image

Dependencies & steps to run the code

We used Python programming language, version 3.7.

The following libraries are necessary:

  • Muse LSL - a Python library for communicating with the Muse-S
  • Pyriemann - Python library for Riemannian Geometry
  • MNE-Python - Python library for processing EEG data
  • Timeflux - Python library for real-time processing
  • PsychoPy - Python library used to develop the GUI for our experiment
  • Scikit Learn - Python library for machine learning
  • Numpy - Python library for managing mathematical operations
  • Pandas, Matplotlib, Seaborn - Python libraries for visualizing and analyzing the data
  • MOABB - an open-source framework with multiple EEG datasets - used for offline classification

We recommend to install the library EEG notebooks, as it contains all the necessary packages.

Installation instructions: https://neurotechx.github.io/eeg-notebooks/getting_started/installation.html

Before running our code, turn on the Muse-S device and connect it to the computer by typing "muse lsl stream" in a command prompt terminal.

After installing EEG notebooks, you will have a new Pyhton environment. Run the code in this environment by opening a command prompt terminal and typing the following:

timeflux app_name.yaml -d -e SESSION="session_name" -e SUBJECT="subject_name"

Press A to start saving data. When you think you have enough data, press S.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.