Metadata-Version: 2.4
Name: MEGnet-neuro
Version: 0.3.5.1
Summary: Package to calculate and classify ICAs using MEGNET deep learning architecture
Author-email: Jeff Stout <stoutjd@nih.gov>, Allison Nugent <nugenta@nih.gov>
License-Expression: LicenseRef-LICENSE
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX
Requires-Python: >3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mne<1.13,>1.10
Requires-Dist: numpy
Requires-Dist: scipy
Requires-Dist: pandas
Requires-Dist: munch
Requires-Dist: nibabel
Requires-Dist: joblib
Requires-Dist: torch
Requires-Dist: keras>3.0
Requires-Dist: scikit-learn
Requires-Dist: huggingface_hub>=0.24.0
Requires-Dist: matplotlib
Requires-Dist: pillow
Provides-Extra: dev
Requires-Dist: stabilized-ica; extra == "dev"
Provides-Extra: testing
Requires-Dist: datalad; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pygit2; extra == "testing"
Dynamic: license-file

# MEGNET
[![megnet-tests](https://github.com/nih-megcore/MegNet/actions/workflows/megnet-actions.yml/badge.svg)](https://github.com/nih-megcore/MegNet/actions/workflows/megnet-actions.yml)

This repository is a fork of the code listed below in the original code reference.  This repository adds an automated processing wrapper and python package installation around the original codebase.  The current codebase utilizes mne python to preprocess the data, generate the infomax ICA components (n=20), circular topography maps, and timeseries outputs.  The architecture of neural net has been preserved, however, the weights have been reset to uniform distribution and retrained using repository data from MEGIN, CTF, 4D, and KIT systems.

## Install (pytorch based version) 
Tested compatability: (mne 1.10/1.11/1.12 & python 3.11/3.12/3.13/3.14)
```
conda create -n megnet 'mne>1.10,<1.13' 'python>3.10'
conda activate megnet
pip install MEGnet-neuro
megnet_init  #Download model weights from hugging face
```

## Conda package

The conda-forge v1 recipe and local build instructions are in
[`conda/`](conda/README.md). Until the recipe is accepted and published by
conda-forge, build it locally with `rattler-build`. After publication, install
the package with:

```bash
conda create -n megnet -c conda-forge megnet-neuro
conda activate megnet
megnet_init  # Download model weights from Hugging Face
```

## Install (tensorflow based version) 
Tested compatability: (mne 1.10/1.11/1.12  & python 3.10/3.11/3.12/3.13) (py restricted by tensorflow builds)
```
conda create -n megnet 'mne>1.10,<1.13' 'python<3.14'
conda activate megnet
pip install 'MEGnet-neuro-tf'
megnet_init #Download model weights from hugging face
```

## Original Code Repository
https://github.com/DeepLearningForPrecisionHealthLab/MegNET_2020 <br>
Manuscript available: https://pubmed.ncbi.nlm.nih.gov/34274419/ <br>
DOI: https://doi.org/10.1016/j.neuroimage.2021.118402 <br>
PMID: 34274419 <br>
