Class DetectionParser

Inheritance Relationships

Base Type

Class Documentation

class DetectionParser : public dai::NodeCRTP<Node, DetectionParser, DetectionParserProperties>

DetectionParser node. Parses detection results from different neural networks and is being used internally by MobileNetDetectionNetwork and YoloDetectionNetwork.

Public Functions

DetectionParser(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId)
DetectionParser(const std::shared_ptr<PipelineImpl> &par, int64_t nodeId, std::unique_ptr<Properties> props)
void setNumFramesPool(int numFramesPool)

Specify number of frames in pool.

Parameters:

numFramesPool – How many frames should the pool have

int getNumFramesPool()

Returns number of frames in pool

void setBlob(const OpenVINO::Blob &blob)

Retrieves some input tensor information from the blob

Parameters:

blobOpenVINO blob to retrieve the information from

void setNNFamily(DetectionNetworkType type)

Sets NN Family to parse

DetectionNetworkType getNNFamily()

Gets NN Family to parse

void setConfidenceThreshold(float thresh)

Specifies confidence threshold at which to filter the rest of the detections.

Parameters:

thresh – Detection confidence must be greater than specified threshold to be added to the list

float getConfidenceThreshold() const

Retrieves threshold at which to filter the rest of the detections.

Returns:

Detection confidence

void setNumClasses(int numClasses)

Set num classes.

void setCoordinateSize(int coordinates)

Set coordianate size.

void setAnchors(std::vector<float> anchors)

Set anchors.

void setAnchorMasks(std::map<std::string, std::vector<int>> anchorMasks)

Set anchor masks.

void setIouThreshold(float thresh)

Set Iou threshold.

int getNumClasses() const

Get num classes.

int getCoordinateSize() const

Get coordianate size.

std::vector<float> getAnchors() const

Get anchors.

std::map<std::string, std::vector<int>> getAnchorMasks() const

Get anchor masks.

float getIouThreshold() const

Get Iou threshold.

Public Members

Input input = {*this, "in", Input::Type::SReceiver, true, 5, true, {{DatatypeEnum::NNData, true}}}

Input NN results with detection data to parse Default queue is blocking with size 5

Output out = {*this, "out", Output::Type::MSender, {{DatatypeEnum::ImgDetections, false}}}

Outputs image frame with detected edges

Public Static Attributes

static constexpr const char *NAME = "DetectionParser"

Protected Functions

virtual Properties &getProperties()