deepbrainseg
Fully automatic brain tumour segmentation using Deep 3-D convolutional neural networks
Science Score: 23.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: springer.com -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.1%) to scientific vocabulary
Keywords
Repository
Fully automatic brain tumour segmentation using Deep 3-D convolutional neural networks
Basic Info
Statistics
- Stars: 192
- Watchers: 11
- Forks: 42
- Open Issues: 11
- Releases: 1
Topics
Metadata Files
README.md
DeepBrainSeg
This repo utilizes an ensemble of 2-D and 3-D fully convoultional neural networks (CNNs) for segmentation of the brain tumor and its constituents from multi modal Magnetic Resonance Images (MRI). The dense connectivity pattern used in the segmentation network enables effective reuse of features with lesser number of network parameters. On the BraTS validation data, the segmentation network achieved a whole tumor, tumor core and active tumor dice of 0.89, 0.76, 0.76 respectively.
Features
- [x] Brain Tumor Segmentation
- [x] Brain Mask Generation SkullStripping (currently using HD-BET and ANTs)
- [x] Radiomic Features
- [x] Coregistration
- [x] Dcm and nifty support (converts dcm to nifty and works)
- [x] UI based inference framework
- [x] Finetuning
- [x] Hardmining
- [x] Gradual Unfreezing
- [ ] Custom netwrok Training Framework
- [ ] Whole Brain Segmentation
Installation
PyPi based installation:
Required Python version: 3.5
installation:
pip install DeepBrainSeg
or
git clone https://github.com/koriavinash1/DeepBrainSeg.git
cd DeepBrainSeg
python3 setup.py install
Citation
If you use DeepBrainSeg, please cite our work:
@inproceedings{kori2018ensemble,
title={Ensemble of Fully Convolutional Neural Network for Brain Tumor Segmentation from Magnetic Resonance Images},
author={Kori, Avinash and Soni, Mehul and Pranjal, B and Khened, Mahendra and Alex, Varghese and Krishnamurthi, Ganapathy},
booktitle={International MICCAI Brainlesion Workshop},
pages={485--496},
year={2018},
organization={Springer}
}
Pipeline for Segmentation

Results for Segmentation

UI
We also provide a UI based tool for tumor segmentation visualization. It can be used by running the following commands after cloning the repo.
cd ui
python3 DeepBrainSegUI.py

Python API usage
Brain tumor segmentation
for data in BraTs format
from DeepBrainSeg import deepSeg segmentor = deepSeg(quick=True) segmentor.get_segmentation_brats(path)
for other formats ``` from DeepBrainSeg import deepSeg t1path = t2path = t1cepath = flairpath =
segmentor = deepSeg(quick=True) segmentor.getsegmentation(t1path, t2path, t1cepath, flair_path, save = True) ```
brain seq coregistration to t1c
``` from DeepBrainSeg.registration import Coregistration coreg = Coregistration()
movingimgs = {'t1': t1path,
't2': t2path,
'flair': flairpath}
fixedimg = os.path.join(t1cpath)
coreg.registerpatient(movingimages = movingimgs,
fixedimage = fixedimg,
savepath = pathtosave)
```
brain mask extraction (skull stripping)
``` from DeepBrainSeg.brainmask.hdbetmask import getbetmask from DeepBrainSeg.brainmask.antsmask import getantsmask
getbetmask(vol_path, savepath)
or
getantsmask(vol_path, savepath) ```
Radiomics feature exctractor
``` from DeepBrainSeg.radiomics import ExtractRadiomicFeatures
extractor = ExtractRadiomicFeatures(inputmask=None, savepath=None, seq='Flair', class_ = 'ET') extractor.firstorder() extractor.glcmfeatures() extractor.gldm_features()
or
extractor.all_features() ```
Steps followed for tumor segmentation inference:
- Our algorithm makes use of ANTs framework for mask generation. First call deepSeg class build ANTs framework locally in ~/.DeepBrainSeg
- First call deepSeg downloads all pretrained models locally in ~/.DeepBrainSeg
- Final segmentation is the result of ensemble of 4 different models:
- ABLNet (modelABL.py, Air brain Lesion Network)
- 3DBrainNet (model3DBNET.py, 3D multiresolution CNN)
- Tiramisu2D (modelTis2D.py, 57 layered 2D CNN)
- Tiramisu 3D (modelTir3D.py, 57 layered 3D CNN)
- Extensive documentation will be uploaded soon, along with transfer learning framework
- More details about network architecture and training procedure can be found here
For training code please refer this repo
Windows 10 Installation Guide
Figure_0: DeepBrainSeg starting up on Windows 10.

Figure_1: DeepBrainSeg used to get brain segmentation on Windows 10. (Note: Ensemble segmentation/inference takes ~2 hours via torch_cpu, on my i7 6700 intel cpu. Torch cuda/gpu on the other hand, is much faster, with ensemble segmentation/inference taking only ~10 minutes, on my gtx 1060 3gb)
Installation Guide: here
Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Contact
- Avinash Kori (avin.kori.re@gmail.com)
Owner
- Name: Avinash
- Login: koriavinash1
- Kind: user
- Location: ---
- Company: ---
- Repositories: 11
- Profile: https://github.com/koriavinash1
Causality and XAI
GitHub Events
Total
- Watch event: 8
- Fork event: 1
Last Year
- Watch event: 8
- Fork event: 1
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| koriavinash1 | k****1@g****m | 106 |
| Jordan Micah Bennett | j****t@g****m | 47 |
| Avinash Kori | a****e@g****m | 3 |
| Sanjeev Grampurohit | s****2@g****m | 1 |
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 11
- Total pull requests: 10
- Average time to close issues: 28 days
- Average time to close pull requests: 8 days
- Total issue authors: 7
- Total pull request authors: 3
- Average comments per issue: 0.82
- Average comments per pull request: 0.3
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 4
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- koriavinash1 (5)
- ziqianwang9 (1)
- hwjung92 (1)
- NidhiSultan (1)
- lucianigithub (1)
- JordanMicahBennett (1)
- sandeepganji (1)
Pull Request Authors
- koriavinash1 (5)
- dependabot[bot] (4)
- JordanMicahBennett (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 29 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 12
- Total maintainers: 1
pypi.org: deepbrainseg
Deep Learning tool for brain tumor segmentation.
- Homepage: https://github.com/koriavinash1/DeepBrainSeg
- Documentation: https://deepbrainseg.readthedocs.io/
- License: MIT License
-
Latest release: 0.2.1
published over 5 years ago
Rankings
Maintainers (1)
Dependencies
- SimpleITK ==1.2.4
- dicom2nifti ==2.2.10
- nibabel ==3.0.2
- numpy ==1.18.5
- pandas ==0.25.3
- pydensecrf ==1.0rc3
- pyradiomics ==3.0
- scikit-image ==0.15.0
- scipy ==1.4.1
- six ==1.15.0
- torch ==1.5.1
- torchnet ==0.0.4
- torchvision ==0.6.1
- tqdm ==4.48.2
- wget *