EuroSciPy logo

EuroSciPy 2013

Brussels, Belgium - August 21-24 2013

OpenBCI: Brain-Computer Interfaces with Python in science and education

Pawel Chojnacki

Abstract

OpenBCI [1] is an open source platform written in Python (and C++ for the most demanding modules) for creating flexible brain-computer interfaces (BCIs). Started as an MSc project, it was further developed into a framework for neuroinformatics education and scientific EEG experiments at the Faculty of Physics, University of Warsaw (FUW).

The platform can be used to collect a variety of biomedical signals such as EEG (electroencephalography), ECG (electrocardiography) and EMG (electromyography), with modules handling posturography (using e.g. Nintendo Wii Balance Board), gesture recognition (with Microsoft Kinect) and eyetracking (with simple webcams) proven possible. It served as a base for creating Brain-Computer Interfaces using SSVEP (Steady State Visually Evoked Potential) and P300 paradigms, which allowed users to control a computer or even a robot solely by focusing their thoughts, as presented at CeBIT 2012 [2] and an interactive exhibition in Warsaw [3].

OpenBCI is built from modules communicating via a central multiplexer, which allow dynamic changes of configuration [4]. Due to this structure, it’s a very versatile tool with a variety of applications - from raw data collection to front-end uses as mentioned above. Dynamic scenarios written in Python with full PsychoPy [9] support allow users to claim complete control of even most sophisticated experiments - tracking person's eye movements and brainwaves in real time and administering the varied stimuli accordingly is a matter of several lines of code.

OpenBCI is fully integrated with above-mentioned PsychoPy stimuli manager used for design of psychological experiments and Svarog - Signal Viewer, Analyzer and Recorder On GPL [5], a commercial-grade EEG signal viewer and analyzer, another GPL project started at FUW. Combination of these three projects allowed setting up a complete, fully functional EEG laboratory based entirely on Open Source software at world's first Neuroinformatics BSc [6].

Choosing Python cannot be underestimated in such an interdisciplinary field as neuroscience, which requires constant cooperation of not only programmers, but psychologists, psychiatrists, biologists and medics. Python's ease of learning , accessibility, and similarity to Matlab ® grants users far greater access to the project compared to other programming languages.

OpenBCI serves an additional role in education: undergraduates of Neuroinformatics and Medical Physics majors at the University of Warsaw focus on learning Python as a base of their data analysis skills, which allows them to participate in OpenBCI and other projects by writing their own modules. Since the start of the project four years ago, several bachelor's theses were based on a modules written by students to suit their specific research needs, which wouldn't be as easy using current closed-source alternatives.

Finally, OpenBCI (together with Svarog [5] and PsychoPy [9]) served as a basis for the first commercial-grade EEG recording and analysis system based entirely on GPL software [8], created by BrainTech Ltd. [7]. Current versions of OpenBCI, Svarog and a local fork of PsychoPy are available from http://git.braintech.pl.

References:

[1] P.J. Durka, R. Kuś, J. Ż̇ygierewicz, M. Michalska, P. Milanowski, M. Łabę̨cki, T. Spustek, D. Laszuk, A. Duszyk, M. Kruszyński. User-centered design of brain-computer interfaces: OpenBCI.pl and BCI Appliance Bulletin of the Polish Academy of Sciences, vol. 60, No 3, september 2012, pp. 427-433 http://brain.fuw.edu.pl/~durka/papers/OpenBCI_and_BCI_Appliance.pdf

[2]  http://neurogadget.com/2012/04/02/interview-with-professor-piotr-j-durka-about-the-bci-appliance-developed-at-university-of-warsaw/3839

[3] http://www.gazeta.tv/Wideo/10,130250,14114868,_Posteruj_sobie_dronem____za_pomoca_mysli__Nam_sie.html

[4] P.J. Durka Neuroinformatics Bio-algorithms and Med-systems, 2011, Vol. 7, No. 3, pp 29-34 http://bams.cm-uj.krakow.pl/bams3_pdf/BAMS_15.pdf

[5] http://braintech.pl/svarog

[6] http://neuroinformatyka.pl

[7] http://braintech.pl

[8] http://braintech.pl/Manifesto.html

[9] http://psychopy.org

Sponsors