deepbrainseg

Fully automatic brain tumour segmentation using Deep 3-D convolutional neural networks

https://github.com/koriavinash1/deepbrainseg

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

artificial-intelligence biomedical-image-analysis brain-segmentation brain-tumor brain-tumor-segmentation brats deep-convolutional-neural-networks deep-learning ensemble-learning medical-image-analysis segmentation
Last synced: 6 months ago · JSON representation

Repository

Fully automatic brain tumour segmentation using Deep 3-D convolutional neural networks

Basic Info
  • Host: GitHub
  • Owner: koriavinash1
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 287 MB
Statistics
  • Stars: 192
  • Watchers: 11
  • Forks: 42
  • Open Issues: 11
  • Releases: 1
Topics
artificial-intelligence biomedical-image-analysis brain-segmentation brain-tumor brain-tumor-segmentation brats deep-convolutional-neural-networks deep-learning ensemble-learning medical-image-analysis segmentation
Created over 7 years ago · Last pushed over 2 years ago
Metadata Files
Readme Funding License Code of conduct

README.md

DeepBrainSeg

PyPI version Downloads Documentation Status License: MIT

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

pipeline

Results for Segmentation

Results

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 normal overlay2

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

image Figure_0: DeepBrainSeg starting up on Windows 10.

image

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Contact

  • Avinash Kori (avin.kori.re@gmail.com)

Owner

  • Name: Avinash
  • Login: koriavinash1
  • Kind: user
  • Location: ---
  • Company: ---

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

All Time
  • Total Commits: 157
  • Total Committers: 4
  • Avg Commits per committer: 39.25
  • Development Distribution Score (DDS): 0.325
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
enhancement (4) help wanted (2) windows10-installation (1)
Pull Request Labels
dependencies (4)

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.

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 29 Last month
Rankings
Stargazers count: 5.3%
Forks count: 6.2%
Dependent packages count: 10.0%
Average: 12.5%
Downloads: 19.3%
Dependent repos count: 21.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

requirements.txt pypi
  • 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 *