BciPy: Brain-Computer Interface Software in Python

Reading time: 5 minute
...

📝 Original Info

  • Title: BciPy: Brain-Computer Interface Software in Python
  • ArXiv ID: 2002.06642
  • Date: 2020-02-18
  • Authors: J. Memmott, A. G. W. Gorgolewski, B. Bellec, et al. —

📝 Abstract

There are high technological and software demands associated with conducting brain-computer interface (BCI) research. In order to accelerate the development and accessibility of BCI, it is worthwhile to focus on open-source and desired tooling. Python, a prominent computer language, has emerged as a language of choice for many research and engineering purposes. In this manuscript, we present BciPy, an open-source, Python-based software for conducting BCI research. It was developed with a focus on restoring communication using event-related potential (ERP) spelling interfaces, however, it may be used for other non-spelling and non-ERP BCI paradigms. Major modules in this system include support for data acquisition, data queries, stimuli presentation, signal processing, signal viewing and modeling, language modeling, task building, and a simple Graphical User Interface (GUI).

💡 Deep Analysis

Figure 1

📄 Full Content

Advances in software development significantly move BCI research forward. Open source software platforms such as BCI2000, BCILAB, OpenViBE, Psychtoolbox, PyFF, PsychoPy, and EEGlab have provided platforms to accelerate research in the fields of BCI and cognitive neurosciences (Brainard, 1997;Brunner et al., 2012;Delorme & Makeig, 2004; C. A. Kothe & Makeig, 2013;Peirce, 2009;Renard et al., 2010;Schalk, McFarland, Hinterberger, Birbaumer, & Wolpaw, 2004;Venthur et al., 2010) (See Table 1 for comparison of software). Despite these extant tools, there remains a need for more readily accessible software and platforms that meet end-user requirements. Preferably, new software used to develop and evaluate BCI should be openly distributed and optimized for both research and product distribution (Wessel, Gorgolewski, & Bellec, 2019). The speed and accessibility of this software is important, both for reproducibility and to help accelerate the delivery of end-user systems. We discuss two major programming languages used in the BCI field and propose Python as a superior alternative for open contribution. We will then describe our contribution to the open source effort, BciPy, originally presented at the 7 th annual BCI Society meeting in Asilomar, California, to address the needs we highlight in this introduction (Memmott et al., 2018). This work is not meant to replace existing systems described above or outperform them; on the contrary, it is presented here as an alternate option that will integrate with existing tools wherever possible. Our primary aim is to reduce the barrier for adoption and contribution in the BCI field as a whole. This is essential for any research platform.

To illustrate potential deficiencies in the landscape of available BCI tooling resources, we cite a common BCI programming platform, MATLAB (MathWorks TM ), which utilizes a proprietary language and development environment released in 1984. The insights gained from this platform have been extensive and it remains a popular choice for instruction both inside and outside the classroom. However, as an environment, MATLAB has drawbacks which prevent it from being the ideal platform to distribute and iterate BCI software tooling. Most critically, it is not free. Individual contributors, hobbyists, smaller laboratories, and young scientists may be prohibitively discouraged from joining the research effort due to the platform’s cost. Secondly, embedding MATLAB code into production level software is not an easy task, which raises concerns regarding end-user product distribution. Use of the existing distribution tools provided by MATLAB require additional financial resources and have limited scope. A final concern is speed. While the time requirements for BCI control are somewhat flexible, MATLAB is relatively slow and requires advanced configuration and multiple sessions in order to provide the same multiprocessing features offered by other languages at lower resource costs. Despite these drawbacks however, MATLAB is relatively easy to use and remains appealing to many research groups in conjunction with Psychtoolbox and MATLAB’s Simulink (Brainard, 1997). To bridge this gap, new tooling should be accessible to a wide array of disciplines while maintaining the functionality and flexibility needed to research BCI.

One possible solution to the issues raised above is utilization of Python, an open-source, free, high-level programming language (Python Software Foundation) that makes use of simplified syntax and provides a plethora of out of the box tooling. These qualities make it ideal for new contributors and seasoned engineers alike. The trade-offs mentioned with using low-level languages (such as, C++) usually relate to speed and memory usage. These trade-offs are not always realized though, as many time-critical functions can have lower level bindings to increase speed and then use Python as their declarative interface. Numpy and Pandas, highly used libraries for mathematics and data science, are ideal examples of this pattern (McKinney, 2010;Oliphant & Millma, 2006;Van Der Walt, Colbert, & Varoquaux, 2011). This pattern reduces both the complexity of a given subject and also barriers of entry for scientists without programming expertise. Python has steadily increased in popularity in recent years (David Robinson, 2017) and has been adopted as the official language for universities and countrywide computer science and science courses. Furthermore, the adoption of Python in research and data science fields has led to a plethora of open source libraries and tooling options. A primary language for a BCI system that is both preferred and more easily understood by the larger field is a major benefit of BciPy over the two major adopted BCI platforms (BCI2000 and OpenVibe; See Table 1)

Table 1 Comparison of Software for use in BCI research. A breakdown of the primary programming language, python compatibility, focus on BCI, presence of all modules nee

📸 Image Gallery

cover.png

Reference

This content is AI-processed based on open access ArXiv data.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut