-
Notifications
You must be signed in to change notification settings - Fork 15
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
API and GUI: Creating a highly informative example/jupyter notebook for IC labeling #12
Comments
Additional reference: |
^ In addition to the above tutorials, and in line with discussion today on Zoom, we want a lightweight pipeline in-house to annotate IC components that has the following features:
I wonder if others have already done so. I can ask in the MNE-core dev meeting. @mscheltienne brought up mnelab, which might have a subset of the above features. |
For discussion next week: I was thinking that if we want to produce an "annotation" pipeline, we want to fire up the following subplots:
Possibly also with a corresponding time-series plot of all ICA components. This subplot would be repeated for all ICA components, and the user would be required to create a list of ICA component labels. The question is how to make this interactive. At the very minimum, we should have a "utility" function perhaps in mne-icalabel that automatically produces all those subplots for a single ICA component, perhaps something like:
Following the plots shown here: https://labeling.ucsd.edu/tutorial/labels |
Agree. The single-trial time-course is optional I think, personally, I'm mostly looking at the 3 first features you listed. Also, we need to decide on the label classes: |
Is there any reason to do all the sub-classes of non-brain (i.e. ocular, cardiac, etc.)? I feel like the utility is low. On the other hand, labeling them accurately can be beneficial for power-users who want to work with a specific signal(?). I suppose labeling heart-beat is also nice, cuz hypothetically someone can use EEG and back out "EOG" and "heart-rate" data. |
For me personally having EOG and ECG labeled as such would be very beneficial |
Okay, I was on the border, so I'm convinced :p. I suppose we should just follow the ICLabel set of labels then. @hoechenberger do you know a good pipeline accessible in MNE that we can annotate ICA components like this? I think the current GUI just marks "include/exclude". |
I think ocular and heartbeat could be labeled as such, as both are super easy to spot. For the others.. I'm not sure there is much gain, and the distinction between 'channel noise' and 'muscle' might be a bit difficult to do. |
I'm not exactly sure I fully understand the question; what I do (and what we do in the MNE-BIDS-Pipeline) is that we run |
We are looking for a nice GUI, simple to use that displays a couple of features per component (topoplots, PSD, time-series, ...) and lets you select which category these components are; and then we want to adapt it to load and save simply our files and ICs in a format that we can use for benchmarking or training. |
Honestly I think I would cook up an extremely simple Qt window that:
In the MNE-BIDS-Pipeline we create TSVs like this:
|
That's what I had in mind as well. Maybe we can re-use some widget or stuff from |
Reference to the ICA step that creates the "derived" files: https://github.com/mne-tools/mne-bids-pipeline/blob/main/scripts/preprocessing/_04a_run_ica.py |
Now that #60 has been merged, the next steps are to:
Ideally we can get this done by IIRC we said last meeting early June(?), say June 10th? Need this pipeline to make the hs student able to annotated during the month of July. for point 1. above, we'll need to make IO safe calls to update a tsv file from an interactive GUI, but otw I don't think too many technical challenges. The visualization aspects for the ICA, we can maybe borrow from MNE, or MNE-BIDS-Pipeline, or just embed the ICA.plot_properties() figure statically and then have a few buttons? |
This dataset can be used for testing: https://openneuro.org/datasets/ds004132/versions/1.0.0 I'll add soon a 200+ EGI device dataset. |
TODO:
|
I've been lagging @mscheltienne with some stuff that's come up. Apologies! Hoping to put up a sketch of the code at the very least tonight tho so we can take a "look together". |
Data specs:
Workflow specs:
Ideally we can embed the time-series plot using a pyQT GUI which is dynamic (e.g. mne-qt-browser does this for Raw). |
Dataset tasksMara dataset:
ANTS (to preprocess and label):
Nihon Kohden Epilepsy EEG dataset (to preprocess and label):
Let's converge a pipeline for every dataset: E.g. https://github.com/mscheltienne/neurotin-analysis/tree/main/neurotin/preprocessing TODO:
Lmk if I missed anything? |
Epilepsy EEG -> EGI (different manufacturer, sponge-based electrode)? |
Epilepsy EEG is Nihon Kohden and not sure on the electrode :p. |
Oh OK ahah For the preprocessing pipeline, this is what I would go for:
And here is the post with the rule of thumb for the number of samples to provide: https://mne.discourse.group/t/ideal-length-of-epochs-ideal-number-of-components-for-ica/4865/2 |
The discourse post seems to suggest 1-2 second epochs? However, we want to do 1 minute right? |
That is for cleaning by rejecting epochs, the part that interest us is:
|
@anandsaini024 and @mscheltienne I made a new repo to house our common data processing and also final analysis scripting, so we don't have to keep sending gists to each other. I invited you guys as admins on the repo. I added some details of our discussion to the |
Can be closed now by the introduction of the GUI and API for labeling: #66 |
We'll need an example/notebook walking through any team member on how the guidelines for labeling IC components are.
Ideally this notebook/example can be used by team asynchronously to
Reference: https://www.sciencedirect.com/science/article/pii/S0165027015000928?via%3Dihub
The text was updated successfully, but these errors were encountered: