All Projects → koriavinash1 → Deepbrainseg

koriavinash1 / Deepbrainseg

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

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deepbrainseg

Gd Uap
Generalized Data-free Universal Adversarial Perturbations
Stars: ✭ 50 (-47.92%)
Mutual labels:  artificial-intelligence, segmentation
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (+370.83%)
Mutual labels:  artificial-intelligence, segmentation
Apc Vision Toolbox
MIT-Princeton Vision Toolbox for the Amazon Picking Challenge 2016 - RGB-D ConvNet-based object segmentation and 6D object pose estimation.
Stars: ✭ 277 (+188.54%)
Mutual labels:  artificial-intelligence, segmentation
Mit Deep Learning
Tutorials, assignments, and competitions for MIT Deep Learning related courses.
Stars: ✭ 8,912 (+9183.33%)
Mutual labels:  artificial-intelligence, segmentation
Ores
🤖 A hosting service for 'revscoring' models.
Stars: ✭ 92 (-4.17%)
Mutual labels:  artificial-intelligence
Kits19 Challege
KiTS19——2019 Kidney Tumor Segmentation Challenge
Stars: ✭ 91 (-5.21%)
Mutual labels:  segmentation
Ai Dl Enthusiasts Meetup
AI & Deep Learning Enthusiasts Meetup Project & Study Sessions
Stars: ✭ 90 (-6.25%)
Mutual labels:  artificial-intelligence
Virtual Assistant
A linux based Virtual assistant on Artificial Intelligence in C
Stars: ✭ 88 (-8.33%)
Mutual labels:  artificial-intelligence
Limes
Link Discovery Framework for Metric Spaces.
Stars: ✭ 94 (-2.08%)
Mutual labels:  artificial-intelligence
Pfenet
PFENet: Prior Guided Feature Enrichment Network for Few-shot Segmentation (TPAMI).
Stars: ✭ 94 (-2.08%)
Mutual labels:  segmentation
60 days rl challenge
60_Days_RL_Challenge中文版
Stars: ✭ 92 (-4.17%)
Mutual labels:  artificial-intelligence
3dunet abdomen cascade
Stars: ✭ 91 (-5.21%)
Mutual labels:  segmentation
Computer Science Resources
A list of resources in different fields of Computer Science (multiple languages)
Stars: ✭ 1,316 (+1270.83%)
Mutual labels:  artificial-intelligence
Auto Image Renamer
Rename images using deep learning
Stars: ✭ 90 (-6.25%)
Mutual labels:  artificial-intelligence
Neural Api
CAI NEURAL API - Pascal based neural network API optimized for AVX, AVX2 and AVX512 instruction sets plus OpenCL capable devices including AMD, Intel and NVIDIA.
Stars: ✭ 94 (-2.08%)
Mutual labels:  artificial-intelligence
Mapleai
AI各领域学习资料整理。(A collection of all skills and knowledges should be got command of to obtain an AI relevant job offer. There are online blogs, my personal blogs, electronic books copy.)
Stars: ✭ 89 (-7.29%)
Mutual labels:  artificial-intelligence
Cag uda
(NeurIPS2019) Category Anchor-Guided Unsupervised Domain Adaptation for Semantic Segmentation
Stars: ✭ 91 (-5.21%)
Mutual labels:  segmentation
Emojiintelligence
Neural Network built in Apple Playground using Swift
Stars: ✭ 1,323 (+1278.13%)
Mutual labels:  artificial-intelligence
Aif360
A comprehensive set of fairness metrics for datasets and machine learning models, explanations for these metrics, and algorithms to mitigate bias in datasets and models.
Stars: ✭ 1,312 (+1266.67%)
Mutual labels:  artificial-intelligence
Changepoint
A place for the development version of the changepoint package on CRAN.
Stars: ✭ 90 (-6.25%)
Mutual labels:  segmentation

DeepBrainSeg

PyPI version Downloads Documentation Status License: MIT

This repo utilize a ensemble of 2-D and 3-D fully convoultional neural network (CNN) 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 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
t1_path = 
t2_path = 
t1ce_path = 
flair_path = 

segmentor = deepSeg(quick=True)
segmentor.get_segmentation(t1_path, t2_path, t1ce_path, flair_path, save = True)

brain seq coregistration to t1c

from DeepBrainSeg.registration import Coregistration
coreg = Coregistration()

moving_imgs = {'t1': t1path,
               't2': t2path,
               'flair': flairpath}
fixed_img =  os.path.join(t1cpath)
coreg.register_patient(moving_images    = moving_imgs,
                            fixed_image = fixed_img,
                            save_path   = pathtosave)

brain mask extraction (skull stripping)

from DeepBrainSeg.brainmask.hdbetmask import get_bet_mask
from DeepBrainSeg.brainmask.antsmask import get_ants_mask

get_bet_mask(vol_path, savepath)

or 

get_ants_mask(vol_path, savepath)

Radiomics feature exctractor

from DeepBrainSeg.radiomics import ExtractRadiomicFeatures

extractor = ExtractRadiomicFeatures(input_mask=None, 
                                    save_path=None, 
                                    seq='Flair',
                                    class_ = 'ET')
extractor.first_order()
extractor.glcm_features()
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

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].