All Projects → ai-med → Quicknat_pytorch

ai-med / Quicknat_pytorch

Licence: mit
PyTorch Implementation of QuickNAT and Bayesian QuickNAT, a fast brain MRI segmentation framework with segmentation Quality control using structure-wise uncertainty

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Quicknat pytorch

Miscnn
A framework for Medical Image Segmentation with Convolutional Neural Networks and Deep Learning
Stars: ✭ 194 (+162.16%)
Mutual labels:  convolutional-neural-networks, segmentation, medical-imaging
Niftynet
[unmaintained] An open-source convolutional neural networks platform for research in medical image analysis and image-guided therapy
Stars: ✭ 1,276 (+1624.32%)
Mutual labels:  convolutional-neural-networks, segmentation, medical-imaging
Torchio
Medical image preprocessing and augmentation toolkit for deep learning
Stars: ✭ 708 (+856.76%)
Mutual labels:  convolutional-neural-networks, segmentation, medical-imaging
Data Science Bowl 2018
End-to-end one-class instance segmentation based on U-Net architecture for Data Science Bowl 2018 in Kaggle
Stars: ✭ 56 (-24.32%)
Mutual labels:  convolutional-neural-networks, segmentation, medical-imaging
Deepmedic
Efficient Multi-Scale 3D Convolutional Neural Network for Segmentation of 3D Medical Scans
Stars: ✭ 809 (+993.24%)
Mutual labels:  convolutional-neural-networks, medical-imaging
All About The Gan
All About the GANs(Generative Adversarial Networks) - Summarized lists for GAN
Stars: ✭ 630 (+751.35%)
Mutual labels:  segmentation, medical-imaging
Ganseg
Framework for medical image segmentation using deep neural networks
Stars: ✭ 18 (-75.68%)
Mutual labels:  segmentation, medical-imaging
Teacher Student Training
This repository stores the files used for my summer internship's work on "teacher-student learning", an experimental method for training deep neural networks using a trained teacher model.
Stars: ✭ 34 (-54.05%)
Mutual labels:  ai, convolutional-neural-networks
Dipy
DIPY is the paragon 3D/4D+ imaging library in Python. Contains generic methods for spatial normalization, signal processing, machine learning, statistical analysis and visualization of medical images. Additionally, it contains specialized methods for computational anatomy including diffusion, perfusion and structural imaging.
Stars: ✭ 417 (+463.51%)
Mutual labels:  segmentation, medical-imaging
Medicaldetectiontoolkit
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.
Stars: ✭ 917 (+1139.19%)
Mutual labels:  segmentation, medical-imaging
Cnn Interpretability
🏥 Visualizing Convolutional Networks for MRI-based Diagnosis of Alzheimer’s Disease
Stars: ✭ 68 (-8.11%)
Mutual labels:  convolutional-neural-networks, medical-imaging
Medicalzoopytorch
A pytorch-based deep learning framework for multi-modal 2D/3D medical image segmentation
Stars: ✭ 546 (+637.84%)
Mutual labels:  segmentation, medical-imaging
Meshcnn
Convolutional Neural Network for 3D meshes in PyTorch
Stars: ✭ 1,032 (+1294.59%)
Mutual labels:  convolutional-neural-networks, segmentation
Slicergitsvnarchive
Multi-platform, free open source software for visualization and image computing.
Stars: ✭ 896 (+1110.81%)
Mutual labels:  segmentation, medical-imaging
Caer
High-performance Vision library in Python. Scale your research, not boilerplate.
Stars: ✭ 452 (+510.81%)
Mutual labels:  ai, segmentation
Brain Tumor Segmentation Keras
Keras implementation of the multi-channel cascaded architecture introduced in the paper "Brain Tumor Segmentation with Deep Neural Networks"
Stars: ✭ 20 (-72.97%)
Mutual labels:  convolutional-neural-networks, medical-imaging
Extensionsindex
Slicer extensions index
Stars: ✭ 36 (-51.35%)
Mutual labels:  segmentation, medical-imaging
Switchnorm segmentation
Switchable Normalization for semantic image segmentation and scene parsing.
Stars: ✭ 47 (-36.49%)
Mutual labels:  convolutional-neural-networks, segmentation
Artificio
Deep Learning Computer Vision Algorithms for Real-World Use
Stars: ✭ 326 (+340.54%)
Mutual labels:  ai, convolutional-neural-networks
Neuralnetwork.net
A TensorFlow-inspired neural network library built from scratch in C# 7.3 for .NET Standard 2.0, with GPU support through cuDNN
Stars: ✭ 392 (+429.73%)
Mutual labels:  ai, convolutional-neural-networks

QuickNat and Bayesian QuickNAT - Pytorch implementation

A fully convolutional network for quick and accurate segmentation of neuroanatomy and Quality control of structure-wise segmentations

The code for training, as well as the Trained Models are provided here.

Deployment of existing off-the-shelf Model to segment any MRI scans is just by running RunFile.

Let us know if you face any problems running the code by posting in Issues.

If you use this code please cite the following papers:

@article{roy2019quicknat,
  title={QuickNAT: A fully convolutional network for quick and accurate segmentation of neuroanatomy},
  author={Roy, Abhijit Guha and Conjeti, Sailesh and Navab, Nassir and Wachinger, Christian and Alzheimer's Disease Neuroimaging Initiative and others},
  journal={NeuroImage},
  volume={186},
  pages={713--727},
  year={2019},
  publisher={Elsevier}
}

@article{roy2019bayesian,
  title={Bayesian QuickNAT: Model uncertainty in deep whole-brain segmentation for structure-wise quality control},
  author={Roy, Abhijit Guha and Conjeti, Sailesh and Navab, Nassir and Wachinger, Christian and Alzheimer's Disease Neuroimaging Initiative and others},
  journal={NeuroImage},
  volume={195},
  pages={11--22},
  year={2019},
  publisher={Elsevier}
}

Online demo for trying out: http://quicknat.ai-med.de

Link to arxiv versions of the papers:

Enjoy!!! :)

Getting Started

Pre-requisites

Please install the required packages for smooth functioning of the tool by running

pip install -r requirements.txt

Training your model

python run.py --mode=train

Evaluating your model

python run.py --mode=eval

Evaluating the model in bulk

Execute the following command for deploying on large datasets:

python run.py --mode=eval_bulk

This saves the segmentation files at nifti files in the destination folder. Also in the folder, a '.csv' file is generated which provides the volume estimates of the brain structures with subject ids for all the processed volumes.

Also uncertainty flag is set, another two '.csv' files are created with structure-wise uncertainty (CVs and IoU) for quality control of the segmentations. Please refer to the "Bayesian QuickNAT" paper for details.

Pre-processing: Before deploying our model you need to standardize the MRI scans. Use the following command from FreeSurfer

mri_convert --conform <input_volume.nii> <out_volume.nii>

The above command standardizes the alignment for QuickNAT, re-samples to isotrophic resolution (256x256x256) with some contrast enhamcement. It takes about one second per volume.

You need to modify the following entries in 'settings_eval.ini' file in the repo.

  • device: CPU or ID of GPU (0 or 1) you want to excecute your code.
  • coronal_model_path: It is by default set to "saved_models/finetuned_alldata_coronal.pth.tar" which is our final model. You may also use "saved_models/IXI_fsNet_coronal.pth.tar" which is our pre-trained model.
  • axial_model_path: Similar to above. It is only used for view_aggregation stage.
  • data_dir: Absolute path to the data directory where input volumes are present.
  • directory_struct: Valid options are "FS" or "Linear". If you input data directory is similar to FreeSurfer, i.e. data_dir/<Data_id>/mri/orig.mgz then use "FS". If the entries are data_dir/<Data_id> use "Linear".
  • volumes_txt_file: Path to the '.txt' file where the data_ID names are stored. If directory_struct is "FS" the entries should be only the folder names, whereas if it is "Linear" the entry name should be the file names with the file extensions.
  • batch_size: Set this according the capacity of your GPU RAM.
  • save_predictions_dir: Indicate the absolute path where you want to save the segmentation outputs along with the '.csv' files for volume and uncertainty estimates.
  • view_agg: Valid options are "True" or "False". When "False", it uses coronal network by default.
  • estimate_uncertainty: Valid options are "True" or "False". Indicates if you want to estimate the structure-wise uncertainty for segmentation Quality control. Refer to "Bayesian QuickNAT" paper for more details.
  • mc_samples: Active only if estimate_uncertainty flag is "True". Indicates the number of Monte-Carlo samples used for uncertainty estimation.
  • labels: List of label names used in '.csv' file. Do not change this unless you change the model.

Code Authors

Help us improve

Let us know if you face any issues. You are always welcome to report new issues and bugs and also suggest further improvements. And if you like our work hit that start button on top. Enjoy :)

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].