|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
18 #ifndef NVTRACKEDOBJECT_HPP_
19 #define NVTRACKEDOBJECT_HPP_
24 #include <unordered_map>
33 #include <sys/syscall.h>
37 #include "modules/utility/dataTypes.hpp"
38 #include "modules/utility/cv_functions.hpp"
39 #include "modules/Estimatorv2/estimator_factory2.hpp"
40 #include "modules/NvMultiObjectTracker/localizer.hpp"
41 #include "modules/NvMultiObjectTracker/NvMultiObjectTracker_common.hpp"
42 #include "modules/TrajectoryManager/NvTrajectoryManager.hpp"
43 #include "modules/ObjectModelProjector/ObjectModelProjector.hpp"
44 #include "modules/MultiViewAssociator/MultiViewAssociator_factory.hpp"
92 std::deque<const DetectedObjInfo *>
detObjs;
93 std::map<TrackerIndex, std::shared_ptr<NvTrackedObject>>
targets;
106 std::deque<std::pair<const DetectedObjInfo *, TrackerIndex>>
matchedPairs;
154 void read(
const YAML::Node &fn)
override;
296 const std::list<TargetInfo> &tracklet,
const std::list<TargetInfo> &peerTracklet
310 const std::map<NvMOTStreamId, NvMOTFrame *> &inputMeta
390 const cv::Scalar getColor() {
return m_color; }
661 if (ptr && reidFeatureSize > 0) {
825 std::vector<std::tuple<Eigen::VectorXd, Eigen::Matrix2d, bool>>
m_measList;
843 typedef std::map< std::shared_ptr<NvTrackedObject>, std::pair<std::shared_ptr<NvTrackedObject>,
int> >
FusedObjectList;
874 void updateInputInfo(
const std::map<NvMOTStreamId, NvMOTFrame *> &inputMeta);
899 const std::map<NvMOTStreamId, NvMOTFrame *> &inputMeta,
const NvMotDataTypes::Size& srcImageSize
941 const std::map<NvMOTStreamId, NvMOTFrame *> &inputMeta
960 const std::map<NvMOTStreamId, std::vector<std::shared_ptr<NvTrackedObject>>> & \
1035 std::list<TerminatedTrack> & curtermTrackList = curStreamIter->second;
1036 curtermTrackList.clear();
1048 const std::shared_ptr<NvTrackedObject> peer=
nullptr
1160 const std::deque<std::pair<const DetectedObjInfo *, TrackerIndex >> &matchedPairs
1181 const std::map<const TrackerIndex, const DetectedObjInfo*> &unmatchedDetObjs
1218 const std::shared_ptr<NvTrackedObject> peer=
nullptr
1278 #endif // NVTRACKEDOBJECT_HPP_
std::map< TargetId, reidServiceAssocInfo > m_reidServiceAssocResponseMap
Association information returned by the ReID service.
const float getVisibility()
Return the visible fraction of the target.
Stores a terminated target and its frame history.
void updateTargetStates(const NvMOTFrameNum frameNum, const DetectedObjInfo *debObj, TRACKER_STATE state)
Update the states with the new measurement.
void removeStreamSubModules(const NvMOTStreamId videoStreamId)
Remove submodules when a stream is removed.
int m_trajectorySkipInterval
Frame interval between stored trajectory points.
std::atomic< uint64_t > term_tent_age_le2
TENTATIVE death at age ≤ 2 (very short-lived).
Store multi-view association configuration parameters.
@ TOO_SMALL_OBJECT
Target bounding box was too small.
void updatePerStream(const assocDataOut_t &assocOut, const REID4REASSOC_STATE reid4reAssocState=NOT_NEEDED)
Update targets and trajectories per stream in each thread.
const DetectedObjInfo * getMatchedDetObj()
Return the detected object matched to the target.
bool m_isInit
Indicates whether the parameters have been initialized.
const std::map< NvMOTStreamId, FusedObjectList > & getTrackedObjectsFused()
Return targets fused during reassociation.
const TimeStamp getTargetIDTimeStamp()
Return the timestamp at which the target ID was created.
void getReidFeaturesDet_h(const float **ptr, int &reidFeatureSize)
Return the detection ReID feature pointer and size.
int m_reidFeatureSize
Number of values in each ReID feature.
float confidence
Match confidence computed as one divided by one plus distance.
std::map< NvMOTStreamId, std::vector< std::shared_ptr< NvTrackedObject > > > m_trackedObjectsTerminated
Stores terminated tracker in the current batch.
const std::vector< float > & getDisMahalanobisDets()
Return Mahalanobis distances from the target to detections.
void setPose25d(const float *ptr, const size_t length)
Store target 2.5D pose keypoints.
uint getSizeTrackedObjectsInPool() const
Return the number of tracker slots in the object pool.
void setTrajectoryBuffer(const std::list< TargetInfo > &traj)
Replace the target trajectory buffer.
void setObjModelProjector(std::shared_ptr< ObjectModelProjector > objModelProjector)
Store a deep copy of the object model projector.
const bool getStateUseAspc()
Report whether the state estimator uses aspect ratio.
__host__ __device__ float length(float2 v)
Compute the Euclidean length of a vector.
int m_earlyTerminationAge
If the shadowTrackingAge reaches this threshold while in TENTATIVE period, the target will be termina...
std::atomic< uint64_t > term_reg_was_active
Targets that had reached ACTIVE before regular termination.
int m_maxTargetsPerStream
The max # of targets to track per stream.
std::map< NvMOTStreamId, std::deque< DetectedObjInfo > > generateTrackedObjects4Reid(const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta)
Select targets for ReID feature extraction during reassociation.
const TargetId getTargetIDFromReidService()
Return the target ID assigned by the ReID service.
bool m_isInit
Indicates whether the target manager is initialized.
void addTargetInShadowTrack(std::shared_ptr< NvTrackedObject > target)
Save the current target in shadow track objects.
std::string m_intermediateInfoFileName
Base filename for intermediate detector and target dumps.
void setConfidenceCorrRespAtDetectedPts(const float *ptr, const size_t length)
Store confidence-weighted correlation responses at detected points.
void setNeedTargetIDAssigned()
Mark the target as ready for target ID assignment.
std::vector< float > m_confidenceReidDets
ReID feature-similarity confidence for each detection.
uint m_maxTargetsToTrack
Maximum number of targets across all streams.
std::list< TargetInfo > m_trajectoryBuffer
Record the whole trajectory.
std::deque< std::pair< const DetectedObjInfo *, TrackerIndex > > matchedPairs
Matched pairs of detected object and target index.
std::shared_ptr< ObjectModelProjector > getObjModelProjector()
Return the target object model projector.
const std::vector< PeerTarget > getPeerTargets()
Return peer-camera targets associated with this target.
bool m_isOffline
Indicates whether the tracked object is part of online tracking or offline metadata fusion.
Store the latest state and trajectory received for a peer target.
std::atomic< uint64_t > term_reg_shadow_9plus
ACTIVE-lineage targets terminated regularly at shadow age nine or later.
@ FUSED_BY_REASSOCIATION
Target was fused into another track through reassociation.
std::tuple< Eigen::VectorXd, Eigen::MatrixXd > getStatesWithCov()
Return the current estimator state and covariance.
void addConfidenceListReidDets(const float *ptr, const size_t length)
Append a model's ReID confidence values.
bool m_adoptedReidServiceID
Indicates whether an ID was adopted from the ReID service in the current frame.
std::atomic< uint64_t > shadow_rescue_8plus
INACTIVE to ACTIVE re-match at shadowAge of 8 or more.
void updateUnMatched(const NvMOTStreamId videoStreamId, const NvMOTFrameNum frameNum, const std::set< TrackerIndex > &unmatchedTargets)
Update the targets that do not have any matched detector objects.
const float * m_reidFeaturesDet_h
Target ReID feature data.
TargetId m_targetIDFromReidService
Target ID assigned by the ReID service.
const NvMOTFrameNum getAge()
Return the target age in frames.
const float getTargetCapacityUtilization()
Return the fraction of total target capacity currently in use.
const bool acquiredID()
Report whether the target acquired an ID for the first time.
float visibility
Visible fraction of the object after occlusion and image-border cropping.
bool m_saveTerminatedTracks
Enables saving terminated tracks for user reporting.
@ INSUFFICIENT_VISIBILITY
Target visibility fell below the required threshold.
void updateTargetsPerStream(const assocDataOut_t &assocOut)
Actually perform target update per stream.
std::atomic< uint64_t > term_tent_age_11plus
TENTATIVE death at age > 10 (past probation).
NvMotDataTypes::Rect2f originalSrcImageBox
Original video source image box.
std::map< TrackerIndex, std::shared_ptr< NvTrackedObject > > NvTrackedObjectList
TargetInfo m_targetInfo
Tracked target information.
int m_maxTrajectoryBufferLength
Maximum retained trajectory length before subsampling.
NvMotDataTypes::Rect2f m_predictedSearchRegion
Given a search region, predict the search region for the next frame.
std::map< NvMOTStreamId, std::shared_ptr< NvTrackedObjectList > > m_TrackedObjectsInUse
Tracked object info should only be modified in main thread and is read only in worker threads.
const NvMotDataTypes::Rect2f getPredictedTargetBbox()
Return the bounding box predicted by the state estimator.
std::atomic< uint64_t > term_reg_shadow_6
ACTIVE-lineage targets terminated regularly at shadow age six.
int m_debugVerboseLevel
Debug message verbose mode level.
void setConfidenceReidDets(const float *ptr, const size_t length)
Store ReID confidence values for detections.
void setTargetID(const TargetId newTargetID)
Set the unique target ID.
@ REMOVED_STREAM_TRACKER
Target belonged to a removed stream.
float m_minIouDiff4NewTarget
If the IOU between the newly detected object and any of the existing targets is higher than this thre...
std::map< const TrackerIndex, const DetectedObjInfo * > unmatchedDetObjs
Detected objects without a matched target.
NvMOTFrameNum frameNum
Frame number of the video stream.
void setBecameActive(const bool flag)
Set whether the target became ACTIVE in the current frame.
NvTrackedObjectManager(const std::string &configFilePath)
Initialize the target manager from a tracker configuration.
float confidence
Tracker confidence.
std::map< NvMOTStreamId, std::ofstream > m_fileIntermediateDetDump
Intermediate detection dump stream for each video stream.
const float getTrackerConfidence()
Return the current tracker confidence.
float getReidServiceMatchConfidence(const TargetId targetID)
Return the ReID-service match confidence for a target ID.
std::vector< float > pose3d
Per-object 3D pose keypoints.
int m_lastTrackerInd
The ID of the last active tracker along the device memory space.
void setConfidenceReidDetsFrameNum(const std::vector< int > input)
Store frame numbers associated with ReID confidence values.
const bool becameActive()
Report whether the target became ACTIVE in the current frame.
std::atomic< uint64_t > term_tent_age_5_7
TENTATIVE death at age 5-7.
void terminateTracker(const std::shared_ptr< NvTrackedObject > target, const TRACKER_DELETE_MODE deleteMode, const std::shared_ptr< NvTrackedObject > peer=nullptr)
Actually terminate tracker.
Target management module.
std::atomic< TargetId > m_targetID
Unique target ID.
Stores and updates the state of one tracked target.
void queryParams(NvMOTQuery ¶msQuery)
Populate target-manager memory requirements.
std::shared_ptr< ObjectModelProjector > m_objModelProjector
Refine bbox based on 3D object model.
float m_peakCorrResp_short
Exponentially averaged peak correlation response over a short interval.
std::deque< TargetInfo > m_pastFrameDataBuffer
Buffer storing past-frame data.
std::atomic< uint64_t > term_tent_total
Total EARLY_TERMINATION events for TENTATIVE targets.
void setTargetInfo(const TargetInfo &tInfo)
Replace the current target information.
std::map< NvMOTStreamId, std::list< TerminatedTrack > > m_terminatedTrackOutputMap_
Terminated tracks keyed by video stream ID.
const TargetId getTargetID()
Return the unique target ID.
bool isDetDone
Indicates whether detection is complete for this video stream.
bool m_needToReAssocFromReidService
Indicates whether this target requires ReID-service reassociation.
void createMultiViewAssociators()
Create multiview associators by replacing the existing instances after stream addition or deletion.
void adoptPastFrameData(const std::deque< TargetInfo > &pastFrameBuffer)
In case of re-assoc with a newer tracklet, fuse its past frame object into the existing one.
void setTargetHeight(float height, float confidence, bool force=false)
Update the estimated target height when an object model projector is available.
@ TOO_LARGE_OBJECT
Target bounding box was too large.
MultiViewAssociatorParams m_multiViewParams
Configuration parameters for multi-view association.
const SegmentationInBatch & getSegmentationBatchInfo()
Return batched segmentation-mask information.
void updateTargetCapacityUtilization()
Update target capacity utilization.
NvMOTStreamId videoStreamId
Video stream ID set during initialization.
std::atomic< uint64_t > term_tent_age_3_4
TENTATIVE death at age 3-4.
float distanceToCentroid
L2 squared distance to centroid of the cluster.
std::vector< float > m_confidenceCorrRespAtDetectedPts
Visual-tracker confidence scores at detected points.
void dumpTerminatedTracks()
Write all buffered terminated tracks to the configured debug output.
const NvMOTFrameNum frameNum
Frame number of the video stream.
const NvMOTStreamId getVideoStreamId()
Return the video stream associated with this target.
TRACKER_STATE trackerState
Current tracker state such as ACTIVE or INACTIVE.
bool m_needToRemoveFromPendingReAssocDB
Indicates whether the target must leave the pending reassociation database after becoming ACTIVE.
float getDistFromCam()
Return the target distance from the camera.
void checkToTerminateTracker(const std::shared_ptr< NvTrackedObject > target)
Check the termination criteria for a target and terminate if met.
const std::vector< float > & getCorrRespAtDetectedPts()
Return correlation responses at detected points.
bool m_ready4ReAssoc
Indicates whether this target is ready for reassociation.
void reset()
Reset the target states for later use.
std::map< NvMOTStreamId, FusedObjectList > m_trackedObjectsFused
Targets fused during reassociation, keyed by stream.
bool m_useVOTBasedTargetUpdate
Enables VOT-based target updates.
@ DUPLICATE_TRACKER
Target duplicated another tracker.
NvMOTStreamId videoStreamId
Video stream ID.
void saveShadowTrackInfo()
Output shadow track objects in current batch.
void resetReady4ReAssoc()
Clear the reassociation-ready flag.
const std::vector< float > & getConfidenceReidDets()
Return ReID confidence values for detections.
TerminatedTrack()
Initialize an empty terminated-track record.
const bool getDumpDetectorBboxes()
Report whether detector bounding boxes are included in debug dumps.
void setAcquiredID(const bool flag)
Set whether the target acquired an ID for the first time.
int m_maxShadowTrackingAge
Max length of shadow tracking. If the shadowTrackingAge exceeds this limit, the tracker will be termi...
Manage target IDs, archived trajectories, and trajectory reassociation.
const bool ready4ReAssoc()
Report whether the target is ready for reassociation.
void addPastFrameData()
Add the target info for the current frame into a buffer for later reporting.
void updateParams(const YAML::Node &fn)
Update any Dynamic Params as provided during runtime by the user.
~NvTrackedObjectManager()
Release all managed targets and stream submodules.
std::atomic< uint64_t > shadow_rescue_6
INACTIVE-to-ACTIVE matches at shadow age six.
std::deque< const DetectedObjInfo * > detObjs
Detected objects to associate with targets.
std::atomic< uint64_t > term_reg_mature
ACTIVE-lineage targets terminated at age 30 or later.
std::map< std::shared_ptr< NvTrackedObject >, std::pair< std::shared_ptr< NvTrackedObject >, int > > FusedObjectList
void setNeedToReAssocFromReidService(const bool flag)
Set whether the target requires ReID-service reassociation.
std::map< NvMOTStreamId, bool > m_isFileTerminatedDumpCreated
Indicates whether each stream's terminated-track dump file was created.
float getTargetHeight() const
Return the estimated target height or the default human height.
Stores target-manager configuration parameters.
void purgeTrajectoryBufferUntilSpecified(const NvMOTFrameNum frameNum)
Purge the trajectory buffer until the frame num specified.
bool hasBeenActive() const
Report whether the target has ever reached ACTIVE state.
void resetNeedToRemoveFromPendingReAssocDB()
Clear the pending reassociation database removal flag.
float getMinPoseConfidence() const
Return the minimum pose confidence or its default value.
void setDisMahalanobisDets(const std::vector< float > disVec)
Store Mahalanobis distances from the target to detections.
uint32_t shadowTrackingAge
Number of frames since the tracker entered INACTIVE state.
void setTargetIDFromReidService(const TargetId targetID)
Store the target ID assigned by the ReID service.
@ DONE
ReID has completed for reassociation.
std::mutex m_trackedObjectsLock
Lock associated with tracked objects for all streams.
void setCorrRespAtDetectedPts(const float *ptr, const size_t length)
Store correlation responses at detected points.
std::list< TargetInfo > & getTrajectoryBuffer()
Return the target trajectory buffer.
struct NvTrackedObjectManager::TM_Stats m_tm_stats
void setTargetIDBeforeAdoption(const TargetId targetID)
Store the target ID held before ReID-service adoption.
const NvTrackerParamsTargetManager * m_params
Configuration parameters for target management.
void resetNeedToReAssocFromReidService()
Clear the ReID-service reassociation flag.
bool m_hasBeenActive
Indicates whether the target has ever transitioned to ACTIVE.
@ EARLY_TERMINATION
TENTATIVE target reached an early termination condition.
void removeStream(const NvMOTStreamId videoStreamId)
Remove all trackers for a stream and deletes stream.
void setTargetIDTimeStamp(const TimeStamp time)
Set the timestamp at which the target ID was created.
bool addTarget(const NvMOTStreamId videoStreamId, const NvMOTFrameNum frameNum, const DetectedObjInfo *detObj, const PeerTarget *peerTarget=nullptr)
Add a new target for a new object.
const int getMatchedDetObjInd()
Return the matched detection index or negative one when unmatched.
@ TO_DO
ReID is needed for reassociation but has not completed.
float distance
L2 squared average distance of the search vector to the "groupCount" vectors in the cluster.
std::set< TrackerIndex > unmatchedTargets
Target indexes without a matched detected object.
const bool needTargetIDAssigned()
Report whether the target is ready for target ID assignment.
DetectedObjInfo * matchedDetObjInfo
Holds a pointer to the associated input object used in low level tracker.
void resetPastFrameData()
Clear the past-frame data buffer.
void resetAllStreams()
Resets all trackers for all streams.
void adoptTracklet(const std::list< TargetInfo > &tracklet)
In case of re-assoc with a newer tracklet, adopt and fuse it to the existing one.
std::list< TargetInfo > fuseOverlappingTracklets(const std::list< TargetInfo > &tracklet, const std::list< TargetInfo > &peerTracklet)
Fuse the peer's tracklet into the target's.
std::atomic< uint64_t > term_reg_shadow_1
ACTIVE-lineage targets terminated regularly at shadow age one.
const NvMOTMask & getSegmentationMask()
Return the target segmentation mask.
bool m_checkClassMatch
If true, only objects of the same class are associated (sourced from BaseConfig:checkClassMatch).
const TrackerIndex & getTargetInd()
Return the target index in the allocated memory layout.
std::tuple< Eigen::VectorXd, Eigen::MatrixXd > getPredictedStatesWithCov(const float dT=1.f)
Return the predicted estimator state and covariance.
std::vector< int > m_confidenceReidDetsFrameNum
Frame number associated with each extracted ReID feature.
bool m_outputVisibility
Output visibility flag.
@ NOT_NEEDED
ReID is not needed for reassociation.
Provides common loading helpers for tracker configuration parameters.
std::vector< float > m_persistentReidFeature
Persisted copy of the last non-null embedding; survives non-extraction frames.
const TRACKER_STATE getTrackerState()
Return the current tracker state.
std::map< CamId, std::map< TargetId, PeerTarget > > PeerTargetDB
PeerTargetDB structure.
std::atomic< uint64_t > term_reg_shadow_4
ACTIVE-lineage targets terminated regularly at shadow age four.
constexpr absl::OTABSL_OPTION_NAMESPACE_NAME::remove_reference_t< T > && move(T &&t) noexcept
uint16_t classID
Class ID of the terminated track.
const TargetId getTargetIDBeforeAdoption()
Return the target ID held before ReID-service adoption.
const std::string dumpAllTargetStates()
Dump all the target states in a structured text for debug.
std::map< NvMOTStreamId, std::ofstream > m_fileIntermediateTrackDump
Intermediate target dump stream for each video stream.
void setReidServiceAssocResponse(const std::map< TargetId, reidServiceAssocInfo > reidServiceAssocResponseMap)
Store association responses returned by the ReID service.
float m_targetCapacityUtilization
The utilization of the total allocated target capacity. [Unit: %].
NvTrackedObject(const std::string &configFilePath, const NvTrackerParamsTargetManager *params, const TrackerIndex trackerInd)
Initialize a tracked target and its estimator.
bool isObjModelProjectorInitialized()
Check whether the object model projector is initialized.
Output from ReID service association module.
const std::vector< float > & getConfidenceCorrRespAtDetectedPts()
Return confidence-weighted correlation responses at detected points.
bool m_enableBboxUnClipping
Enables recovery of bounding boxes clipped by the image border.
virtual void updateTrajectoryManagerPerStream(const assocDataOut_t &assocOut)
Update traj manager to assign ids, perform re-association and terminate trackers for each stream.
std::map< const NvMOTStreamId, std::shared_ptr< ObjectModelProjector > > m_defaultModelProjectors
Default object model projectors for each stream.
void resetStream(const NvMOTStreamId videoStreamId)
Remove all trackers for a stream WITHOUT deleting stream.
void setReidFeaturesDet_h(const float *ptr, int reidFeatureSize)
Store detection ReID feature metadata and persist non-empty features.
std::atomic< uint64_t > term_reg_shadow_3
ACTIVE-lineage targets terminated regularly at shadow age three.
const float getMinVisibility4TrajDump()
Return the minimum visibility required for trajectory dumping.
std::atomic< uint64_t > term_reg_total
Total REGULAR_TERMINATION events.
std::atomic< uint64_t > term_tent_age_8_10
TENTATIVE death at age 8-10 (near probationAge=10).
const std::deque< TargetInfo > & getPastFrameData()
Return buffered past-frame target information.
std::map< NvMOTStreamId, std::deque< DetectedObjInfo > > generateTrackedObjects4Reid(const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta)
Package this target for ReID extraction when eligible.
TRACKER_STATE state
Tracker state of the track.
Eigen::Matrix2d getLocCovariance() const
Return the location covariance from the state estimator.
const std::map< NvMOTStreamId, std::shared_ptr< NvTrackedObjectList > > & getTrackedObjectsInUseList()
Return in-use targets for all streams.
const NvMotDataTypes::Rect2f getPredictedSearchRegion() const
Get the predicted search region for the next frame.
std::atomic< bool > m_becameActive
Indicates whether the target became ACTIVE in the current frame.
NvTrackerParamsTargetManager()
Initialize target-manager parameters with default values.
const NvMotDataTypes::Rect2f getProgBbox() const
Return the progressed bounding box generated by the segmenter.
std::map< NvMOTStreamId, assocDataOut_t > m_assocOuts
Store assoc output for each stream. Only used when preserving update order.
std::map< NvMOTStreamId, std::set< std::shared_ptr< NvTrackedObject > > > m_shadowTracks
Stores shadow tracks in the current batch.
void setSegmentationBatchInfo(SegmentationInBatch segInfo)
Store batched segmentation-mask information.
std::map< TrackerIndex, std::shared_ptr< NvTrackedObject > > targets
Targets to associate, keyed by tracker index.
std::vector< std::tuple< Eigen::VectorXd, Eigen::Matrix2d, bool > > m_measList
Measurements, covariances, and detector-source flags for the state estimator.
void clearOutputTerminatedTracks()
Clear buffered terminated-track output when saving is enabled.
float clusterVariance
Variance of the cluster.
void updateMatched(const NvMOTStreamId videoStreamId, const NvMOTFrameNum frameNum, const std::deque< std::pair< const DetectedObjInfo *, TrackerIndex >> &matchedPairs)
Update the targets that have matched detector objects.
float m_minTrackerConfidence
Localization confidence threshold for the peak correlation response.
int m_maxActiveShadowTrackingAge
Override the shadow cap for tracks that were ever ACTIVE.
void updateTrajectoryBuffer()
Add the current target info to the trajectory buffer.
bool m_saveShadowTracks
Output shadow track objects.
@ CORRUPTED_TRACKER
Target state became invalid.
std::atomic< bool > m_acquiredID
Indicates whether the target acquired an ID for the first time.
TargetId targetID
Best matched target ID from reid service.
Describes batched segmentation-mask storage.
Holds the capabilities and requirements reported by the tracker library.
bool isAssocDone
Indicates whether association is complete for this video stream.
@ LOCATION_ESTIMATOR_PROJECTIVE
Selects the projective location estimator.
std::string m_terminatedTrackFilename
Terminated tracker file name.
std::vector< float > m_corrRespAtDetectedPts
Visual-tracker correlation responses at detected points.
void updateTrajectoryManager()
Update trajectories for all streams on the main thread.
TRACKER_DELETE_MODE
The types of target termination mode.
int groupCount
Number of vectors from the cluster that are present in group search results.
NvMotDataTypes::Rect2f tBbox
Object bbox.
std::map< NvMOTStreamId, std::shared_ptr< IMultiViewAssociator > > m_multiViewAssociators
Multi-view associators.
NvMOTClassId classId
Object class ID.
const NvMotDataTypes::Rect2f getSearchRegion() const
Get the search region for the current frame.
virtual ~NvTrackedObject()
Release resources owned by the tracked target.
const std::map< TargetId, reidServiceAssocInfo > & getReidServiceAssocResponse()
Return association responses from the ReID service.
void addTargetsBatch(const NvMOTStreamId videoStreamId, const NvMOTFrameNum frameNum, const std::map< const TrackerIndex, const DetectedObjInfo * > &unmatchedDetObjs)
Add new targets for the new detected objects.
float * segMaskInBatch_d
CUDA array containing segmentation results.
void resetStateEstimator()
Reset the target state estimator.
float m_minDetectorConfidence
If the confidence of a detected object is lower than this, it will not be considered as a new target.
uint16_t bboxInd
Object bbox ind in the metadata.
void addTerminatedTrackToBufferPerStream(TerminatedTrack &newTermTrack)
Append a terminated track to its stream output buffer.
void setProgBbox(const NvMotDataTypes::Rect2f &bbox)
Store the progressed bounding box generated by the segmenter.
const NvMOTFrameNum getlastFrameinTraj()
Return the last frame number in the trajectory buffer.
const int getLastTargetInd()
Return the index of the last allocated tracker.
void setAge(const NvMOTFrameNum newAge)
Set the target age in frames.
void setPose3d(const float *ptr, const size_t length)
Store target 3D pose keypoints.
const TrackerIndex m_targetInd
Index of this target in the allocated memory layout.
const NvMOTFrameNum getShadowTrackingAge()
Return the number of frames spent in shadow tracking.
void recoverDefaultModelFromBbox(const NvMOTStreamId videoStreamId, const NvMOTFrameNum frameNum, DetectedObjInfo &detObjInfo)
Recover object model from detection bounding box using default model projector.
const NvMOTTimeMeta timeMeta
Frame, stream, and local timestamps for this association pass.
void resetNeedTargetIDAssigned()
Clear the target ID assignment request.
MultiViewAssociatorParams m_multiViewParams
Parameters for the multi-view associator.
std::atomic< uint64_t > shadow_rescue_7
INACTIVE-to-ACTIVE matches at shadow age seven.
std::atomic< uint64_t > term_reg_shadow_7
ACTIVE-lineage targets terminated regularly at shadow age seven.
NvMotDataTypes::Rect2f m_progBbox
Progressed bounding box generated by segmenter.
float m_searchRegionPaddingScale
Search-region padding scale relative to the target bounding box.
void updateTrajectoryBuffers(const NvMOTStreamId videoStreamId)
Add the current target info to the trajectory buffer.
TargetId m_targetIDBeforeAdoption
Target ID held before ReID-service adoption in the current frame.
void addSeeThroughTargets(const NvMOTStreamId videoStreamId, const NvMOTFrameNum frameNum)
Add see-through targets from peer cameras.
bool addStreamSubModules(const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta, const NvMotDataTypes::Size &srcImageSize)
Update obj model projectors when streams are added or deleted.
std::tuple< Eigen::VectorXd, Eigen::MatrixXd > getPredictedMeasurementsWithCov()
Return predicted measurements and their covariance.
SegmentationInBatch m_segInfo
Segmentation results for all the targets.
const TargetInfo & getTargetInfo()
Return the current target information.
void setVideoStreamId(const NvMOTStreamId videoStreamId)
Set the video stream associated with this target.
void terminateTrackerPublic(const std::shared_ptr< NvTrackedObject > target, const TRACKER_DELETE_MODE deleteMode, const std::shared_ptr< NvTrackedObject > peer=nullptr)
Terminate a target through the public manager interface.
NvMotDataTypes::Rect2f m_searchRegion
Given a target bbox, expand the bbox to some extent to define a search region.
std::vector< std::vector< float > > & getConfidenceListReidDets()
Return ReID confidence values from all models.
Holds 3D bbox information for an object.
std::set< std::shared_ptr< NvTrackedObject > > & getShadowTracks(const NvMOTStreamId streamId)
Return shadow tracks collected for a stream in the current batch.
void setSegmentationMask(const NvMOTMask mask)
Store the target segmentation mask.
float distFromCam
Distance from the camera.
const std::string m_configFilePath
Path to the tracker configuration file.
Represents a two-dimensional integer size.
ACTIVE track termination counters (per NvTrackedObjectManager instance).
void updateTargets()
Update targets for all streams on the main thread.
Information about the input source frames for the input frame batch.
void setPeerTargets(const std::vector< PeerTarget > peerTargets)
Replace peer-camera targets associated with this target.
NvTrackedObjectList m_TrackedObjectsInPool
Pool of all preallocated tracked objects.
Detected object info obtained from input metadata.
const NvMOTStreamId videoStreamId
Video stream ID.
NvMotDataTypes::Rect2f convertXToBbox(const Eigen::VectorXd &x, const bool useAspc=false)
Convert an estimator state vector to a bounding box.
std::vector< PeerTarget > m_peerTargets
Peer targets from other cameras.
NvMotDataTypes::Size size
Size of each segmentation mask.
float getHeightConfidence() const
Return the confidence of the estimated target height.
const std::vector< int > & getConfidenceReidDetsFrameNum()
Return frame numbers associated with ReID confidence values.
REID4REASSOC_STATE
Identifies the ReID processing stage for reassociation.
void resetShadowTrackingAge()
Reset the shadow-tracking age to zero.
std::map< const NvMOTStreamId, std::shared_ptr< ObjectModelProjector > > & getObjModelProjectors()
Return default object model projectors keyed by stream ID.
void read(const YAML::Node &fn) override
Read target-manager parameters from a YAML node.
std::map< uint16_t, float > sumsCorrRespAtDetectedPt
Sum of tracker correlation responses at each detected object for cascade stage zero.
bool isInitialized()
Report whether the target manager is initialized.
void setBbox3D(const Eigen::Vector2d &pt_world_feet, NvDsObj3DBbox &bbox3DWorld, float(*bbox3DImg)[2])
Set 3D bounding box information.
void updateInputInfo(const std::map< NvMOTStreamId, NvMOTFrame * > &inputMeta)
Update per-stream input information before target-manager processing.
std::atomic< uint64_t > term_reg_shadow_5
ACTIVE-lineage targets terminated regularly at shadow age five.
std::map< NvMOTStreamId, std::ofstream > m_fileTerminatedDump
Terminated-track dump stream for each video stream.
void removeAllStreams()
Remove all trackers for all streams.
NvMOTStreamId videoStreamId
Video stream ID associated with the track.
TerminatedTrack createTerminatedTrack(const std::shared_ptr< NvTrackedObject > terminatedTarget)
Save and output the terminated tracks.
Holds the segmentaiton mask of an object.
void setAdoptedReidServiceID(const bool flag)
Set whether the target adopted an ID from the ReID service.
float expConfidence
Match confidence computed as an exponential of distance.
const uint16_t getClassId()
Return the target class ID.
NvMOTTimeMeta timeMeta
Frame, stream, and local timestamps received with the association input.
void dumpIntermediateTargetInfo(const assocDataOut_t &assocOut)
Write intermediate detector and target information for one stream.
NvTrackerParamsTargetManager m_params
Configuration parameters for target management.
const PeerTargetDB getPeerTargets(const NvMOTStreamId streamId)
Return peer targets visible to a stream.
std::vector< std::vector< float > > m_confidenceListReidDets
Detection confidence values from multiple ReID models.
std::atomic< uint64_t > term_reg_shadow_2
ACTIVE-lineage targets terminated regularly at shadow age two.
void setTrackerState(const TRACKER_STATE state)
Set the current tracker state.
std::vector< float > pose25d
Per-object 2.5D pose keypoints.
const NvMotDataTypes::Rect2f getTargetBbox() const
Return the current target bounding box.
NvMotDataTypes::Rect2f srcImageBox
Tracker source image box.
@ REGULAR_TERMINATION
Target reached a regular termination condition.
Input for the data association module.
bool usesProjectiveEstimator() const
Report whether the target uses a projective state estimator.
void incrementShadowTrackingAge(const NvMOTFrameNum increment=1)
Increment the number of frames spent in shadow tracking.
NvMOTFrameNum age
Number of frames for which the target has been tracked.
void cleanPreviousBatchData()
Clean previous batch data.
NvMOTMask m_maskOriginal
Object segmentation mask in original streammux coordinates.
bool m_needToSetTargetID
Indicates whether this target is ready for target ID assignment.
std::shared_ptr< IEstimator2 > m_stateEstimator
State estimator such as a Kalman or moving-average filter.
std::shared_ptr< IMultiViewAssociator > multiViewAssociator
Multi-view associator.
const bool adoptedReidServiceID()
Report whether the target adopted an ID from the ReID service.
std::shared_ptr< NvTrajectoryManager > m_trajectoryManager
Manages the trajectory generated by each target.
std::vector< float > m_disMahalanobisDets
Mahalanobis distance between the target and each detection.
bool m_preserveStreamUpdateOrder
Preserves input stream order when assigning target IDs for deterministic results.
Renders and writes visual tracker debugging output.
int m_probationAge
If the target's age exceeds this, the target will be considered to be valid.
void initializeQuasiActiveStates(const NvMOTFrameNum frameNum, const PeerTarget *peerTarget)
Initialize a target tracked by a peer camera in quasi-active state.
std::vector< TargetInfo > targetHistory
Target information for each frame of the track.
const std::shared_ptr< IMultiViewAssociator > getMultiViewAssociators(const NvMOTStreamId streamId)
Return the multi-view associator for a stream.
float m_peakCorrResp_long
Peak correlation response over a long interval.
std::atomic< TimeStamp > m_targetIDTimeStamp
Time at which the target ID was created.
void clearShadowTracks()
Clear shadow tracks collected for the current batch.
const std::vector< float > & getPersistentReidFeature() const
Return the last persisted non-empty ReID feature.
void initialize(const SourceFrameInfo &frameInfo)
Allocate the target pool and initialize stream-independent submodules.
TargetId targetID
Unique target ID of the terminated track.
Output from the data association module.
std::atomic< uint64_t > term_reg_young
ACTIVE-lineage targets terminated before age 30.
const uint getMaxTargetsPerStream()
Return the maximum number of targets allowed per stream.
void setConfidenceReidDets(std::vector< float > vec)
Move ReID confidence values into the target.
const bool needToRemoveFromPendingReAssocDB()
Report whether the target must leave the pending reassociation database.
void setLocalizationResults(const NvMOTFrameNum frameNum, const float trackingConfidence, const NvMotDataTypes::Rect2f &localizationBbox)
Update localization states from the current tracker result.
const std::vector< float > & getPose()
Return the target 2.5D pose keypoints.
const bool needToReAssocFromReidService()
Report whether the target requires ReID-service reassociation.
const NvMotDataTypes::Rect2f defineSearchRegion(const NvMotDataTypes::Rect2f bbox) const
Expand a target bounding box into its search region.
bool getOutputTerminatedTracks(const NvMOTStreamId streamId, std::list< TerminatedTrack > *&pTerminatedList)
Return the terminated-track output list for a stream when available.
std::atomic< uint64_t > term_reg_shadow_8
ACTIVE-lineage targets terminated regularly at shadow age eight.