Software for pure Hybrid BCI Development

Alexander_ZuestAlexander_Zuest Switzerland
edited March 2020 in Software

Hi everyone
I’m currently evaluating which software I shall use for my project. The objective is to design a pure hybrid BCI-System – pure hybrid in the way that it facilitates multiple BCI-paradigms for device control.
I consider following paradigms for implementation:

  • Motor imagery (2 class right/left hand or 3 class right/left hand and feet)
  • (simple) Affective BCI (concentration, meditation, sleep)
  • (more complex) affective BCI (valence/arousal or positive negative) (optional)
  • ErrP Error-related Potential

My project pipeline is quite standard for BCI development and includes a trial phase with around 6 subjects to collect training data for the above described paradigms. The BCI will be applied in device control and simple above threshold state output should be sufficient.
Thereafter I would require a System with online capabilities. I did some research and found about 8 BCI software and libraries. Jet some of them have not been updated within the last 10 years (BCI++,Pyff, xBCi). Beside those, there are also:

BCILAB (Matlab toolbox and extension of EEGLAB)
Installed it, I have some troubles with the GUI and the replay function does not work. It isn’t really actively supported anymore as it seems and only partially compatible with newer Matlab versions (last fixes in 2015). Offers online and offline processing as well as different modes of visualization. What makes this platform so interesting are the machine learning capabilities. (EEGLAB is kept up to date and working fine)

Tobi (EU software project)
Multi million EU project, does not seem to be publicly available... does anyone know if it is?

BCI2000
BCI2000 includes software tools that can acquire and process data, present stimuli and feedback, and manage interaction with outside devices such as robotic arms. BCI2000 is a real-time system that can synchronize EEG and other signals with a wide variety of biosignals and input devices such as mice or eye-trackers. It has several modules to manage data importing and exporting in common file formats.
It offers a subject screen which displays task to fulfill, which is useful for ERP and MI applications. Unclear if ML is supported.

OpenViBE
Last update in 2018. OpenViBE is a software for real-time neurosciences. It can be used to acquire, filter, process, classify and visualize brain signals in real time. Since v2.2.0, OpenViBE also includes a tool for offline or batch analysis of large datasets. Includes GUI.
Does it offer Machine Learning capabilities?

MNE
open-source Python (C/C++/Matlab with limited capabilities) module for processing, analysis, and visualization of functional neuroimaging data. Still updated.
Does anyone know if it is capable of online classification and meant for BCI design as such? Or is it more comparable to EEGLAB?

Following state of the art research for classification Deep learning methods seem to be the only thing applied. But there also seems to be a lot of offline studies without online implementations. Especially for classification of emotion it seems that some ML capabilities are required. For ERP and MI it would be at least beneficial.
Furthermore, as far as I read BCI2000 is the only platform with a screen to show the subject the current task and set markers in the EEG recordings. How do you handle this with the other software?

I would be really thankful if you could share your experiences with similar projects, your used software, or if you could answer one of the above questions.
I would personally prefer to use with Matlab (or C/C++) as I am already familiar with those languages. Matlab would also bring the advantage of implementing functions from other toolboxes (i.e. Signal Processing and Deep Learning)

Thx.
Alex

*Disclaimer: parts of the above descriptions are directly copied from the software providers respective webpages

Comments

  • wjcroftwjcroft Mount Shasta, CA
    edited March 2020

    Alex, hi.

    re: MNE real-time BCI

    Have you looked at MNE Scan and MNE-CPP?

    https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5940556/
    https://www.mne-cpp.org/

    The C++ support also means it will mesh well with the new OpenBCI BrainFlow library. Mentioning Andrey Parfenov @andrey1994.

    My impression is that Matlab / BCILAB / EEGLAB, being based on a large (and sometime interpreted) language, may have disadvantages in doing complex, real-time computation intense tasks. BCILAB developers have moved on to NeuroPype. If you have an Academic email, you may want to evaluate NeuroPype.

    https://www.neuropype.io/
    https://www.intheon.io/
    https://www.intheon.io/team

    Although MNE supports both Python and C++, the more compute intensive work could be done in C++, with Python available for less demanding algorithms. NeuroPype also has a basis in Python.

    Andrey may have some comments on his experience with MNE.

    While OpenViBE at low levels is C++ based, it may be more accessible to OpenViBE internal developers at this level, and less tailored to end user access via C++. Many end users access OpenViBE features through the built-in OpenViBE 'box' algorithms.

    Regards, William

  • We dont have an SDK for Matlab as well as many other vendors. I think Matlab makes sense only for offline data processing. Solutions like "lets stream data via LSL to Matlab" are not good in my opinion. First of all you will need to run several processes and its bad for automation and you will need to develop your own SDK on top of LSL. Moreover C++ looks preferable for tasks like device control and application development.

    << The C++ support also means it will mesh well with the new OpenBCI BrainFlow library.
    API is the same across all bindings and all of them do the same, so C++ or Python or smth else doesnt matter

    There is no application which supports all of these items from the box

    • Motor imagery (2 class right/left hand or 3 class right/left hand and feet)
    • (simple) Affective BCI (concentration, meditation, sleep)
    • (more complex) affective BCI (valence/arousal or positive negative) (optional)
    • ErrP Error-related Potentia

    I think you just need an SDK to get data from device and maybe apply some filters. I can recommend BrainFlow for it https://brainflow.readthedocs.io/en/stable/ or maybe BrainFlow + MNE. Check these samples as reference https://brainflow.readthedocs.io/en/stable/Examples.html#python-get-data-from-a-board the same for C++ and other languages.

    To get data using BrainFlow API in a real time I think you need to create a thread and do smth like:

    while keep_alive:
        data = board.get_board_data()
        # process it here and send commands to devices
        time.sleep(0.5)
    

    In this thread.

    Another option which I can recommend is to develop a plugin for MNE-Scan application. Its in early stage of development but its well designed and I have BrainFlow plugin for it. wiki.mne-cpp.org/index.php/Portal:Develop

  • MNE_Scan is written using QT and it requires some programming experience to develop plugins for it. Timeflux https://timeflux.io/ is python based and a little easier to get started.
    But I would develop it from the scratch using only libraries without 3rd party applications.

  • wjcroftwjcroft Mount Shasta, CA
    edited March 2020

    Andrey, thanks for the great comments and suggestions.

    Alex, your list of "...I consider following paradigms for implementation...", I interpret that, as you will be choosing 'some' of these, but not using all concurrently, is that correct?

    Re: OpenViBE and MI, I assume you saw their page,

    http://openvibe.inria.fr/motor-imagery-bci/

    Where they mention the existing 'scenarios' and classifier training, which is a form of machine learning. Jeremy also did a tutorial:

    http://blog.jfrey.info/2015/03/03/openbci-motor-imagery/

    Regards, William

  • wjcroftwjcroft Mount Shasta, CA

    Alex, what is your definition of 'pure' hybrid? I'm not clear on the use of pure. I do understand you are wanting to multiple paradigms simultaneously. What is an example of non-pure hybrid?

  • Alexander_ZuestAlexander_Zuest Switzerland
    edited March 2020

    @wjcroft said:
    Alex, what is your definition of 'pure' hybrid? I'm not clear on the use of pure. I do understand you are wanting to multiple paradigms simultaneously. What is an example of non-pure hybrid?

    "pure" basically just means that only EEG paradigms are used. Examples for other paradigms would be heart rate, blood pressure and all kind of other biosignals.

    @wjcroft @Andrew1994 thank you very much for all the recomendations!
    I applied for a Neuropype Licence, but didn't receive an answer jet. I'm currently fully occupied with the subject trial design. For MI trials I will most likely use BCI2000 / PychoPy3.
    I will have a closer look at MNE, OpenViBE and Neuropype as soon as possible.

    @wjcroft said:
    Andrey, thanks for the great comments and suggestions.

    Alex, your list of "...I consider following paradigms for implementation...", I interpret that, as you will be choosing 'some' of these, but not using all concurrently, is that correct?

    >

    currently I plan to implement:

    • Motor imagery (3 class right/left hand and feet)
    • (simple) Affective BCI (concentration, meditation, sleep)
    • ErrP Error-related Potential for correction of misclassified MI

    MI should run more or less real time, ErrP detection only after MI activation and affective BCI functionalities would be sufficient in certain intervals (~5s?)

    again thx for your help I appreciate it !!!
    Alex

Sign In or Register to comment.