fast::SegmentationNetwork class

Segmentation neural network process object.

This class is a convenience class for a neural network which performs segmentation by having 1 input image, and outputs 1 segmentation image. Internally it uses TensorToSegmentation. If you need multi-input or multi-output support, use NeuralNetwork with TensorToSegmentation instead.

Base classes

class NeuralNetwork
Neural network process object.

Public functions

auto create(std::string modelFilename, float scaleFactor, bool heatmapOutput, float threshold, bool hasBackgroundClass, float meanIntensity, float stanardDeviationIntensity, std::vector<NeuralNetworkNode> inputNodes, std::vector<NeuralNetworkNode> outputNodes, std::string inferenceEngine, std::vector<std::string> customPlugins) FAST_CONSTRUCTOR(SegmentationNetwork -> std::shared_ptr<SegmentationNetwork>
void setSegmentationOutput()
void setThreshold(float threshold)
auto getThreshold() const -> float
void setBackgroundClass(bool hasBackgroundClass)
void loadAttributes() virtual
void setResizeBackToOriginalSize(bool resize)

Public variables

modelFilename
inputNodes
outputNodes
inferenceEngine
customPlugins

Private functions

void execute() virtual

Function documentation

void fast::SegmentationNetwork::setThreshold(float threshold)

Parameters
threshold

Threshold to accept a channel X as being class X.

void fast::SegmentationNetwork::setBackgroundClass(bool hasBackgroundClass)

Parameters
hasBackgroundClass

Set whether channel 0 of segmentation tensor is the "background" class, thereby getting the label 0 in the resulting Segmentation.