Skip to content

Real-time annotation of EEG data #196

@Remi-Gau

Description

@Remi-Gau

Added as an issue for book keeping

Source:
https://brainhack.ch/past_events/global2021/index.html#bsl-annotations
https://github.com/brainhack-ch/bsl

Add a real-time annotation system compatible with MNE to mark bad segments of EEG data on BSL's real-time viewer using pyqtgraph and pyopengl

Leaders:
Mathieu Scheltienne

EEG data is noisy by nature, and MNE has a very nice feature called annotations to mark bad segments of data. Those segments are then rejected internally by functions accepting the argument reject_by_annotation.
Until recently, interactive annotation on the MNE browser was very painful as the default browser (up to version 1.0) uses an old matplotlib backend... as slow as it gets. But, with version 0.24, a new backend has been introduced using pyqtgraph and pyopengl to render on the GPU. And it is amazing!
But even with this new backend, annotating raw data takes a lot of time, especially on large scale study.
This is where this project comes in. During a typical EEG session, someone will be monitoring the signal. In itself, this is a lightweight task, that could be coupled with a system to annotate in real-time the monitored signal. No more annotation in a later post-processing stage!

The FCBG platform has develop a library called NeuroDecode which has a build-in real-time viewer. This library uses LSL to stream EEG data, and pyqtgraph (rings a bell?) for the viewer. All the data streaming/acquisition/viewing capabilities have been moved and improved in BSL.

Basically, this project doesn't start from scratch! You can find here an example of the real-time viewer that will be modified for this project. The viewer has 2 backends: pyqtgraph and vispy. The second is incomplete, but runs efficiently on GPU. However, it is a bit obsolete as new version of pyqtgraph are now compatible with pyopengl... to run efficiently on GPU.

The objective is to add pyopengl, improve the GUI/add an annotation section, and add click and drag annotation on the backend window.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions