|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
18 #ifndef NVMULTIOBJECTTRACKERBASE_HPP_
19 #define NVMULTIOBJECTTRACKERBASE_HPP_
22 #include <unordered_map>
29 #include <sys/syscall.h>
33 #include "nvds_tracker_meta.h"
35 #include "modules/utility/debug_common.hpp"
36 #include "modules/DataAssociator/DataAssociator_factory.hpp"
37 #include "modules/VisualTracker/VisualTracker_factory.hpp"
38 #include "modules/ReID/ReID_factory.hpp"
39 #include "modules/Segmenter/Segmenter_factory.hpp"
40 #include "modules/ReIDService/ReIDService_factory.hpp"
41 #include "modules/PoseEstimator/PoseEstimator_factory.hpp"
42 #include "modules/NvMultiObjectTracker/NvMultiObjectTracker_common.hpp"
43 #include "modules/NvMultiObjectTracker/localizer.hpp"
44 #include "modules/NvMultiObjectTracker/NvTrackerParams.hpp"
45 #include "modules/NvMultiObjectTracker/NvTrackedObject.hpp"
71 void read(
const YAML::Node &fn)
override;
117 const std::map<NvMOTStreamId, NvMOTFrame*> &nvFramesInBatch,
NvMOTTrackedObjBatch *&pTrackedObjectsBatch
244 const std::map<NvMOTStreamId, NvMOTFrame*> &nvFramesInBatch,
NvMOTTrackedObjBatch *&pTrackedObjectsBatch
274 #endif // NVMULTIOBJECTTRACKERBASE_HPP_
uint32_t maxStreams
Max # of video streams to be supported.
virtual void update(const std::map< NvMOTStreamId, NvMOTFrame * > &nvFramesInBatch, NvMOTTrackedObjBatch *&pTrackedObjectsBatch)
Perform multi-object tracking for a batch of frames from multiple streams, with at most one frame per...
bool checkInputOutput(const std::map< NvMOTStreamId, NvMOTFrame * > &nvFramesInBatch, NvMOTTrackedObjBatch *&pTrackedObjectsBatch)
Check the input and output for the update function.
void addStreamSubModulesRuntime()
Add per stream submodules runtime whenever there is a new stream coming in.
void setMaxStreams(const uint32_t maxStreams)
Set the maximum number of supported streams.
std::map< NvMOTStreamId, std::deque< DetectedObjInfo > > m_detectedObjects
Valid detected objects obtained from the input metadata.
Defines batched multi-stream tracker operations.
bool m_checkClassMatch
Restricts association to objects of the same class when enabled.
std::shared_ptr< NvTrackerMultiThreadWorker< assocDataIn_t > > m_threadWorker
Multi-threaded producer-consumer for stream specific tasks.
std::shared_ptr< ISegmenter > m_segmenter
Object segmentation module.
void wrapUpProcessingFrameBatch()
Advance batch state and emit optional debug output.
const std::string m_configFilePath
Path to the tracker configuration file.
Holds a batch of lists of tracked objects.
REID4REASSOC_STATE m_reid4ReAssocState
Indicates whether per-stream input must be resubmitted for ReID-based reassociation.
std::shared_ptr< IReIDService > m_reidService
Re-ID Service module.
std::map< const NvMOTStreamId, std::shared_ptr< ObjectModelProjector > > m_objModelProjectors
Refine bbox based on 3D object model.
Stores and updates the state of one tracked target.
void setMaxBufSurfAddrSize(const uint32_t maxBufSurfAddrSize)
Set the maximum surface-buffer address pool size.
void outputShadowObj(const std::set< NvMOTStreamId > videoStreamIdList, NvDsTargetMiscDataBatch *&pShadowTracksBatch)
Output most recent frame history for current shadow tracks to the plugin.
bool m_useBatchNumForFrameId
Selects the batch counter instead of the per-stream frame number for cross-stream synchronization.
void setOutputData(NvMOTTrackedObjBatch *&pTrackedObjectsBatch)
Fill out the output metadata.
std::shared_ptr< NvTrackedObjectManager > m_targets
Targets in use and in the object pool.
void performDataAssociationAndUpdate()
Submit all streams' objects from main thread to each working thread to perform data association,...
void setColorFormatType(const NvBufSurfaceColorFormat colorFormat)
Set the input surface color format.
void deleteRemovedStreamTrackers(const NvMOTStreamId videoStreamID)
Delete trackers when a stream is removed.
void performDataAssociationAndUpdatePerStream(assocDataIn_t in)
Function called in each thread to perform each stream's data association and update.
Coordinates tracker submodules to process batched multi-stream input.
float m_minDetectorConfidence
Minimum detector confidence required for tracking.
virtual void initialize(const NvMotDataTypes::Size srcImgSize, const size_t srcImgPitch)
Initialize variables and allocate memories.
std::map< NvMOTStreamId, NvMOTFrame * > m_inputMeta
Input frame metadata keyed by stream ID.
SourceFrameInfo m_frameInfo
Source video frame information.
void updateParams(const std::string &configStr)
Apply supported runtime tracker configuration updates.
Provides common loading helpers for tracker configuration parameters.
std::shared_ptr< IPoseEstimator > m_poseEstimator
Pose estimation module.
Holds the capabilities and requirements reported by the tracker library.
void recoverFullBbox()
Recover the full bbox if 3D camera params are provided.
NvBufSurfaceColorFormat colorFormat
Color format of the input surfaces.
int m_debugVerboseLevel
Debug message verbose mode level.
NvTrackerParamsBase m_paramsBase
Configuration parameters used by the base tracker.
void queryParams(NvMOTQuery ¶msQuery)
Populate tracker capability and memory requirement fields.
uint32_t maxBufSurfAddrSize
Max size of surface buffer pool.
NvBufSurfaceColorFormat getColorFormatType() const
Return the configured input surface color format.
Batch of all streams of a given target misc output.
NvMultiObjectTrackerBase(const std::string &configFilePath)
Constructor.
Represents a two-dimensional integer size.
Information about the input source frames for the input frame batch.
std::shared_ptr< IReID > m_reid
ReID module.
~NvMultiObjectTrackerBase()
Release the tracker submodules.
REID4REASSOC_STATE
Identifies the ReID processing stage for reassociation.
uint32_t getMaxStreams() const
Return the maximum number of supported streams.
bool isInitialized()
Report whether the tracker is initialized.
void outputPastFrameObjs(const std::set< NvMOTStreamId > videoStreamIdList, NvDsTargetMiscDataBatch *&pPastFrameObjBatch)
Output past-frame tracking data to tracker plugin and clear the buffer.
Stores configuration parameters used by the base tracker.
void initializeSubModules()
Initialize the sub-modules.
bool m_isInitSubModules
Indicates whether all tracker submodules are initialized.
Input for the data association module.
void read(const YAML::Node &fn) override
Read base tracker parameters from a YAML node.
bool m_isInit
Indicates whether the parameters have been initialized.
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
bool m_isInit
Indicates whether the base tracker is initialized.
NvTrackerParamsBase()
Initialize the base tracker parameters with default values.
std::shared_ptr< IVisualTracker > m_visualTracker
Visual tracker module for target localization.
std::shared_ptr< IDataAssociator > m_dataAssociator
Data association module.
void parseInputMetadata()
Parse and filter the input metadata and store only valid detected objects.
void outputTerminatedObjs(const std::set< NvMOTStreamId > videoStreamIdList, NvDsTargetMiscDataBatch *&pPastFrameObjBatch)
Output complete frame history for all terminated tracks to the plugin.