pyment-public
Science Score: 41.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 20 DOI reference(s) in README -
✓Academic publication links
Links to: medrxiv.org, sciencedirect.com, nature.com -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.4%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: estenhl
- License: other
- Language: Jupyter Notebook
- Default Branch: main
- Size: 78.9 MB
Statistics
- Stars: 37
- Watchers: 1
- Forks: 15
- Open Issues: 2
- Releases: 2
Metadata Files
README.md
This is a repository containing pretrained models for neuroimaging data used in various scientific publications. The publications are listed here, and all the models are listed here. After version 3.0.0 the nature of this repo changed, a description of which can be found in the changelog. The models posted here try to mimic the behaviour and interface of the pretrained models in the Keras applications package. Besides the possibility of importing this library in Python and interacting with the models as Python-objects, we demonstrate three use cases for interaction here: - Jupyter notebooks - Command-line scripts - Docker containers
Installation
Setup
Prior to installing the package and its prerequisites, it is recommended to create a virtual environment. This can be done via Anaconda, which can be downloaded from here. After installation, an environment is created as follows:
conda create --name pyment python=3.9
Via pip
Although the package is not currently available on PyPI, it is possible to install it via pip directly from git, using the following command:
pip install git+https://github.com/estenhl/pyment-public
Manually
It is also possible to download the package from git and manually install it (the following demonstrates how its done on a Unix-based OS).
git clone git@github.com:estenhl/pyment-public.git
cd pyment-public
pip install -r requirements.txt
pip install -e .
Verification
There are two ways the installation can be verified. By running the unit-tests (while still in the pyment-public folder):
pytest tests
If this fails, it is probably the prerequisites that has not been installed properly, rerun
the pip install -r requirements.txt-command and monitor the output. You can also check that the package is properly installed on the system (not from the pyment-public folder):
python -c "import pyment"
If this fails, it is the pip install -e .-command that failed, return to that and check for error messages.
Publications
This is an overview of the publications from where the pretrained models originate. The shorthand-column denotes the name that is used to refer to the publications below. Note that the corresponding author is not necessarily equivalent to what is listed in the publication, but instead refers to the author in charge of the modelling. | Title | Abbreviation | Publication year | Corresponding author | Citation | | --- | :-: | :-: | :-: | :-: | | Deep neural networks learn general and clinically relevant representations of the ageing brain | brain-age-general | 2022 | Esten Høyland Leonardsen | .bib | | Genetic architecture of brain age and its causal relations with brain and mental disorders | brain-age-genetics | 2023 | Esten Høyland Leonardsen | .bib | | Constructing personalized characterizations of structural brain aberrations in patients with dementia and mild cognitive impairment using explainable artificial intelligence | explainable-dementia | 2024 | Esten Høyland Leonardsen | .bib |
Architectures
This is an overview of the model architectures used in the pretrained models. | Name | Abbreviation | Description | | --- | :-: | --- | | RegressionSFCN | sfcn-reg | Base SFCN with a regression prediction head | | RankingSFCN | sfcn-rank | Base SFCN with a ranking prediction head for regression problems | | SoftClassificationSFCN | sfcn-sm | Base SFCN with a softmax prediction head, as per the original SFCN | | BinarySFCN | sfcn-bin | Base SFCN with a binary prediction head for binary classification problems |
Models
This is an overview of the actual pretrained models. The names are what should be used in the python-code to load the correct weights. Note that the names are not necessarily unique, but the tuple (name, architecture) is. The training set size refers to samples, not participants, and can thus have multiple session per participant.
| Name | Architecture | Source publication | Description | Training sample size | Expected out-of-sample error | URL |
| :-: | :-: | :-: | --- | :-: | :-: | :-: |
| brain-age-2022 | sfcn-reg | brain-age-general | Brain age regression model trained on heterogeneous dataset | 34285 | MAE=3.9 | link |
| brain-age-2022 | sfcn-rank | brain-age-general | Brain age ranking model trained on heterogeneous dataset | 34285 | MAE=5.92 | link |
| brain-age-2022 | sfcn-sm | brain-age-general | Brain age soft classification model trained on heterogeneous dataset | 34285 | MAE=5.04 | link |
| dementia-2024-fold-X | sfcn-bin | explainable-dementia | Dementia classification model trained on multiple datasets.
Contains mostly patients with probable AD, but also other aetiologies
Fold number refers to the fold that were held out during training, if no fold is specified the first is used. | 1366 | | fold 0
fold 1
fold 2
fold 3
fold 4
|
License
The code and models in this repo is released under the CC-BY-NC license for non-commercial use.
Citations
If you use a pretrained from this model, please cite the originating publication:
brain-age-general
@article{leonardsen2022deep,
title = {Deep neural networks learn general and clinically relevant representations of the ageing brain},
author = {Esten H. Leonardsen and Han Peng and Tobias Kaufmann and Ingrid Agartz and Ole A. Andreassen and Elisabeth Gulowsen Celius and Thomas Espeseth and Hanne F. Harbo and Einar A. Høgestøl and Ann-Marie de Lange and Andre F. Marquand and Didac Vidal-Piñeiro and James M. Roe and Geir Selbæk and Øystein Sørensen and Stephen M. Smith and Lars T. Westlye and Thomas Wolfers and Yunpeng Wang},
journal = {NeuroImage},
volume = {256},
pages = {119210},
year = {2022},
issn = {1053-8119},
doi = {https://doi.org/10.1016/j.neuroimage.2022.119210},
url = {https://www.sciencedirect.com/science/article/pii/S1053811922003342},
}
explainable-dementia
@article {leonardsen2024constructing,
title={Constructing personalized characterizations of structural brain aberrations in patients with dementia and mild cognitive impairment using explainable artificial intelligence},
author={Esten H. Leonardsen and Karin Persson and Edvard Gr{\o}dem and Nicola Dinsdale and Till Schellhorn and James M. Roe and Didac Vidal-Pi{\~n}eiro and {\O}ystein S{\o}rensen and Tobias Kaufmann and Eric Westman and Andre Marquand and Geir Selb{\ae}k and Ole A. Andreassen and Thomas Wolfers and Lars T. Westlye and Yunpeng Wang and Alzheimer{\textquoteright}s Disease Neuroimaging Initiative and Australian Imaging Biomarkers and Lifestyle flagship study of ageing},
journal={medRxiv},
year={2024},
publisher={Cold Spring Harbor Laboratory Press},
doi={https://doi.org/10.1101/2023.06.22.23291592},
url={https://www.medrxiv.org/content/early/2024/02/22/2023.06.22.23291592},
}
brain-age-genetics
@article{leonardsen2023genetic,
title={Genetic architecture of brain age and its causal relations with brain and mental disorders},
author={Leonardsen, Esten H and Vidal-Pi{\~n}eiro, Didac and Roe, James M and Frei, Oleksandr and Shadrin, Alexey A and Iakunchykova, Olena and de Lange, Ann-Marie G and Kaufmann, Tobias and Taschler, Bernd and Smith, Stephen M and others},
journal={Molecular Psychiatry},
volume={28},
number={7},
pages={3111--3120},
year={2023},
publisher={Nature Publishing Group UK London},
issn = {1476-5578},
doi = {https://doi.org/10.1038/s41380-023-02087-y},
url = {https://www.nature.com/articles/s41380-023-02087-y},
}
Owner
- Name: Esten Leonardsen
- Login: estenhl
- Kind: user
- Twitter: estenhl
- Repositories: 6
- Profile: https://github.com/estenhl
PhD Research Fellow in machine learning and imaging genetics
Citation (citations/brain-age-general.bib)
@article{leonardsen2022deep,
title = {Deep neural networks learn general and clinically relevant representations of the ageing brain},
author = {Esten H. Leonardsen and Han Peng and Tobias Kaufmann and Ingrid Agartz and Ole A. Andreassen and Elisabeth Gulowsen Celius and Thomas Espeseth and Hanne F. Harbo and Einar A. Høgestøl and Ann-Marie de Lange and Andre F. Marquand and Didac Vidal-Piñeiro and James M. Roe and Geir Selbæk and Øystein Sørensen and Stephen M. Smith and Lars T. Westlye and Thomas Wolfers and Yunpeng Wang},
journal = {NeuroImage},
volume = {256},
pages = {119210},
year = {2022},
issn = {1053-8119},
doi = {https://doi.org/10.1016/j.neuroimage.2022.119210},
url = {https://www.sciencedirect.com/science/article/pii/S1053811922003342},
}
GitHub Events
Total
- Issues event: 2
- Watch event: 6
- Issue comment event: 2
- Push event: 3
- Pull request event: 1
- Pull request review event: 1
- Fork event: 1
Last Year
- Issues event: 2
- Watch event: 6
- Issue comment event: 2
- Push event: 3
- Pull request event: 1
- Pull request review event: 1
- Fork event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 1
- Total pull requests: 1
- Average time to close issues: 6 months
- Average time to close pull requests: 3 months
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 6.0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 3 months
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- amirro1 (3)
- RDoerfel (1)
- jmdk73 (1)
- estenhl (1)
- rafaloz (1)
- EllieMo (1)
- JBarsotti (1)
Pull Request Authors
- RDoerfel (2)
- estenhl (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- jupyterlab ==3.2.1
- matplotlib ==3.4.3
- mock ==4.0.3
- nibabel ==3.2.1
- pandas ==1.3.4
- pytest ==6.2.4
- requests ==2.25.1
- scikit-learn ==0.24.2
- tqdm ==4.61.1
- xlrd ==2.0.1