Repo for a ultra-simple interface for custom Muse2 EEG BCI. Loosely based on previous work on NeuroFlirt.
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.
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.
The decoder needs to meet the spec of the base decoder class.
In short, the decoder needs to:
- Inherit base decoder and intialize it (w/ correct parameters)
- The decode method needs to take Muse EEG output and produce an integer
This then can be passed into the EventLoop!
- Dynamic eye movement threshold adjustment
- Blinking detection
- Eye open/closed detection
- EventLoop decoder automatic instatiation
- Measure accuracy for horziontal eye movement
- Add support for custom EEG stream