Giter VIP home page Giter VIP logo

brats17's Introduction

Synopsis

Submission for Multimodal Brain Tumor Segmentation Challenge 2017 (http://braintumorsegmentation.org/). A patch-based 3D U-Net model is used. Instead of predicting the class label of the center pixel, this model predicts the class label for the entire patch. A sliding-window method is used in deployment with overlaps between patches to average the predictions.

Code Example

The workflow includes bias correction, patch extraction, training, post-processing, testing and submission.

After training data is downloaded, run python bias_correction.py input_dir to perform bias field correction based on N4ITK (https://www.ncbi.nlm.nih.gov/pubmed/20378467). The corrected dataset will be saved at the same folder with the raw dataset.

Run python generate_patches.py input_dir output_dir to generate patches for training.

To train the model, run python main.py --train=True --train_data_dir=train_patch_dir. Or you can modify the default parameters in main.py so that you can just run python main.py. Check model.py for more details about the network structure.

To test the model on validation dataset, run python main.py --train=False --deploy_data_dir=deploy_data_dir --deploy_output_dir=deploy_output_dir. The results will be saved at deploy_output_dir. The network structure for survival prediction is not working good as the result is similar as random guessing. So you can ignore that by setting run_survival to False.

To combine the results and generate the final label maps, run python prepare_for_submission.py input_dir output_dir.

Installation

The model is implemented and tested using python 2.7 and Tensorflow 1.1.0, but python 3 and newer versions of Tensorflow should also work. Other required libraries include: numpy, h5py, skimage, transforms3d, nibabel, scipy, nipype. You also need to install ants for bias correction. Read the instructions for Nipype (http://nipy.org/nipype/0.9.2/interfaces/generated/nipype.interfaces.ants.segmentation.html) and Ants (http://stnava.github.io/ANTs/) for more information.

Contributors

Xue Feng, Department of Biomedical Engineering, University of Virginia [email protected]

brats17's People

Contributors

xf4j avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

brats17's Issues

Hello, I have installed the nipype 1.0.2 version, but when i run bias_correction.py, it comes that:

Hello, I have installed the nipype 1.0.2 version, but when i run bias_correction.py, it comes that:

IOError: No command "N4BiasFieldCorrection" found on host PC. Please check that the corresponding package is installed.

The latest version of nipype(1.0.2) have already integrated the ants package, and in "nipype.interfaces.ants.segmentation", there also exist "N4BiasFieldCorrection" in it.

Why it still suggest me to check that the corresponding package is installed or not.

Waiting for u reply!
Many thanks!

no model

ModuleNotFoundError Traceback (most recent call last)

---> 10 from model import UNet3D, SurvivalVAE
ModuleNotFoundError: No module named 'model'

Regarding Survival Prediction

The brats2017 website has mentioned you as 3rd winner in the category of survival prediction, then how come you have mentioned that survival prediction task is giving results similar to random guessing?

What is "Instead of predicting the class label of the center pixel"

I found u say "Submission for Multimodal Brain Tumor Segmentation Challenge 2017 (http://braintumorsegmentation.org/). A patch-based 3D U-Net model is used. Instead of predicting the class label of the center pixel, this model predicts the class label for the entire patch. A sliding-window method is used in deployment with overlaps between patches to average the predictions."
What is the "Instead of predicting the class label of the center pixel"?
For example,

In training, if I input a 48x48x48 train patch and a 48x48x48 label patch in one "predicting the class label of the center pixel" network, after some conv layers, it may output a 40x40x40 train patch, so I have to crop label patch to 40x40x40 surround center pixel for input?

and in testing, if I also need to add some background pixels surround the test image? Like the training, I need to add 8 pixel surround the the image?
if add 1 pixel, like :
0 0 0 0 0 0
0 2 2 2 2 0
0 2 2 2 2 0
0 0 0 0 0 0

thanks.

list index out of range

Traceback (most recent call last):
File "/home/ubuntu/new/brats17-master/generate_patches.py", line 54, in
pool.map(batch_works, range(n_processes))
File "/home/ubuntu/anaconda3/envs/py2/lib/python2.7/multiprocessing/pool.py", line 253, in map
return self.map_async(func, iterable, chunksize).get()
File "/home/ubuntu/anaconda3/envs/py2/lib/python2.7/multiprocessing/pool.py", line 572, in get
raise self._value
IndexError: list index out of range

hello,when I run python bias_correction.py Brats17TrainingData,the error occured,can you tell me how to solve it?Many thanks!

Weights

Hi, could you share a link to the trained model, or model weights
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.