Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

NiftyNet FAQ

Wenqi Li edited this page Aug 3, 2018 · 26 revisions

Q: How to install the latest version of NiftyNet with pip (a package manager for Python packages)?


A: The latest version is available at the dev branch of the GitHub repository. This could be installed with pip commands:

pip install -r https://raw.githubusercontent.com/NifTK/NiftyNet/dev/requirements-gpu.txt
pip install git+https://github.com/NifTK/NiftyNet.git

You could also install the optional dependencies:

pip install scikit-image
pip install SimpleITK

To verify the installation,net_run --version should return a version stringNiftyNet version 0.3.0+xxxx.


Q: How to export the meta-graph as a file after training a model?


A: The meta-graph can be exported by adding a tf.train.export_meta_graph command after session initialisation https://github.com/NifTK/NiftyNet/blob/v0.3.0/niftynet/engine/application_driver.py#L402 and running net_segment inference ... (See also: https://www.tensorflow.org/api_guides/python/meta_graph).

Note that if you run the network inside of NiftyNet, the meta file is not needed since NiftyNet recreates the graph in Python code. If you are aiming to run the network outside of NiftyNet, the meta file exported should let you do that, but you will need to be careful to feed data that matches the preprocessing done by NiftyNet.


Q: What are the configuration parameters -- spatial_window_size, volume_padding_size, border, loss_border, and their interactions?



Q: How to do cross-validation experiments with NiftyNet?



Q: How to finetune a model downloaded from the model zoo?



Q: Does the augmentation layer increase the number of training samples or just do random augmentation on existing samples and the total sample size remains the same?


A: All random augmentation layers will be applied to each of the original samples, without generating new ones. The number of training samples is always "batch_size x number of iterations x num_gpus". Please see the demo of visualising the augmented samples: https://github.com/NifTK/NiftyNet/blob/dev/demos/unet/U-Net_Demo.ipynb

Clone this wiki locally