https://github.com/wwu-mmll/deepbet

Fast brain extraction using neural networks

https://github.com/wwu-mmll/deepbet

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
    Links to: sciencedirect.com
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.7%) to scientific vocabulary

Keywords

brain-extraction deep-learning neuroimaging python segmentation skull-stripping
Last synced: 6 months ago · JSON representation

Repository

Fast brain extraction using neural networks

Basic Info
  • Host: GitHub
  • Owner: wwu-mmll
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 28.1 MB
Statistics
  • Stars: 40
  • Watchers: 3
  • Forks: 3
  • Open Issues: 2
  • Releases: 2
Topics
brain-extraction deep-learning neuroimaging python segmentation skull-stripping
Created over 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md


This is the official implementation of the deepbet paper.

deepbet is a neural network based tool, which achieves state-of-the-art results for brain extraction of T1w MR images of healthy adults, while taking ~1 second per image.

Usage

After installation, there are three ways to use deepbet 1. deepbet-gui runs the Graphical User Interface (GUI)

deepbet-gui

  1. deepbet-cli runs the Command Line Interface (CLI)

bash deepbet-cli -i /path/to/inputs -o /path/to/output/brains

  1. Run deepbet directly in Python

```python from deepbet import run_bet

inputpaths = ['path/to/sub1/t1.nii.gz', 'path/to/sub2/t1.nii.gz'] brainpaths = ['path/to/sub1/brain.nii.gz', 'path/to/sub2/brain.nii.gz'] maskpaths = ['path/to/sub1/mask.nii.gz', 'path/to/sub2/mask.nii.gz'] tivpaths = ['path/to/sub1/tiv.csv', 'path/to/sub2/tiv.csv'] runbet(inputpaths, brainpaths, maskpaths, tivpaths, threshold=.5, ndilate=0, no_gpu=False) ```

Besides the input paths and the output paths

  • brain_paths: Destination filepaths of input nifti files with brain extraction applied
  • mask_paths: Destination filepaths of brain mask nifti files
  • tiv_paths: Destination filepaths of .csv-files containing the total intracranial volume (TIV) in cm³
    • Simpler than it sounds: TIV = Voxel volume * Number of 1-Voxels in brain mask

you can additionally do

  • Fine adjustments via threshold: deepbet internally predicts values between 0 and 1 for each voxel and then includes each voxel which is above 0.5. You can change this threshold (e.g. to 0.1 to include more voxels).
  • Coarse adjustments via n_dilate: Enlarges/shrinks mask by successively adding/removing voxels adjacent to mask surface.

and choose if you want to use GPU (only NVIDIA supported) for speedup

  • no_gpu: deepbet automatically uses the NVIDIA GPU if available. If you do not want that, set no_gpu=True.

Installation

For accelerated processing via GPU, it is recommended to first install PyTorch separately via a command customized for your system.

Then the package itself can be installed via bash pip install deepbet Due to this issue, the GUI can look ugly, which can be resolved via bash conda install -c conda-forge tk=*=xft_*

Citation

If you find this code useful in your research, please consider citing

bibtex @article{deepbet, title = {deepbet: Fast brain extraction of T1-weighted MRI using Convolutional Neural Networks}, journal = {Computers in Biology and Medicine}, volume = {179}, pages = {108845}, year = {2024}, issn = {0010-4825}, doi = {https://doi.org/10.1016/j.compbiomed.2024.108845}, url = {https://www.sciencedirect.com/science/article/pii/S0010482524009302}, author = {Lukas Fisch and Stefan Zumdick and Carlotta Barkhau and Daniel Emden and Jan Ernsting and Ramona Leenings and Kelvin Sarink and Nils R. Winter and Benjamin Risse and Udo Dannlowski and Tim Hahn}, }

Owner

  • Name: Medical Machine Learning Lab - University of Münster
  • Login: wwu-mmll
  • Kind: organization
  • Location: Münster, Germany

Machine Learning team at University of Münster, Institute for Translational Psychiatry

GitHub Events

Total
  • Issues event: 2
  • Watch event: 15
Last Year
  • Issues event: 2
  • Watch event: 15

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 161 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 5
  • Total maintainers: 1
pypi.org: deepbet

Fast brain extraction using neural networks

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 161 Last month
Rankings
Dependent packages count: 10.0%
Stargazers count: 14.8%
Average: 20.3%
Dependent repos count: 21.7%
Forks count: 22.6%
Downloads: 32.1%
Maintainers (1)
Last synced: 6 months ago