ObjectTracker node. Performs object tracking using Kalman filter and hungarian algorithm. More...
#include <ObjectTracker.hpp>
Public Member Functions | |
ObjectTracker (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId) | |
ObjectTracker (const std::shared_ptr< PipelineImpl > &par, int64_t nodeId, std::unique_ptr< Properties > props) | |
void | setDetectionLabelsToTrack (std::vector< std::uint32_t > labels) |
void | setMaxObjectsToTrack (std::int32_t maxObjectsToTrack) |
void | setTrackerIdAssignmentPolicy (TrackerIdAssignmentPolicy type) |
void | setTrackerThreshold (float threshold) |
void | setTrackerType (TrackerType type) |
void | setTrackingPerClass (bool trackingPerClass) |
![]() | |
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 | inputDetectionFrame {*this, "inputDetectionFrame", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}} |
Input | inputDetections {*this, "inputDetections", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgDetections, true}}} |
Input | inputTrackerFrame {*this, "inputTrackerFrame", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}} |
Output | out {*this, "out", Output::Type::MSender, {{DatatypeEnum::Tracklets, false}}} |
Output | passthroughDetectionFrame {*this, "passthroughDetectionFrame", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
Output | passthroughDetections {*this, "passthroughDetections", Output::Type::MSender, {{DatatypeEnum::ImgDetections, true}}} |
Output | passthroughTrackerFrame {*this, "passthroughTrackerFrame", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
![]() | |
Properties & | properties |
Underlying properties. More... | |
![]() | |
const Id | id |
Id of node. More... | |
Properties & | properties |
Static Public Attributes | |
constexpr static const char * | NAME = "ObjectTracker" |
Additional Inherited Members | |
![]() | |
using | Properties = ObjectTrackerProperties |
![]() | |
using | Id = std::int64_t |
Node identificator. Unique for every node on a single Pipeline. More... | |
![]() | |
virtual 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) |
![]() | |
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 |
ObjectTracker node. Performs object tracking using Kalman filter and hungarian algorithm.
Definition at line 19 of file ObjectTracker.hpp.
dai::node::ObjectTracker::ObjectTracker | ( | const std::shared_ptr< PipelineImpl > & | par, |
int64_t | nodeId | ||
) |
Definition at line 8 of file ObjectTracker.cpp.
dai::node::ObjectTracker::ObjectTracker | ( | const std::shared_ptr< PipelineImpl > & | par, |
int64_t | nodeId, | ||
std::unique_ptr< Properties > | props | ||
) |
Definition at line 10 of file ObjectTracker.cpp.
void dai::node::ObjectTracker::setDetectionLabelsToTrack | ( | std::vector< std::uint32_t > | labels | ) |
Specify detection labels to track.
labels | Detection labels to track. Default every label is tracked from image detection network output. |
Definition at line 24 of file ObjectTracker.cpp.
void dai::node::ObjectTracker::setMaxObjectsToTrack | ( | std::int32_t | maxObjectsToTrack | ) |
Specify maximum number of object to track.
maxObjectsToTrack | Maximum number of object to track. Maximum 60 in case of SHORT_TERM_KCF, otherwise 1000. |
Definition at line 20 of file ObjectTracker.cpp.
void dai::node::ObjectTracker::setTrackerIdAssignmentPolicy | ( | TrackerIdAssignmentPolicy | type | ) |
Specify tracker ID assignment policy.
type | Tracker ID assignment policy. |
Definition at line 32 of file ObjectTracker.cpp.
void dai::node::ObjectTracker::setTrackerThreshold | ( | float | threshold | ) |
Specify tracker threshold.
threshold | Above this threshold the detected objects will be tracked. Default 0, all image detections are tracked. |
Definition at line 16 of file ObjectTracker.cpp.
void dai::node::ObjectTracker::setTrackerType | ( | TrackerType | type | ) |
Specify tracker type algorithm.
type | Tracker type. |
Definition at line 28 of file ObjectTracker.cpp.
void dai::node::ObjectTracker::setTrackingPerClass | ( | bool | trackingPerClass | ) |
Whether tracker should take into consideration class label for tracking.
Definition at line 35 of file ObjectTracker.cpp.
Input dai::node::ObjectTracker::inputDetectionFrame {*this, "inputDetectionFrame", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}} |
Input ImgFrame message on which object detection was performed. Default queue is non-blocking with size 4.
Definition at line 36 of file ObjectTracker.hpp.
Input dai::node::ObjectTracker::inputDetections {*this, "inputDetections", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgDetections, true}}} |
Input message with image detection from neural network. Default queue is non-blocking with size 4.
Definition at line 42 of file ObjectTracker.hpp.
Input dai::node::ObjectTracker::inputTrackerFrame {*this, "inputTrackerFrame", Input::Type::SReceiver, false, 4, true, {{DatatypeEnum::ImgFrame, false}}} |
Input ImgFrame message on which tracking will be performed. RGBp, BGRp, NV12, YUV420p types are supported. Default queue is non-blocking with size 4.
Definition at line 30 of file ObjectTracker.hpp.
|
staticconstexpr |
Definition at line 21 of file ObjectTracker.hpp.
Output dai::node::ObjectTracker::out {*this, "out", Output::Type::MSender, {{DatatypeEnum::Tracklets, false}}} |
Outputs Tracklets message that carries object tracking results.
Definition at line 47 of file ObjectTracker.hpp.
Output dai::node::ObjectTracker::passthroughDetectionFrame {*this, "passthroughDetectionFrame", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
Passthrough ImgFrame message on which object detection was performed. Suitable for when input queue is set to non-blocking behavior.
Definition at line 59 of file ObjectTracker.hpp.
Output dai::node::ObjectTracker::passthroughDetections {*this, "passthroughDetections", Output::Type::MSender, {{DatatypeEnum::ImgDetections, true}}} |
Passthrough image detections message from neural network output. Suitable for when input queue is set to non-blocking behavior.
Definition at line 65 of file ObjectTracker.hpp.
Output dai::node::ObjectTracker::passthroughTrackerFrame {*this, "passthroughTrackerFrame", Output::Type::MSender, {{DatatypeEnum::ImgFrame, false}}} |
Passthrough ImgFrame message on which tracking was performed. Suitable for when input queue is set to non-blocking behavior.
Definition at line 53 of file ObjectTracker.hpp.