This topic demonstrates how to run the 3D Segmentation Demo, which segments 3D images using 3D convolutional networks.
Upon the start-up, the demo reads command-line parameters and loads a network and images to the Inference Engine plugin.
NOTE: By default, Open Model Zoo demos expect input with BGR channels order. If you trained your model to work with RGB order, you need to manually rearrange the default channels order in the demo application or reconvert your model using the Model Optimizer tool with
--reverse_input_channels
argument specified. For more information about the argument, refer to When to Reverse Input Channels section of Converting a Model Using General Conversion Parameters.
Run the application with the -h
or --help
option to see the usage message:
The command yields the following usage message:
Running the application with the empty list of options yields the usage message and an error message. To run the demo, use public or pre-trained models that support 3D convolution, for example, UNet3D. You can download the pre-trained models using the OpenVINO Model Downloader. The list of models supported by the demo is in the models.lst
file in the demo's directory.
NOTE: Before running the demo with a trained model, make sure the model is converted to the Inference Engine format (*.xml + *.bin) using the Model Optimizer tool.
For example, to do inference on a 3D TIFF image using a trained network with multiple outputs on CPU, run the following command:
For example, to do inference on 3D NIfTI images using a trained network with multiple outputs on CPU and save output TIFF and NIFTI images, run the following command:
For example, to do inference on a single 3D NIfTI image and save an output TIFF image, run the following command:
-ms
option aligns input modalities that depend on a dataset. For example, Medical Decathlon brain tumor segmentation data modalities follow in different order than it's required by nets. To make a correct order using Medical Decathlon brain tumor data the correct option is 2,0,3,1
for brain-tumor-segmentation-0001
and 1,2,3,0
for brain-tumor-segmentation-0002
.
--full_intensities_range
option is related to preprocessing of input data. It can be different for different models, for example, brain-tumor-segmentation-0001
expects normalized data in [0,1] range and nullified non-positive values, while brain-tumor-segmentation-0002
just requires z-score normalization in a full range. So to use brain-tumor-segmentation-0002
model, the flag --full_intensities_range
should be set, while for brain-tumor-segmentation-0001
no preprocessing option is required.
The demo outputs a multipage TIFF image and a NIFTI archive.