Package: selfeeg
What is selfEEG?selfEEG is a pytorch-based library designed to facilitate self-supervised learning (SSL) experiments on electroencephalography (EEG) data. In selfEEG, you can find different functions and classes which will help you build an SSL pipeline, from the creation of the dataloaders, to the model's fine-tuning, passing by the definitions of custom data augmenters, models, and pretraining strategies.
In particular, selfEEG comprises of the following modules:dataloading- collection of custom pytorch Dataset and Sampler classes as well as functions to split your dataset.augmentation- collection of data augmentation with fully support on GPU as well as other classes designed to combine themmodels- collection of deep neural models widely used in the EEG analysis (e.g. DeepConvNet, EEGNet, ResNet, TinySleepNet, STNet, etc)ssl- collection of self-supervised algorithms (e.g. SimCLR, SimSiam, MoCo, BYOL, etc) with a highly customizable fit method as well as a custom earlyStopper and a function for fine-tuning.losses- collection of self-supervised learning losses.utils- other useful functions to manage EEG dataWhat makes selfEEG good? We have designed some modules keeping in mind EEG applications, but lots of functionalities can be easily exported on other types of signal as well!What will you not find in selfEEG? SelfEEG isn't an EEG preprocessing library. You will not find functions to preprocess EEG data in the best possible way (no IC rejection or ASR). However, some simple operations like filtering and resampling can be performed with functions implemented in the utils and augmentation modules.
If you want to preprocess EEG data in a really good way, we suggest to take a look at:MNE(python based)EEGLAB(matlab based)BIDSAlign(an EEGLab extension provided by our team)installationSelfEEG may be installed both via pip:pip install selfeegAdditionally, optinal but useful packages which we suggest to include in your environment, especially if you plan to work with jupyter, can be automatically installed with the following pip command:pip install selfeeg[interactive]DependenciesselfEEG requires the following packages to correctly work. If you want to use selfEEG by forking and cloning the project, be sure to install them:pandas >=1.5.3scipy >=1.10.1torch >= 2.0.0torchaudio >=2.0.2torchvision >=0.15.2tqdmThe following list was extracted viapipdeptree(github repo). Packages likenumpydoesn't appear because they are dependencies of other listed packages.Optional packages which we suggest to include in your environment are:jupyterlabscikit-learnseaborn (or simply matplotlib)Usagein the Notebooks folder, you can find some notebooks which will explain how to properly use some modules. These notebooks are also included in theofficial documentation.Contribution GuidelinesIf you'd like tocontributeto selfEEG, please take a look at ourcontributing guidelines.If you also have suggestions regarding novel features to add, or simply want somesupportorsuggestionson how to exploit this library in your SSL experiments, please consider writing to our research team.MedMax TeamOur team is open to new collaborations!Requests and bug trackerIf you have some requests or you have noticed some bugs, use theGitHub issuespage to report them. We will try to solve reported major bugs as fast as possible.Authors and CitationWe have worked really hard to develop this library. If you use selfEEG during your research, please cite our work. It will help us to continue doing our research. We are working on a research paper to submit to a journal. Until then, you can cite the following work.@article{del2023applications,title={Applications of Self-Supervised Learning to Biomedical Signals: where are we now},author={Del Pup, Federico and Atzori, Manfredo},year={2023},publisher={TechRxiv}}Contributors:Eng. Federico Del PupM.Sc. Andrea ZanolaM.Sc. Louis Fabrice TshimangaEng. Paolo Emilio MazzonProf. Manfredo AtzoriLicenseSelfEEG is released under theMIT Licence