Manage target IDs, archived trajectories, and trajectory reassociation.
Definition at line 229 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.


Data Structures | |
| struct | ReAssocStats |
| Re-association pipeline counters: dumped to stderr at destructor time. More... | |
Public Member Functions | |
| NvTrajectoryManager (const std::string &configFilePath) | |
| Construct a trajectory manager from configuration. More... | |
| virtual | ~NvTrajectoryManager () |
| Report statistics and destroy the trajectory manager. More... | |
| void | archiveTrajectory (const std::shared_ptr< NvTrackedObject > target) |
| Store the trajectories of the terminated objects up to a certain time. More... | |
| void | assignTargetIDs (const NvTrackedObjectList &targetList, std::map< std::shared_ptr< NvTrackedObject >, std::shared_ptr< NvTrackedObject > > &toBeTerminated, const NvMOTTimeMeta &timeMeta) |
| Assign target IDs and set targetIDTimeStamp. More... | |
| void | cleanUpArchivedTrajectories (const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta) |
| Remove expired archived trajectories for all input streams. More... | |
| void | cleanUpArchivedTrajectories_perStream (const NvMOTStreamId streamId, const uint32_t currFrameNum, const bool doPurge=false) |
| Remove expired archived trajectories for one stream. More... | |
| void | resetIDs () |
| Reset the unique-ID generator with a new random prefix. More... | |
| void | purgeArchivedTrajectories () |
| Purge all archived trajectories. More... | |
| virtual std::deque< DetectedObjInfo > | generateTrackedObjects4ReidPerStream (const NvMOTStreamId streamId, const NvTrackedObjectList &targetList) |
| Generate target detections that require ReID extraction for one stream. More... | |
| void | updateStreamIds (const std::vector< NvMOTStreamId > &streamIdsToAdd={}, const std::vector< NvMOTStreamId > &streamIdsToDel={}) |
| Update per-stream trajectory state when streams are added or removed. More... | |
| void | updateParams (const YAML::Node &fn) |
| Update dynamic parameters during runtime. More... | |
| void | setSrcFrameInfo (const NvMotDataTypes::Rect2f originalSrcImageBox, const NvMotDataTypes::Rect2f srcImageBox) |
| Set source-frame geometry used for trajectory output. More... | |
| void | setMultiViewAssociators (std::map< NvMOTStreamId, std::shared_ptr< IMultiViewAssociator >> multiViewAssociators) |
| Set the multi-view associators. More... | |
| const Trajectory4Archive & | getArchivedTrajectory (const NvMOTStreamId videoStreamId, const uint64_t targetId) |
| Return an archived trajectory by stream and target ID. More... | |
| const NvTrackerParamsTrajectoryManager | getParams () |
| Return a copy of trajectory-manager parameters. More... | |
| const float | getMinVisibility4TrajDump () |
| Return the minimum visibility required for trajectory dumping. More... | |
| const bool | getDumpDetectorBboxes () |
| Return whether detector bounding boxes are dumped. More... | |
| NvTrajectoryManager (const std::string &configFilePath) | |
| Construct a trajectory manager from configuration. More... | |
| virtual | ~NvTrajectoryManager () |
| Report statistics and destroy the trajectory manager. More... | |
| void | archiveTrajectory (const std::shared_ptr< NvTrackedObject > target) |
| Store the trajectories of the terminated objects up to a certain time. More... | |
| void | assignTargetIDs (const NvTrackedObjectList &targetList, std::map< std::shared_ptr< NvTrackedObject >, std::shared_ptr< NvTrackedObject > > &toBeTerminated, const NvMOTTimeMeta &timeMeta) |
| Assign target IDs and set targetIDTimeStamp. More... | |
| void | cleanUpArchivedTrajectories (const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta) |
| Remove expired archived trajectories for all input streams. More... | |
| void | cleanUpArchivedTrajectories_perStream (const NvMOTStreamId streamId, const uint32_t currFrameNum, const bool doPurge=false) |
| Remove expired archived trajectories for one stream. More... | |
| void | resetIDs () |
| Reset the unique-ID generator with a new random prefix. More... | |
| void | purgeArchivedTrajectories () |
| Purge all archived trajectories. More... | |
| virtual std::deque< DetectedObjInfo > | generateTrackedObjects4ReidPerStream (const NvMOTStreamId streamId, const NvTrackedObjectList &targetList) |
| Generate target detections that require ReID extraction for one stream. More... | |
| void | updateStreamIds (const std::vector< NvMOTStreamId > &streamIdsToAdd={}, const std::vector< NvMOTStreamId > &streamIdsToDel={}) |
| Update per-stream trajectory state when streams are added or removed. More... | |
| void | updateParams (const YAML::Node &fn) |
| Update dynamic parameters during runtime. More... | |
| void | setSrcFrameInfo (const NvMotDataTypes::Rect2f originalSrcImageBox, const NvMotDataTypes::Rect2f srcImageBox) |
| Set source-frame geometry used for trajectory output. More... | |
| void | setMultiViewAssociators (std::map< NvMOTStreamId, std::shared_ptr< IMultiViewAssociator >> multiViewAssociators) |
| Set the multi-view associators. More... | |
| const Trajectory4Archive & | getArchivedTrajectory (const NvMOTStreamId videoStreamId, const uint64_t targetId) |
| Return an archived trajectory by stream and target ID. More... | |
| const NvTrackerParamsTrajectoryManager | getParams () |
| Return a copy of trajectory-manager parameters. More... | |
| const float | getMinVisibility4TrajDump () |
| Return the minimum visibility required for trajectory dumping. More... | |
| const bool | getDumpDetectorBboxes () |
| Return whether detector bounding boxes are dumped. More... | |
Protected Member Functions | |
| bool | tryReAssoc (const std::shared_ptr< NvTrackedObject > target, std::map< std::shared_ptr< NvTrackedObject >, std::shared_ptr< NvTrackedObject >> &toBeFused) |
| Try to perform the re-assoc with the targets in the temporary DB that stores projected trajectories. More... | |
| bool | processTrajectory (const uint64_t targetId, const NvMOTStreamId streamId, std::list< TargetInfo > &tracklet) |
| Trim the tracklet by removing the last un-validated trajectory points. More... | |
| std::list< TargetInfo > | createProjectedTrajectories (const uint64_t targetId, const NvMOTStreamId streamId, const std::list< TargetInfo > &tracklet, int overrideShadowAge=-1) |
| Trim the tracklet by removing the last un-validated trajectory points and return the projected trajectory points only. More... | |
| void | add2ProjectedTrajectoryDB (std::shared_ptr< NvTrackedObject > target) |
| Add the projected trajectory to the temporary DB so that it can be re-associated. More... | |
| void | removeFromProjectedTrajectoryDB (std::shared_ptr< NvTrackedObject > target) |
| Remove from the projected trajectory DB. More... | |
| virtual std::list< TargetInfo > | getTrimmedTraj4ReAssoc (const std::list< TargetInfo > &newTraj, const std::list< TargetInfo > &peerTraj, const NvMOTFrameNum lastTrackedFrameNum_peer) |
| Get the trimmed new trajectory for reassociation with peer trajectory. More... | |
| bool | findMatch4ReAssoc (const std::shared_ptr< NvTrackedObject > target, std::shared_ptr< NvTrackedObject > &bestMatchPeer) |
| Find the best live projected-trajectory match for a target. More... | |
| bool | findArchiveMatch4ReAssoc (const std::shared_ptr< NvTrackedObject > newTarget) |
| Fallback re-association against terminated tracks in m_trajectoryArchive. More... | |
| bool | try3DReAssoc (const std::shared_ptr< NvTrackedObject > newTarget) |
| Perform archive-only world-distance and frame-gap re-association. More... | |
| virtual float | calculateSizeSimilarityScore (const std::list< TargetInfo > &traj, const std::list< TargetInfo > &peerTraj) |
| Calculate bounding-box size similarity between two trajectories. More... | |
| const std::tuple< float, int, float, float, float, float > | calculateSimilarityBtwTracklets (const std::list< TargetInfo > &traj, const std::list< TargetInfo > &peerTraj, const float peerTrajCov) |
| Calculate tracklet, direction, speed, and size similarity metrics. More... | |
| const std::tuple< float, int, float, float, float > | calculateAssocScore4QuasiDTW (const std::list< TargetInfo > &traj, const std::list< TargetInfo > &peerTraj, const float peerTrajCov) |
| Calculate quasi-DTW association metrics between two trajectories. More... | |
| const float | computeAngleInDegree (const Eigen::Vector2f &vec1, const Eigen::Vector2f &vec2) |
| Compute the angle between the two tracklets direction [degree]. More... | |
| const float | computeSpeedSimilarity (const Eigen::Vector2f &vec1, const Eigen::Vector2f &vec2) |
| Compute the speed similarity between the two tracklets. More... | |
| const bool | detectMotion (const Eigen::Vector2f &vec, float threshold) |
| Detect if a tracklet is in motion, that is, if its speed is at least the threshold. More... | |
| void | fuseTracklets (std::shared_ptr< NvTrackedObject > targetToBeKept, std::shared_ptr< NvTrackedObject > targetToBeFused) |
| Fuse two tracklets. More... | |
| bool | checkDuplicateTracklet (const uint64_t targetId, std::map< uint64_t, Trajectory4Archive > &tracklets, std::set< uint64_t > &peersToBeDeleted) |
| Check if the tracklet is a duplicate to another existing tracklet. More... | |
| int | calculateTrackletInclusionScore (const std::list< TargetInfo > &tracklet, const std::list< TargetInfo > &peerTracklet) |
| Calculate the number of duplicate bboxes between the two tracklets. More... | |
| void | fuseArchivedTracklets (const uint64_t targetId, const uint64_t peerId, std::map< uint64_t, Trajectory4Archive > &tracklets) |
| Fuse the peer's tracklet into the target's. More... | |
| void | dumpTrajectoryIntoFile (const NvMOTStreamId streamId, const TargetId targetId, const Trajectory4Archive &traj) |
| Dump the trajectory data into a file in a specified format. More... | |
| const uint64_t | generateNewTargetID () |
| Generate a thread-safe target ID according to the configured ID mode. More... | |
| const uint64_t | peekNewTargetID () const |
| Return the next target ID without consuming it. More... | |
| bool | tryReAssoc (const std::shared_ptr< NvTrackedObject > target, std::map< std::shared_ptr< NvTrackedObject >, std::shared_ptr< NvTrackedObject >> &toBeFused) |
| Try to perform the re-assoc with the targets in the temporary DB that stores projected trajectories. More... | |
| bool | processTrajectory (const uint64_t targetId, const NvMOTStreamId streamId, std::list< TargetInfo > &tracklet) |
| Trim the tracklet by removing the last un-validated trajectory points. More... | |
| std::list< TargetInfo > | createProjectedTrajectories (const uint64_t targetId, const NvMOTStreamId streamId, const std::list< TargetInfo > &tracklet, int overrideShadowAge=-1) |
| Trim the tracklet by removing the last un-validated trajectory points and return the projected trajectory points only. More... | |
| void | add2ProjectedTrajectoryDB (std::shared_ptr< NvTrackedObject > target) |
| Add the projected trajectory to the temporary DB so that it can be re-associated. More... | |
| void | removeFromProjectedTrajectoryDB (std::shared_ptr< NvTrackedObject > target) |
| Remove from the projected trajectory DB. More... | |
| virtual std::list< TargetInfo > | getTrimmedTraj4ReAssoc (const std::list< TargetInfo > &newTraj, const std::list< TargetInfo > &peerTraj, const NvMOTFrameNum lastTrackedFrameNum_peer) |
| Get the trimmed new trajectory for reassociation with peer trajectory. More... | |
| bool | findMatch4ReAssoc (const std::shared_ptr< NvTrackedObject > target, std::shared_ptr< NvTrackedObject > &bestMatchPeer) |
| Find the best live projected-trajectory match for a target. More... | |
| bool | findArchiveMatch4ReAssoc (const std::shared_ptr< NvTrackedObject > newTarget) |
| Fallback re-association against terminated tracks in m_trajectoryArchive. More... | |
| bool | try3DReAssoc (const std::shared_ptr< NvTrackedObject > newTarget) |
| Perform archive-only world-distance and frame-gap re-association. More... | |
| virtual float | calculateSizeSimilarityScore (const std::list< TargetInfo > &traj, const std::list< TargetInfo > &peerTraj) |
| Calculate bounding-box size similarity between two trajectories. More... | |
| const std::tuple< float, int, float, float, float, float > | calculateSimilarityBtwTracklets (const std::list< TargetInfo > &traj, const std::list< TargetInfo > &peerTraj, const float peerTrajCov) |
| Calculate tracklet, direction, speed, and size similarity metrics. More... | |
| const std::tuple< float, int, float, float, float > | calculateAssocScore4QuasiDTW (const std::list< TargetInfo > &traj, const std::list< TargetInfo > &peerTraj, const float peerTrajCov) |
| Calculate quasi-DTW association metrics between two trajectories. More... | |
| const float | computeAngleInDegree (const Eigen::Vector2f &vec1, const Eigen::Vector2f &vec2) |
| Compute the angle between the two tracklets direction [degree]. More... | |
| const float | computeSpeedSimilarity (const Eigen::Vector2f &vec1, const Eigen::Vector2f &vec2) |
| Compute the speed similarity between the two tracklets. More... | |
| const bool | detectMotion (const Eigen::Vector2f &vec, float threshold) |
| Detect if a tracklet is in motion, that is, if its speed is at least the threshold. More... | |
| void | fuseTracklets (std::shared_ptr< NvTrackedObject > targetToBeKept, std::shared_ptr< NvTrackedObject > targetToBeFused) |
| Fuse two tracklets. More... | |
| bool | checkDuplicateTracklet (const uint64_t targetId, std::map< uint64_t, Trajectory4Archive > &tracklets, std::set< uint64_t > &peersToBeDeleted) |
| Check if the tracklet is a duplicate to another existing tracklet. More... | |
| int | calculateTrackletInclusionScore (const std::list< TargetInfo > &tracklet, const std::list< TargetInfo > &peerTracklet) |
| Calculate the number of duplicate bboxes between the two tracklets. More... | |
| void | fuseArchivedTracklets (const uint64_t targetId, const uint64_t peerId, std::map< uint64_t, Trajectory4Archive > &tracklets) |
| Fuse the peer's tracklet into the target's. More... | |
| void | dumpTrajectoryIntoFile (const NvMOTStreamId streamId, const TargetId targetId, const Trajectory4Archive &traj) |
| Dump the trajectory data into a file in a specified format. More... | |
| const uint64_t | generateNewTargetID () |
| Generate a thread-safe target ID according to the configured ID mode. More... | |
| const uint64_t | peekNewTargetID () const |
| Return the next target ID without consuming it. More... | |
Protected Attributes | |
| NvTrackerParamsTrajectoryManager | m_params |
| Config params for target management. More... | |
| const std::string | m_configFilePath |
| Config file path. More... | |
| std::map< NvMOTStreamId, std::shared_ptr< Trajectory4ArchiveList > > | m_trajectoryArchive |
| Archive of past trajectories up to a configured age, modified on the main thread and read by workers. More... | |
| std::map< NvMOTStreamId, std::shared_ptr< ProjectedTrajectoryList > > | m_projectedTrajectories |
| Temporary buffer of the projected trajectories to be re-associated. More... | |
| std::map< NvMOTStreamId, std::shared_ptr< TrackedObjectsReidIndList > > | m_trackedObjectsReidInd |
| Target's index in reid batch. More... | |
| std::map< NvMOTStreamId, bool > | m_isFileTrajectoryDumpCreated |
| Post-processing: dump trajectories into a file: only accessed in main thread. More... | |
| std::map< NvMOTStreamId, std::ofstream > | m_fileTrajectoryDump |
| Per-stream trajectory dump file, accessed only on the main thread. More... | |
| std::map< NvMOTStreamId, std::shared_ptr< IEstimator2 > > | m_trajProjector |
| Per-stream state estimator used to project trajectories for re-association. More... | |
| std::map< NvMOTStreamId, std::shared_ptr< IMultiViewAssociator > > | m_multiViewAssociators |
| Multi-view associators. More... | |
| std::map< uint64_t, NvMOTFrameNum > | m_usedPeerTargetIds |
| Claimed peer target id mapped to the frame of the claim. More... | |
| UIDGenerator | m_uidGenerator |
| ID generator. More... | |
| bool | m_isOffline = false |
| Boolean to indicate if the trajectory manager is used for offline processing. More... | |
| struct NvTrajectoryManager::ReAssocStats | m_stats |
| Stores trajectory-reassociation counters. More... | |
| NvTrajectoryManager::NvTrajectoryManager | ( | const std::string & | configFilePath | ) |
Construct a trajectory manager from configuration.
| [in] | configFilePath | Path to the configuration file. |
|
virtual |
Report statistics and destroy the trajectory manager.
| NvTrajectoryManager::NvTrajectoryManager | ( | const std::string & | configFilePath | ) |
Construct a trajectory manager from configuration.
| [in] | configFilePath | Path to the configuration file. |
|
virtual |
Report statistics and destroy the trajectory manager.
|
protected |
Add the projected trajectory to the temporary DB so that it can be re-associated.
| [in] | target | Shadow track whose projected trajectory is stored. |
|
protected |
Add the projected trajectory to the temporary DB so that it can be re-associated.
| [in] | target | Shadow track whose projected trajectory is stored. |
| void NvTrajectoryManager::archiveTrajectory | ( | const std::shared_ptr< NvTrackedObject > | target | ) |
Store the trajectories of the terminated objects up to a certain time.
| [in] | target | Terminated object whose trajectory is stored. |
| void NvTrajectoryManager::archiveTrajectory | ( | const std::shared_ptr< NvTrackedObject > | target | ) |
Store the trajectories of the terminated objects up to a certain time.
| [in] | target | Terminated object whose trajectory is stored. |
| void NvTrajectoryManager::assignTargetIDs | ( | const NvTrackedObjectList & | targetList, |
| std::map< std::shared_ptr< NvTrackedObject >, std::shared_ptr< NvTrackedObject > > & | toBeTerminated, | ||
| const NvMOTTimeMeta & | timeMeta | ||
| ) |
Assign target IDs and set targetIDTimeStamp.
| [in] | targetList | Tracked objects that may receive target IDs. |
| [out] | toBeTerminated | Map from a terminated target to its peer. |
| [in] | timeMeta | Timing metadata from association. |
| void NvTrajectoryManager::assignTargetIDs | ( | const NvTrackedObjectList & | targetList, |
| std::map< std::shared_ptr< NvTrackedObject >, std::shared_ptr< NvTrackedObject > > & | toBeTerminated, | ||
| const NvMOTTimeMeta & | timeMeta | ||
| ) |
Assign target IDs and set targetIDTimeStamp.
| [in] | targetList | Tracked objects that may receive target IDs. |
| [out] | toBeTerminated | Map from a terminated target to its peer. |
| [in] | timeMeta | Timing metadata from association. |
|
protected |
Calculate quasi-DTW association metrics between two trajectories.
| [in] | traj | First trajectory. |
| [in] | peerTraj | Peer trajectory. |
| [in] | peerTrajCov | Peer trajectory covariance. |
|
protected |
Calculate quasi-DTW association metrics between two trajectories.
| [in] | traj | First trajectory. |
| [in] | peerTraj | Peer trajectory. |
| [in] | peerTrajCov | Peer trajectory covariance. |
|
protected |
Calculate tracklet, direction, speed, and size similarity metrics.
| [in] | traj | First trajectory. |
| [in] | peerTraj | Peer trajectory. |
| [in] | peerTrajCov | Peer trajectory covariance. |
|
protected |
Calculate tracklet, direction, speed, and size similarity metrics.
| [in] | traj | First trajectory. |
| [in] | peerTraj | Peer trajectory. |
| [in] | peerTrajCov | Peer trajectory covariance. |
|
protectedvirtual |
Calculate bounding-box size similarity between two trajectories.
| [in] | traj | First trajectory. |
| [in] | peerTraj | Peer trajectory. |
|
protectedvirtual |
Calculate bounding-box size similarity between two trajectories.
| [in] | traj | First trajectory. |
| [in] | peerTraj | Peer trajectory. |
|
protected |
Calculate the number of duplicate bboxes between the two tracklets.
| [in] | tracklet | Tracklet being compared. |
| [in] | peerTracklet | Peer tracklet being compared. |
|
protected |
Calculate the number of duplicate bboxes between the two tracklets.
| [in] | tracklet | Tracklet being compared. |
| [in] | peerTracklet | Peer tracklet being compared. |
|
protected |
Check if the tracklet is a duplicate to another existing tracklet.
| [in] | targetId | ID of the tracklet to check. |
| [in,out] | tracklets | Archived tracklets for the stream; a duplicate may be fused into its peer. |
| [in,out] | peersToBeDeleted | Peer IDs already marked for deletion; a duplicate peer is inserted here. |
|
protected |
Check if the tracklet is a duplicate to another existing tracklet.
| [in] | targetId | ID of the tracklet to check. |
| [in,out] | tracklets | Archived tracklets for the stream; a duplicate may be fused into its peer. |
| [in,out] | peersToBeDeleted | Peer IDs already marked for deletion; a duplicate peer is inserted here. |
| void NvTrajectoryManager::cleanUpArchivedTrajectories | ( | const std::map< NvMOTStreamId, NvMOTFrame * > & | inputMeta | ) |
Remove expired archived trajectories for all input streams.
| [in] | inputMeta | Current input metadata by stream. |
| void NvTrajectoryManager::cleanUpArchivedTrajectories | ( | const std::map< NvMOTStreamId, NvMOTFrame * > & | inputMeta | ) |
Remove expired archived trajectories for all input streams.
| [in] | inputMeta | Current input metadata by stream. |
| void NvTrajectoryManager::cleanUpArchivedTrajectories_perStream | ( | const NvMOTStreamId | streamId, |
| const uint32_t | currFrameNum, | ||
| const bool | doPurge = false |
||
| ) |
Remove expired archived trajectories for one stream.
| [in] | streamId | Source stream identifier. |
| [in] | currFrameNum | Current frame number. |
| [in] | doPurge | Whether to remove every archived trajectory. |
| void NvTrajectoryManager::cleanUpArchivedTrajectories_perStream | ( | const NvMOTStreamId | streamId, |
| const uint32_t | currFrameNum, | ||
| const bool | doPurge = false |
||
| ) |
Remove expired archived trajectories for one stream.
| [in] | streamId | Source stream identifier. |
| [in] | currFrameNum | Current frame number. |
| [in] | doPurge | Whether to remove every archived trajectory. |
|
protected |
Compute the angle between the two tracklets direction [degree].
| [in] | vec1 | Direction vector of the first tracklet. |
| [in] | vec2 | Direction vector of the second tracklet. |
|
protected |
Compute the angle between the two tracklets direction [degree].
| [in] | vec1 | Direction vector of the first tracklet. |
| [in] | vec2 | Direction vector of the second tracklet. |
|
protected |
Compute the speed similarity between the two tracklets.
| [in] | vec1 | Velocity vector of the first tracklet. |
| [in] | vec2 | Velocity vector of the second tracklet. |
|
protected |
Compute the speed similarity between the two tracklets.
| [in] | vec1 | Velocity vector of the first tracklet. |
| [in] | vec2 | Velocity vector of the second tracklet. |
|
protected |
Trim the tracklet by removing the last un-validated trajectory points and return the projected trajectory points only.
| [in] | targetId | ID of the tracklet. |
| [in] | streamId | Stream that owns the tracklet. |
| [in] | tracklet | Tracklet to project. |
| [in] | overrideShadowAge | Shadow age to use when non-negative; a negative value counts INACTIVE frames at the tail. |
|
protected |
Trim the tracklet by removing the last un-validated trajectory points and return the projected trajectory points only.
| [in] | targetId | ID of the tracklet. |
| [in] | streamId | Stream that owns the tracklet. |
| [in] | tracklet | Tracklet to project. |
| [in] | overrideShadowAge | Shadow age to use when non-negative; a negative value counts INACTIVE frames at the tail. |
|
protected |
Detect if a tracklet is in motion, that is, if its speed is at least the threshold.
| [in] | vec | Velocity vector of the tracklet. |
| [in] | threshold | Minimum speed treated as motion. |
|
protected |
Detect if a tracklet is in motion, that is, if its speed is at least the threshold.
| [in] | vec | Velocity vector of the tracklet. |
| [in] | threshold | Minimum speed treated as motion. |
|
protected |
Dump the trajectory data into a file in a specified format.
| [in] | streamId | Stream that owns the trajectory. |
| [in] | targetId | ID of the trajectory to dump. |
| [in] | traj | Archived trajectory to write. |
|
protected |
Dump the trajectory data into a file in a specified format.
| [in] | streamId | Stream that owns the trajectory. |
| [in] | targetId | ID of the trajectory to dump. |
| [in] | traj | Archived trajectory to write. |
|
protected |
Fallback re-association against terminated tracks in m_trajectoryArchive.
| [in] | newTarget | Newly appearing track needing an ID. |
|
protected |
Fallback re-association against terminated tracks in m_trajectoryArchive.
| [in] | newTarget | Newly appearing track needing an ID. |
|
protected |
Find the best live projected-trajectory match for a target.
| [in] | target | Target to reassociate. |
| [out] | bestMatchPeer | Best matching peer target. |
|
protected |
Find the best live projected-trajectory match for a target.
| [in] | target | Target to reassociate. |
| [out] | bestMatchPeer | Best matching peer target. |
|
protected |
Fuse the peer's tracklet into the target's.
| [in] | targetId | ID of the tracklet that is kept. |
| [in] | peerId | ID of the peer tracklet that is merged in. |
| [in,out] | tracklets | Archived tracklets; the kept tracklet is replaced by the fused result. |
|
protected |
Fuse the peer's tracklet into the target's.
| [in] | targetId | ID of the tracklet that is kept. |
| [in] | peerId | ID of the peer tracklet that is merged in. |
| [in,out] | tracklets | Archived tracklets; the kept tracklet is replaced by the fused result. |
|
protected |
Fuse two tracklets.
| [in] | targetToBeKept | Track that is kept and receives the fused trajectory. |
| [in] | targetToBeFused | Track whose trajectory is copied into the kept track. |
|
protected |
Fuse two tracklets.
| [in] | targetToBeKept | Track that is kept and receives the fused trajectory. |
| [in] | targetToBeFused | Track whose trajectory is copied into the kept track. |
|
protected |
Generate a thread-safe target ID according to the configured ID mode.
|
protected |
Generate a thread-safe target ID according to the configured ID mode.
|
virtual |
Generate target detections that require ReID extraction for one stream.
| [in] | streamId | Source stream identifier. |
| [in] | targetList | Tracked targets to inspect. |
|
virtual |
Generate target detections that require ReID extraction for one stream.
| [in] | streamId | Source stream identifier. |
| [in] | targetList | Tracked targets to inspect. |
|
inline |
Return an archived trajectory by stream and target ID.
| [in] | videoStreamId | Source stream identifier. |
| [in] | targetId | Target ID. |
Definition at line 323 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References m_trajectoryArchive.
|
inline |
Return an archived trajectory by stream and target ID.
| [in] | videoStreamId | Source stream identifier. |
| [in] | targetId | Target ID. |
Definition at line 323 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References m_trajectoryArchive.
|
inline |
Return whether detector bounding boxes are dumped.
Definition at line 335 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References NvTrackerParamsTrajectoryManager::m_dumpDetectorBboxes, and m_params.
|
inline |
Return whether detector bounding boxes are dumped.
Definition at line 335 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References NvTrackerParamsTrajectoryManager::m_dumpDetectorBboxes, and m_params.
|
inline |
Return the minimum visibility required for trajectory dumping.
Definition at line 332 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References NvTrackerParamsTrajectoryManager::m_minVisibility4TrajDump, and m_params.
|
inline |
Return the minimum visibility required for trajectory dumping.
Definition at line 332 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References NvTrackerParamsTrajectoryManager::m_minVisibility4TrajDump, and m_params.
|
inline |
Return a copy of trajectory-manager parameters.
Definition at line 329 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References m_params.
|
inline |
Return a copy of trajectory-manager parameters.
Definition at line 329 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References m_params.
|
protectedvirtual |
Get the trimmed new trajectory for reassociation with peer trajectory.
| [in] | newTraj | Trajectory to be trimmed. |
| [in] | peerTraj | Peer trajectory to reassociate against. |
| [in] | lastTrackedFrameNum_peer | Last tracked frame number of the peer. |
|
protectedvirtual |
Get the trimmed new trajectory for reassociation with peer trajectory.
| [in] | newTraj | Trajectory to be trimmed. |
| [in] | peerTraj | Peer trajectory to reassociate against. |
| [in] | lastTrackedFrameNum_peer | Last tracked frame number of the peer. |
|
protected |
Return the next target ID without consuming it.
|
protected |
Return the next target ID without consuming it.
|
protected |
Trim the tracklet by removing the last un-validated trajectory points.
| [in] | targetId | ID of the tracklet. |
| [in] | streamId | Stream that owns the tracklet. |
| [in,out] | tracklet | Tracklet trimmed in place by removing unvalidated tail points. |
|
protected |
Trim the tracklet by removing the last un-validated trajectory points.
| [in] | targetId | ID of the tracklet. |
| [in] | streamId | Stream that owns the tracklet. |
| [in,out] | tracklet | Tracklet trimmed in place by removing unvalidated tail points. |
| void NvTrajectoryManager::purgeArchivedTrajectories | ( | ) |
Purge all archived trajectories.
| void NvTrajectoryManager::purgeArchivedTrajectories | ( | ) |
Purge all archived trajectories.
|
protected |
Remove from the projected trajectory DB.
| [in] | target | Track to remove from the projected trajectory database. |
|
protected |
Remove from the projected trajectory DB.
| [in] | target | Track to remove from the projected trajectory database. |
|
inline |
Reset the unique-ID generator with a new random prefix.
Definition at line 276 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References m_uidGenerator, and UIDGenerator::reset().
|
inline |
Reset the unique-ID generator with a new random prefix.
Definition at line 276 of file 9.2/sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
References m_uidGenerator, and UIDGenerator::reset().
| void NvTrajectoryManager::setMultiViewAssociators | ( | std::map< NvMOTStreamId, std::shared_ptr< IMultiViewAssociator >> | multiViewAssociators | ) |
Set the multi-view associators.
| [in] | multiViewAssociators | Per-stream multi-view associators. |
| void NvTrajectoryManager::setMultiViewAssociators | ( | std::map< NvMOTStreamId, std::shared_ptr< IMultiViewAssociator >> | multiViewAssociators | ) |
Set the multi-view associators.
| [in] | multiViewAssociators | Per-stream multi-view associators. |
| void NvTrajectoryManager::setSrcFrameInfo | ( | const NvMotDataTypes::Rect2f | originalSrcImageBox, |
| const NvMotDataTypes::Rect2f | srcImageBox | ||
| ) |
Set source-frame geometry used for trajectory output.
| [in] | originalSrcImageBox | Original source image bounds. |
| [in] | srcImageBox | Tracker source image bounds. |
| void NvTrajectoryManager::setSrcFrameInfo | ( | const NvMotDataTypes::Rect2f | originalSrcImageBox, |
| const NvMotDataTypes::Rect2f | srcImageBox | ||
| ) |
Set source-frame geometry used for trajectory output.
| [in] | originalSrcImageBox | Original source image bounds. |
| [in] | srcImageBox | Tracker source image bounds. |
|
protected |
Perform archive-only world-distance and frame-gap re-association.
Searches m_trajectoryArchive for terminated tracks within maxFrameGap4WorldDistReAssoc whose last valid world foot point is within maxWorldDist4ArchiveReAssoc of the new track and whose bbox similarity is at least 0.5.
| [in] | newTarget | Newly appearing track needing an ID. |
|
protected |
Perform archive-only world-distance and frame-gap re-association.
Searches m_trajectoryArchive for terminated tracks within maxFrameGap4WorldDistReAssoc whose last valid world foot point is within maxWorldDist4ArchiveReAssoc of the new track and whose bbox similarity is at least 0.5.
| [in] | newTarget | Newly appearing track needing an ID. |
|
protected |
Try to perform the re-assoc with the targets in the temporary DB that stores projected trajectories.
| [in] | target | Target to reassociate. |
| [out] | toBeFused | Map from a terminated target to its peer. |
|
protected |
Try to perform the re-assoc with the targets in the temporary DB that stores projected trajectories.
| [in] | target | Target to reassociate. |
| [out] | toBeFused | Map from a terminated target to its peer. |
| void NvTrajectoryManager::updateParams | ( | const YAML::Node & | fn | ) |
Update dynamic parameters during runtime.
| [in] | fn | Parsed YAML structure of config to update. |
| void NvTrajectoryManager::updateParams | ( | const YAML::Node & | fn | ) |
Update dynamic parameters during runtime.
| [in] | fn | Parsed YAML structure of config to update. |
| void NvTrajectoryManager::updateStreamIds | ( | const std::vector< NvMOTStreamId > & | streamIdsToAdd = {}, |
| const std::vector< NvMOTStreamId > & | streamIdsToDel = {} |
||
| ) |
Update per-stream trajectory state when streams are added or removed.
| [in] | streamIdsToAdd | Stream identifiers to add. |
| [in] | streamIdsToDel | Stream identifiers to remove. |
| void NvTrajectoryManager::updateStreamIds | ( | const std::vector< NvMOTStreamId > & | streamIdsToAdd = {}, |
| const std::vector< NvMOTStreamId > & | streamIdsToDel = {} |
||
| ) |
Update per-stream trajectory state when streams are added or removed.
| [in] | streamIdsToAdd | Stream identifiers to add. |
| [in] | streamIdsToDel | Stream identifiers to remove. |
|
protected |
Config file path.
Definition at line 339 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
Per-stream trajectory dump file, accessed only on the main thread.
Definition at line 346 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
Post-processing: dump trajectories into a file: only accessed in main thread.
Definition at line 345 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
Boolean to indicate if the trajectory manager is used for offline processing.
Definition at line 360 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
Multi-view associators.
Definition at line 350 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
Config params for target management.
Definition at line 338 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
Referenced by getDumpDetectorBboxes(), getMinVisibility4TrajDump(), and getParams().
|
protected |
Temporary buffer of the projected trajectories to be re-associated.
Definition at line 343 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
Stores trajectory-reassociation counters.
|
protected |
Target's index in reid batch.
Definition at line 344 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
Archive of past trajectories up to a configured age, modified on the main thread and read by workers.
Definition at line 342 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
Referenced by getArchivedTrajectory().
|
protected |
Per-stream state estimator used to project trajectories for re-association.
Definition at line 349 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
|
protected |
ID generator.
Definition at line 357 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.
Referenced by resetIDs().
|
protected |
Claimed peer target id mapped to the frame of the claim.
The claim blocks reuse for m_maxAge4TrackletArchiving frames.
Definition at line 353 of file sources/libs/nvmultiobjecttracker/include/modules/TrajectoryManager/NvTrajectoryManager.hpp.