Data association module.
Definition at line 132 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.


Data Structures | |
| struct | DA_Stats |
| Store thread-safe per-session counters for the association-scoring funnel. More... | |
Public Member Functions | |
| DataAssociator (const std::string &configFilePath) | |
| Construct a data associator from a configuration file. More... | |
| ~DataAssociator () | |
| Report accumulated association statistics during destruction. More... | |
| void | initialize (const SourceFrameInfo &frameInfo, const uint32_t maxTargetsPerStream, const bool useVisualTracker, const bool useReid) override |
| Initialize the data associator for a source stream. More... | |
| assocDataOut_t | associatePerStream (const assocDataIn_t in) override |
| Associate detections with existing targets for one stream. More... | |
| bool | isInitialized () override |
| Return whether the data associator has been initialized. More... | |
| const DATA_ASSOCIATOR_TYPES | getDataAssociatorType () override |
| Return the configured data-associator type. More... | |
| void | updateParams (const YAML::Node &fn) |
| Update dynamic parameters during runtime. More... | |
| DataAssociator (const std::string &configFilePath) | |
| Construct a data associator from a configuration file. More... | |
| ~DataAssociator () | |
| Report accumulated association statistics during destruction. More... | |
| void | initialize (const SourceFrameInfo &frameInfo, const uint32_t maxTargetsPerStream, const bool useVisualTracker, const bool useReid) override |
| Initialize the data associator for a source stream. More... | |
| assocDataOut_t | associatePerStream (const assocDataIn_t in) override |
| Associate detections with existing targets for one stream. More... | |
| bool | isInitialized () override |
| Return whether the data associator has been initialized. More... | |
| const DATA_ASSOCIATOR_TYPES | getDataAssociatorType () override |
| Return the configured data-associator type. More... | |
| void | updateParams (const YAML::Node &fn) |
| Update dynamic parameters during runtime. More... | |
Protected Member Functions | |
| void | initializeSimilarityParams (const bool useVisualTracker, const bool useReid) |
| Rebuild per-stage similarity parameters for the enabled features. More... | |
| assocDataOut_t | associatePerStream_greedy (const assocDataIn_t &in, const uint stage=0) |
| Find the best matches between detections and existing targets. More... | |
| assocDataOut_t | associatePerStream_cascadedLegacy (const assocDataIn_t &in) |
| Run the legacy two-stage association algorithm. More... | |
| assocDataOut_t | associatePerStream_cascaded (const assocDataIn_t &in) |
| Run the cascaded association algorithm. More... | |
| virtual float | assocDistanceFunc (const std::shared_ptr< NvTrackedObject > trajObj, const DetectedObjInfo &detObj, const std::vector< SimilarityParam > &similarityParamList, const float sumCorrRespAtDetectedPt) const |
| Function to compute the association score between a detector bbox and a tracked bbox. More... | |
| std::vector< std::vector< float > > | computeDistanceMatrix (const assocDataIn_t &in, const uint stage=0) const |
| Compute the association score matrix. More... | |
| std::multimap< float, std::pair< uint, int > > | sortMatching (const assocDataIn_t &in, const std::vector< std::vector< float >> &distMat) const |
| Given the distance matrix, get the sorted list of potential match pairs based on the association cost. More... | |
| void | dumpDataAssociationResults (const assocDataOut_t &out) const |
| Dump-print the data association results. More... | |
| void | dumpAssocDistanceMatrix (const assocDataIn_t &in, std::vector< std::vector< float >> distMat) const |
| Dump-print the scores in the distance matrix for association. More... | |
| void | initializeSimilarityParams (const bool useVisualTracker, const bool useReid) |
| Rebuild per-stage similarity parameters for the enabled features. More... | |
| assocDataOut_t | associatePerStream_greedy (const assocDataIn_t &in, const uint stage=0) |
| Find the best matches between detections and existing targets. More... | |
| assocDataOut_t | associatePerStream_cascadedLegacy (const assocDataIn_t &in) |
| Run the legacy two-stage association algorithm. More... | |
| assocDataOut_t | associatePerStream_cascaded (const assocDataIn_t &in) |
| Run the cascaded association algorithm. More... | |
| virtual float | assocDistanceFunc (const std::shared_ptr< NvTrackedObject > trajObj, const DetectedObjInfo &detObj, const std::vector< SimilarityParam > &similarityParamList, const float sumCorrRespAtDetectedPt) const |
| Function to compute the association score between a detector bbox and a tracked bbox. More... | |
| std::vector< std::vector< float > > | computeDistanceMatrix (const assocDataIn_t &in, const uint stage=0) const |
| Compute the association score matrix. More... | |
| std::multimap< float, std::pair< uint, int > > | sortMatching (const assocDataIn_t &in, const std::vector< std::vector< float >> &distMat) const |
| Given the distance matrix, get the sorted list of potential match pairs based on the association cost. More... | |
| void | dumpDataAssociationResults (const assocDataOut_t &out) const |
| Dump-print the data association results. More... | |
| void | dumpAssocDistanceMatrix (const assocDataIn_t &in, std::vector< std::vector< float >> distMat) const |
| Dump-print the scores in the distance matrix for association. More... | |
Protected Attributes | |
| bool | m_isInit |
| Indicates whether the data associator has been initialized. More... | |
| NvTrackerParamsAssoc | m_params |
| Stores parsed configuration parameters. More... | |
| std::vector< std::vector< SimilarityParam > > | m_similarityParamLists |
| Per-stage similarity parameters and weights. More... | |
| std::mutex | m_similarityParamsMutex |
| Guards similarity parameters during reads and updates. More... | |
| int | m_maxTargetsPerStream |
| Specifies the maximum number of targets to track per stream. More... | |
| bool | m_useVisualTracker {false} |
| Records whether visual-tracker similarity is enabled for parameter rebuilds. More... | |
| bool | m_useReid {false} |
| Records whether ReID similarity is enabled for parameter rebuilds. More... | |
| DA_Stats | m_da_stats |
| Stores association-scoring counters. More... | |
| DataAssociator::DataAssociator | ( | const std::string & | configFilePath | ) |
Construct a data associator from a configuration file.
| [in] | configFilePath | The path to a config file. |
| DataAssociator::~DataAssociator | ( | ) |
Report accumulated association statistics during destruction.
| DataAssociator::DataAssociator | ( | const std::string & | configFilePath | ) |
Construct a data associator from a configuration file.
| [in] | configFilePath | The path to a config file. |
| DataAssociator::~DataAssociator | ( | ) |
Report accumulated association statistics during destruction.
|
protectedvirtual |
Function to compute the association score between a detector bbox and a tracked bbox.
| [in] | trajObj | Tracked object. |
| [in] | detObj | Detected object. |
| [in] | similarityParamList | Similarity parameters and their weights. |
| [in] | sumCorrRespAtDetectedPt | Sum of tracker correlation responses at the detected point. |
|
protectedvirtual |
Function to compute the association score between a detector bbox and a tracked bbox.
| [in] | trajObj | Tracked object. |
| [in] | detObj | Detected object. |
| [in] | similarityParamList | Similarity parameters and their weights. |
| [in] | sumCorrRespAtDetectedPt | Sum of tracker correlation responses at the detected point. |
|
overridevirtual |
Associate detections with existing targets for one stream.
| [in] | in | Newly detected object bounding boxes and existing targets. |
Implements IDataAssociator.
|
overridevirtual |
Associate detections with existing targets for one stream.
| [in] | in | Newly detected object bounding boxes and existing targets. |
Implements IDataAssociator.
|
protected |
Run the cascaded association algorithm.
| [in] | in | Association inputs. |
|
protected |
Run the cascaded association algorithm.
| [in] | in | Association inputs. |
|
protected |
Run the legacy two-stage association algorithm.
| [in] | in | Association inputs. |
|
protected |
Run the legacy two-stage association algorithm.
| [in] | in | Association inputs. |
|
protected |
Find the best matches between detections and existing targets.
| [in] | in | Association inputs. |
| [in] | stage | Association stage. |
|
protected |
Find the best matches between detections and existing targets.
| [in] | in | Association inputs. |
| [in] | stage | Association stage. |
|
protected |
Compute the association score matrix.
| [in] | in | Association inputs. |
| [in] | stage | Association stage. |
|
protected |
Compute the association score matrix.
| [in] | in | Association inputs. |
| [in] | stage | Association stage. |
|
protected |
Dump-print the scores in the distance matrix for association.
| [in] | in | Association inputs used to label the matrix. |
| [in] | distMat | Score matrix to print. |
|
protected |
Dump-print the scores in the distance matrix for association.
| [in] | in | Association inputs used to label the matrix. |
| [in] | distMat | Score matrix to print. |
|
protected |
Dump-print the data association results.
| [in] | out | Association results to print. |
|
protected |
Dump-print the data association results.
| [in] | out | Association results to print. |
|
inlineoverridevirtual |
Return the configured data-associator type.
Implements IDataAssociator.
Definition at line 168 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
References NvTrackerParamsAssoc::m_dataAssociatorType, and m_params.
|
inlineoverridevirtual |
Return the configured data-associator type.
Implements IDataAssociator.
Definition at line 168 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
References NvTrackerParamsAssoc::m_dataAssociatorType, and m_params.
|
overridevirtual |
Initialize the data associator for a source stream.
| [in] | frameInfo | Metadata about the source image (e.g., size, color). |
| [in] | maxTargetsPerStream | The max number of targets to track per stream. |
| [in] | useVisualTracker | Whether visual-tracker similarity is used. |
| [in] | useReid | Whether ReID similarity is used. |
Implements IDataAssociator.
|
overridevirtual |
Initialize the data associator for a source stream.
| [in] | frameInfo | Metadata about the source image (e.g., size, color). |
| [in] | maxTargetsPerStream | The max number of targets to track per stream. |
| [in] | useVisualTracker | Whether visual-tracker similarity is used. |
| [in] | useReid | Whether ReID similarity is used. |
Implements IDataAssociator.
|
protected |
Rebuild per-stage similarity parameters for the enabled features.
| [in] | useVisualTracker | Whether visual-tracker similarity is used. |
| [in] | useReid | Whether ReID similarity is used. |
Referenced by updateParams().
|
protected |
Rebuild per-stage similarity parameters for the enabled features.
| [in] | useVisualTracker | Whether visual-tracker similarity is used. |
| [in] | useReid | Whether ReID similarity is used. |
|
inlineoverridevirtual |
Return whether the data associator has been initialized.
Implements IDataAssociator.
Definition at line 165 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
References m_isInit.
|
inlineoverridevirtual |
Return whether the data associator has been initialized.
Implements IDataAssociator.
Definition at line 165 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
References m_isInit.
|
protected |
Given the distance matrix, get the sorted list of potential match pairs based on the association cost.
| [in] | in | Association inputs. |
| [in] | distMat | Score matrix, where higher values indicate closer matches. |
|
protected |
Given the distance matrix, get the sorted list of potential match pairs based on the association cost.
| [in] | in | Association inputs. |
| [in] | distMat | Score matrix, where higher values indicate closer matches. |
|
inlinevirtual |
Update dynamic parameters during runtime.
| [in] | fn | Parsed YAML structure of config to update. |
Implements IDataAssociator.
Definition at line 174 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
References initializeSimilarityParams(), m_isInit, m_params, m_useReid, m_useVisualTracker, and NvTrackerParamsAssoc::read().
|
inlinevirtual |
Update dynamic parameters during runtime.
| [in] | fn | Parsed YAML structure of config to update. |
Implements IDataAssociator.
Definition at line 174 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
References initializeSimilarityParams(), m_isInit, m_params, m_useReid, m_useVisualTracker, and NvTrackerParamsAssoc::read().
|
mutableprotected |
Stores association-scoring counters.
Definition at line 287 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
|
protected |
Indicates whether the data associator has been initialized.
Definition at line 182 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
Referenced by isInitialized(), and updateParams().
|
protected |
Specifies the maximum number of targets to track per stream.
Definition at line 186 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
|
protected |
Stores parsed configuration parameters.
Definition at line 183 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
Referenced by getDataAssociatorType(), and updateParams().
|
protected |
Per-stage similarity parameters and weights.
Definition at line 184 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
|
mutableprotected |
Guards similarity parameters during reads and updates.
Definition at line 185 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
|
protected |
Records whether ReID similarity is enabled for parameter rebuilds.
Definition at line 188 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
Referenced by updateParams().
|
protected |
Records whether visual-tracker similarity is enabled for parameter rebuilds.
Definition at line 187 of file sources/libs/nvmultiobjecttracker/include/modules/DataAssociator/DataAssociator.hpp.
Referenced by updateParams().