Class SegmentationParserConfig
Defined in File SegmentationParserConfig.hpp
Inheritance Relationships
Base Type
public dai::Buffer(Class Buffer)
Class Documentation
-
class SegmentationParserConfig : public dai::Buffer
Public Functions
-
SegmentationParserConfig() = default
Construct SegmentationParserConfig message.
-
virtual ~SegmentationParserConfig()
-
void setConfidenceThreshold(float threshold)
Add a confidence threshold to the argmax operation over the segmentation tensor. Pixels with confidence values below this threshold will be assigned the background class (255).
Note
Default is -1.0f, which means no thresholding is applied.
Note
Only applicable if output classes are not in a single layer (eg. classesInOneLayer = false).
- Parameters:
threshold – Confidence threshold for segmentation parsing
-
float getConfidenceThreshold() const
Get confidence threshold
-
void setStepSize(unsigned int stepSize)
Sets the step size for segmentation parsing. A step size of 1 means every pixel is processed, a step size of 2 means every second pixel is processed, and so on. This can be used to speed up processing at the cost of lower resolution masks.
- Parameters:
stepSize – Step size for segmentation parsing
-
unsigned int getStepSize() const
Gets the step size for segmentation parsing.
-
virtual void serialize(std::vector<std::uint8_t> &metadata, DatatypeEnum &datatype) const override
-
inline virtual DatatypeEnum getDatatype() const override
Get the datatype of this specific message.
- Returns:
DatatypeEnum
-
DEPTHAI_SERIALIZE(SegmentationParserConfig, confidenceThreshold, stepSize)
-
SegmentationParserConfig() = default