Skip to content

gunnkc/MuseBCI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MuseBCI

Repo for a ultra-simple interface for custom Muse2 EEG BCI. Loosely based on previous work on NeuroFlirt.

Usage

Clone the repo, then install it as a library (i.e. pip install <path-to-repo>). The installation should take care of dependencies, but requirements.txt is provided for reference.

You then need to choose an appropriate decoder (or implement your own), and define commands to exectue based on decoder outputs.

Basic Use

Depending on usage, it could be as simple as:

from MuseBCI import EventLoop, SimpleEyeMvmtDecoder

decoder = SimpleEyeMvmtDecoder(sampling_rate=256, duration=10)

commands = {
    1 : func1,  # function you defined
    2 : func2,  # function you defined
    3 : func3   # function you defined
}

loop = EventLoop(
    decoder=decoder,
    commands=commands
)

loop.start()

See examples for further examples.

Implementing Custom Decoder

The decoder needs to meet the spec of the base decoder class.

In short, the decoder needs to:

  1. Inherit base decoder and intialize it (w/ correct parameters)
  2. The decode method needs to take Muse EEG output and produce an integer

This then can be passed into the EventLoop!

In Progress

  • Dynamic eye movement threshold adjustment
  • Blinking detection
  • Eye open/closed detection

TODO

  • EventLoop decoder automatic instatiation
  • Measure accuracy for horziontal eye movement
  • Add support for custom EEG stream

About

Simple BCI repo using MuseEEG

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages