fast::TensorToSegmentation class

A process object which converts a Tensor to a Segmentation object.

Base classes

class ProcessObject
Abstract base class for all process objects.

Public functions

auto create(float threshold, bool hasBackgroundClass) -> std::shared_ptr<TensorToSegmentation>
Create instance.
auto getThreshold() const -> float
void setBackgroundClass(bool hasBackgroundClass)
void loadAttributes() virtual

Protected functions

void execute() override

Protected variables

float m_threshold
bool m_hasBackgroundClass

Function documentation

std::shared_ptr<TensorToSegmentation> fast::TensorToSegmentation::create(float threshold, bool hasBackgroundClass)

Create instance.

hasBackgroundClass Whether the neural network has a channel 0 which represents the "background". Default: true
Returns instance Threshold to accept a channel X as being class X.

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


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