ivadomed / MEEG-Brainstorm

Repository for training MEEG datasets with the ivadomed framework in Brainstorm
1 stars 3 forks source link

Consider a non-Cartesian space for the first two dimensions #7

Open jcohenadad opened 2 years ago

jcohenadad commented 2 years ago

Currently, we resample the channels (eg n=64 channels) into a Cartesian space (eg: 128x128 matrix). This has lots of disadvantages:

An elegant solution would be to encode the coordinates of each channel and use this information to train a model. In this case, we would probably not use spatial convolutions anymore, but a variant of it.

mpompolas commented 2 years ago

NIFTI APPROACH

A few updates on this:

The NIFTI files have been significantly reduced in size: https://github.com/mpompolas/brainstorm3/commit/9037617699330de0cd72dac2d6e11de3d8190aa5

It allows us to use a centercrop in ivadomed of 25x25 (probably even 20x20) 32x32 in the 2 space dimensions, since ivadomed needs values multiple of 16: image

The disc topography representation has also been truncated to get rid of the edge effects: image

TIMESERIES APPROACH

Regarding approaching this problem as a timeseries problem (mChannels x nSamples), I have added some EEG/MEG trials on Duke as described in #10 along a converter from Brainstorm .mat trial files to numpy for people to work in python

ambroiseodt commented 2 years ago

@mpompolas and @jcohenadad An idea would be to represent electrodes as a graph. Several ways of creating such graphs exist but a major improvement is the use of the space dependency between electrodes without using too much data.

In https://arxiv.org/abs/2104.08336, the nodes are the electrodes and weighted edges are given by either (b) or (c) (a): 10-20 system (b): undirected graph where edge weights are based on the euclidian distance between electrodes and nodes are connected to their k closest neighbors (where close means small euclidian distance) (c): directed graph where edge weight between electrode i and j is the cross-correlation between signals of i and j and nodes are connected to their k closest neighbors (where close means high cross-correlation) Capture d’écran 2022-01-27 à 12 41 32

In this paper, they select 19 electrodes (always the same shown in the figure ) in each EEG clip to create the graph, covering every lobes and enabling the model to be independent of the density and number of electrodes Moreover, they show that their model is almost consistent in result even when an entire channel is occluded.

Architecture is as follow: Capture d’écran 2022-01-27 à 13 02 46

They manage to obtain state-of-the-art results on detection and classification of seizure and present a self-supervised training method enabling to use the huge amount of unlabeled data available

In https://arxiv.org/pdf/2106.09135.pdf, the nodes are the electrodes, the feature vector of each node is the signal of the node and several way to put weights are presented in the paper Capture d’écran 2022-01-27 à 13 01 55