DeepBrain
Brain image processing tools using Deep Learning focused on speed and accuracy.
Available tools:
Extractor
Extract brain tissue from T1 Brain MRI (i.e skull stripping).
Extractor runs a custom U-Net model trained on a variety of manual-verified skull-stripping datasets.
Why choose Extractor over others (e.g. BET FSL, ANTs, PINCRAM)?
-
Extractoris fast. It's CNN was implemented on Tensorflow and carefully designed to be as small as possible (i.e. lower amount of parameters). See below for speed comparison. You can achieve < 2 second extraction on GPU. -
Running
Extractoris easy. You don't need to provide any complicated parameters (like brain templates or prior probability masks), just with the brain MRI is enough. This is because the model was trained with a data augmentation process that involved all kind of rotations and orientations of the brain MRI. This means that the extraction will be successfull regardless the orientation of the input brain MRI. No registration process is done. -
Extractoris accurate. It does not fail in some cases where others (specially BET) fails.
Speed
| Extractor CPU (i5 2015 MBP) | Extractor GPU (Nvidia TitanXP) |
|---|---|
| ~20 seconds | ~2 seconds |
Accuracy
Extractor achieves state-of-the art accuracy > 0.97 Dice metric on the test set that is compound with a subset of entries from the CC359 dataset, NFBS dataset and ADNI dataset.
How to run
As command line program
$ deepbrain-extractor -i brain_mri.nii.gz -o ~/Desktop/output/
Where:
-i: the brain MRI that will be skull-stripped. It can be aniiornii.gzimage (or whatever format nibabel supports).-o: an output directory (does not need to exist) where the program will save thebrain_mask.niiandbrain.niifiles.
See deepbrain-extractor -h for more information.
As python
import nibabel as nb
from deepbrain import Extractor
# Load a nifti as 3d numpy image [H, W, D]
img = nib.load(img_path).get_fdata()
ext = Extractor()
# `prob` will be a 3d numpy image containing probability
# of being brain tissue for each of the voxels in `img`
prob = ext.run(img)
# mask can be obtained as:
mask = prob > 0.5
See deepbrain-extractor -h for more information.
Metadata
Release files for deepbrain 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| deepbrain-0.1.tar.gz | 675.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| deepbrain-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.4 MB
Release files / deepbrain-0.1.tar.gz
| Download URL | deepbrain-0.1.tar.gz |
|---|---|
| Size | 675.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6103f9d7dcec2ac6312e24eaaa1d059c96f2e2a478f549fe0811ddb2597cc49a
|
|
BLAKE2b-256 checksum How to use checksums |
dd2d55ea1a445d458189a54b66e3f530d9f2416e5dd9bb87143de36d70673ece
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
|
Release files / deepbrain-0.1-py3-none-any.whl
| Download URL | deepbrain-0.1-py3-none-any.whl |
|---|---|
| Size | 677.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
87c10e8cf906977dfc828320fb0c319e6ff4de460235cfe33a1c04906a8890de
|
|
BLAKE2b-256 checksum How to use checksums |
61e41f4f6c483dd9c5c1e0e38193b3c7ade8beb13c24c90bab593ca545c7da92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
|
Security for deepbrain 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.