DetectionParser node. Parses detection results from different neural networks and is being used internally by MobileNetDetectionNetwork and YoloDetectionNetwork. More...
#include <DetectionParser.hpp>
Public Member 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) | |
std::map< std::string, std::vector< int > > | getAnchorMasks () const |
Get anchor masks. More... | |
std::vector< float > | getAnchors () const |
Get anchors. More... | |
float | getConfidenceThreshold () const |
int | getCoordinateSize () const |
Get coordianate size. More... | |
float | getIouThreshold () const |
Get Iou threshold. More... | |
DetectionNetworkType | getNNFamily () |
int | getNumClasses () const |
Get num classes. More... | |
int | getNumFramesPool () |
void | setAnchorMasks (std::map< std::string, std::vector< int >> anchorMasks) |
Set anchor masks. More... | |
void | setAnchors (std::vector< float > anchors) |
Set anchors. More... | |
void | setBlob (const OpenVINO::Blob &blob) |
void | setConfidenceThreshold (float thresh) |
void | setCoordinateSize (int coordinates) |
Set coordianate size. More... | |
void | setIouThreshold (float thresh) |
Set Iou threshold. More... | |
void | setNNFamily (DetectionNetworkType type) |
void | setNumClasses (int numClasses) |
Set num classes. More... | |
void | setNumFramesPool (int numFramesPool) |
![]() | |
std::unique_ptr< Node > | clone () const override |
const char * | getName () const override |
![]() | |
virtual std::unique_ptr< Node > | clone () const =0 |
Deep copy the node. More... | |
AssetManager & | getAssetManager () |
Get node AssetManager as a reference. More... | |
const AssetManager & | getAssetManager () const |
Get node AssetManager as a const reference. More... | |
std::vector< Input * > | getInputRefs () |
Retrieves reference to node inputs. More... | |
std::vector< const Input * > | getInputRefs () const |
Retrieves reference to node inputs. More... | |
std::vector< Input > | getInputs () |
Retrieves all nodes inputs. More... | |
virtual const char * | getName () const =0 |
Retrieves nodes name. More... | |
std::vector< Output * > | getOutputRefs () |
Retrieves reference to node outputs. More... | |
std::vector< const Output * > | getOutputRefs () const |
Retrieves reference to node outputs. More... | |
std::vector< Output > | getOutputs () |
Retrieves all nodes outputs. More... | |
Pipeline | getParentPipeline () |
const Pipeline | getParentPipeline () const |
Node (const std::shared_ptr< PipelineImpl > &p, Id nodeId, std::unique_ptr< Properties > props) | |
Constructs Node. More... | |
virtual | ~Node ()=default |
Public Attributes | |
Input | input {*this, "in", Input::Type::SReceiver, true, 5, true, {{DatatypeEnum::NNData, true}}} |
Output | out {*this, "out", Output::Type::MSender, {{DatatypeEnum::ImgDetections, false}}} |
![]() | |
Properties & | properties |
Underlying properties. More... | |
![]() | |
const Id | id |
Id of node. More... | |
Properties & | properties |
Static Public Attributes | |
constexpr static const char * | NAME = "DetectionParser" |
Protected Member Functions | |
Properties & | getProperties () |
![]() | |
virtual tl::optional< OpenVINO::Version > | getRequiredOpenVINOVersion () |
void | setInputMapRefs (InputMap *inMapRef) |
void | setInputMapRefs (std::initializer_list< InputMap * > l) |
void | setInputRefs (Input *inRef) |
void | setInputRefs (std::initializer_list< Input * > l) |
void | setOutputMapRefs (OutputMap *outMapRef) |
void | setOutputMapRefs (std::initializer_list< OutputMap * > l) |
void | setOutputRefs (Output *outRef) |
void | setOutputRefs (std::initializer_list< Output * > l) |
Private Attributes | |
std::shared_ptr< RawEdgeDetectorConfig > | rawConfig |
Additional Inherited Members | |
![]() | |
using | Properties = DetectionParserProperties |
![]() | |
using | Id = std::int64_t |
Node identificator. Unique for every node on a single Pipeline. More... | |
![]() | |
AssetManager | assetManager |
std::unordered_map< std::string, InputMap * > | inputMapRefs |
std::unordered_map< std::string, Input * > | inputRefs |
std::unordered_map< std::string, OutputMap * > | outputMapRefs |
std::unordered_map< std::string, Output * > | outputRefs |
std::weak_ptr< PipelineImpl > | parent |
copyable_unique_ptr< Properties > | propertiesHolder |
DetectionParser node. Parses detection results from different neural networks and is being used internally by MobileNetDetectionNetwork and YoloDetectionNetwork.
Definition at line 18 of file DetectionParser.hpp.
dai::node::DetectionParser::DetectionParser | ( | const std::shared_ptr< PipelineImpl > & | par, |
int64_t | nodeId | ||
) |
Definition at line 8 of file DetectionParser.cpp.
dai::node::DetectionParser::DetectionParser | ( | const std::shared_ptr< PipelineImpl > & | par, |
int64_t | nodeId, | ||
std::unique_ptr< Properties > | props | ||
) |
Definition at line 10 of file DetectionParser.cpp.
std::map< std::string, std::vector< int > > dai::node::DetectionParser::getAnchorMasks | ( | ) | const |
Get anchor masks.
Definition at line 84 of file DetectionParser.cpp.
std::vector< float > dai::node::DetectionParser::getAnchors | ( | ) | const |
Get anchors.
Definition at line 79 of file DetectionParser.cpp.
float dai::node::DetectionParser::getConfidenceThreshold | ( | ) | const |
Retrieves threshold at which to filter the rest of the detections.
Definition at line 44 of file DetectionParser.cpp.
int dai::node::DetectionParser::getCoordinateSize | ( | ) | const |
Get coordianate size.
Definition at line 74 of file DetectionParser.cpp.
float dai::node::DetectionParser::getIouThreshold | ( | ) | const |
Get Iou threshold.
Definition at line 89 of file DetectionParser.cpp.
DetectionNetworkType dai::node::DetectionParser::getNNFamily | ( | ) |
Gets NN Family to parse
Definition at line 36 of file DetectionParser.cpp.
int dai::node::DetectionParser::getNumClasses | ( | ) | const |
Get num classes.
Definition at line 69 of file DetectionParser.cpp.
int dai::node::DetectionParser::getNumFramesPool | ( | ) |
Returns number of frames in pool
Definition at line 28 of file DetectionParser.cpp.
|
protectedvirtual |
Reimplemented from dai::Node.
Definition at line 16 of file DetectionParser.cpp.
void dai::node::DetectionParser::setAnchorMasks | ( | std::map< std::string, std::vector< int >> | anchorMasks | ) |
Set anchor masks.
Definition at line 60 of file DetectionParser.cpp.
void dai::node::DetectionParser::setAnchors | ( | std::vector< float > | anchors | ) |
Set anchors.
Definition at line 56 of file DetectionParser.cpp.
void dai::node::DetectionParser::setBlob | ( | const OpenVINO::Blob & | blob | ) |
Retrieves some input tensor information from the blob
blob | OpenVINO blob to retrieve the information from |
Definition at line 20 of file DetectionParser.cpp.
void dai::node::DetectionParser::setConfidenceThreshold | ( | float | thresh | ) |
Specifies confidence threshold at which to filter the rest of the detections.
thresh | Detection confidence must be greater than specified threshold to be added to the list |
Definition at line 40 of file DetectionParser.cpp.
void dai::node::DetectionParser::setCoordinateSize | ( | int | coordinates | ) |
Set coordianate size.
Definition at line 52 of file DetectionParser.cpp.
void dai::node::DetectionParser::setIouThreshold | ( | float | thresh | ) |
Set Iou threshold.
Definition at line 64 of file DetectionParser.cpp.
void dai::node::DetectionParser::setNNFamily | ( | DetectionNetworkType | type | ) |
Sets NN Family to parse
Definition at line 32 of file DetectionParser.cpp.
void dai::node::DetectionParser::setNumClasses | ( | int | numClasses | ) |
Set num classes.
Definition at line 48 of file DetectionParser.cpp.
void dai::node::DetectionParser::setNumFramesPool | ( | int | numFramesPool | ) |
Specify number of frames in pool.
numFramesPool | How many frames should the pool have |
Definition at line 24 of file DetectionParser.cpp.
Input dai::node::DetectionParser::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
Definition at line 36 of file DetectionParser.hpp.
|
staticconstexpr |
Definition at line 20 of file DetectionParser.hpp.
Output dai::node::DetectionParser::out {*this, "out", Output::Type::MSender, {{DatatypeEnum::ImgDetections, false}}} |
Outputs image frame with detected edges
Definition at line 41 of file DetectionParser.hpp.
|
private |
Definition at line 26 of file DetectionParser.hpp.