Code Monkey home page Code Monkey logo

neerajwagh / eeg-self-supervision Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 4.0 55 KB

Resources for the paper titled "Domain-guided Self-supervision of EEG Data Improves Downstream Classification Performance and Generalizability". Accepted at ML4H Symposium 2021 with an oral spotlight!

License: MIT License

Dockerfile 0.87% Python 79.25% Jupyter Notebook 19.87%
eeg self-supervised-learning self-supervision multi-task-learning representation-learning deep-learning biosignals convolutional-neural-networks domain-driven-design electroencephalogram

eeg-self-supervision's Introduction

Domain-guided Self-supervision of EEG Data Improves Downstream Classification Performance and Generalizability

Authors: Neeraj Wagh, Jionghao Wei, Samarth Rawal, Brent Berry, Leland Barnard, Benjamin Brinkmann, Gregory Worrell, David Jones, Yogatheesan Varatharajah

Affiliation: University of Illinois at Urbana-Champaign, Mayo Clinic

Work accepted in proceedings of the ML4H Symposium 2021 with an oral spotlight!

Installation

  • A dockerfile is provided with all Python dependencies.

Mapping naming conventions between the paper and code

  • Models:
    • FULLSSL in code refers to "HS+BSE+AC" in the paper.
    • DBRTriplet refers to "BSE+AC".
    • BTTriplet refers to "HS+AC".
    • BTDBR refers to "HS+BSE".
    • Triplet refers to "AC only".
    • DBR refers to "BSE only".
    • BT refers to "HS only".
    • SOTA refers to "ShallowNet".
  • Tasks:
    • "EEG Grade" is the "condition" task with TUH dataset.
    • "Eye State" is the "condition" task with Lemon dataset.

Command Line Arguments

  • Input choices for tasks: "condition", "gender", "age".
  • Input choices for dataset: "lemon", "tuh".
  • Input choices for ablation models: "FULLSSL", "DBRTriplet", "BTTriplet", "BTDBR", "Triplet", "DBR", "BT".

How to Reproduce the Results Reported in the Paper

  1. Download resources folder, which contains pre-computed feature arrays(power spectral density, topographical maps data, and preprocessed timeseries), metadata from Box. Place it in the root directory of the project.
  2. Enter evaluation folder.
  3. To evaluate linear baseline, run the following command:
python linear_baseline_eval.py --dataset={dataset choice} --task={task choice}
  1. To evaluate proposed ablation models, run the following command:
python ablation_models_eval.py --gpu_idx={gpu index} --dataset={dataset choice} --task={task choice} --mode={ablation model choice}
  1. To evaluate SOTA model, run the following command:
python SOTA_eval.py --gpu_idx={gpu index} --dataset={dataset choice} --task={task choice} 

How to Fine-tune Existing Pre-trained Models for Downstream Tasks

  1. Download resources folder from Box. Place it in the root directory of the project.
  2. Enter Fine-tune folder.
  3. To fine-tune ablation models, run the following command:
python ablation_pipeline.py --gpu_idx={gpu index} --dataset={dataset choice} --task={task choice} --mode={ablation model choice}
  1. To fine-tune SOTA model, run the following command:
python SOTA_pipeline.py --gpu_idx={gpu index} --dataset={dataset choice} --task={task choice}

How to Perform Supervised Learning for Downstream Tasks

  1. Download resources folder from Box. Place it in the root directory of the project.
  2. Enter supervised_learning folder.
  3. To train the supervised learning models, run the following command:
python linear_baseline_train.py --dataset={dataset choice} --task={task choice}

[Work in Progress] - How to Perform Pre-training using Domain-guided Self-superivsed Tasks

[Work in Progress] - How to Use Your Own Dataset to Train the Self-supervised Learning Tasks

Contact

Citation

Wagh, N., Wei, J., Rawal, S., Berry, B., Barnard, L., Brinkmann, B., Worrell, G., Jones, D. & Varatharajah, Y.. (2021). Domain-guided Self-supervision of EEG Data Improves Downstream Classification Performance and Generalizability. Proceedings of Machine Learning for Health, in Proceedings of Machine Learning Research 158:130-142 Available from https://proceedings.mlr.press/v158/wagh21a.html.

eeg-self-supervision's People

Contributors

johnw02 avatar neerajwagh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.