Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jcohenadad opened this issue Nov 24, 2021 · 2 comments
Open

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

jcohenadad opened this issue Nov 24, 2021 · 2 comments

Comments

@jcohenadad
Copy link
Member

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

  • generates waaaay more data than there is originally
  • creates edge effect (partial volume), because the channels are represented as a disk, and every values outside the disk are set to zero.

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
Copy link
Member

mpompolas commented Jan 19, 2022

NIFTI APPROACH

A few updates on this:

The NIFTI files have been significantly reduced in size:
mpompolas/brainstorm3@9037617

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
Copy link
Contributor

ambroiseodt commented Jan 27, 2022

@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

ambroiseodt pushed a commit that referenced this issue Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants