NVIDIA DeepStream SDK API Reference

9.0 Release
9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef _INVTRACKERPROC_H
14 #define _INVTRACKERPROC_H
15 
16 #include "nvbufsurface.h"
17 #include "nvdstracker.h"
18 
19 #include <vector>
20 
22 struct InputParams
23 {
26  void* pPreservedData;
27  bool eventMarker;
28 };
29 
32 {
36 };
37 
40 {
49 };
50 
52 struct TrackerConfig
53 {
55  uint32_t batchSize;
56  uint32_t trackerWidth;
57  uint32_t trackerHeight;
58  char* trackerLibFile;
60  std::vector<std::string> trackerConfigFilePerSubBatch;
61 
62  bool displayTrackingId;
64 
66  int32_t gpuId;
67  int32_t compute_hw;
68 
69  uint32_t trackingSurfType;
70  bool trackingSurfTypeFromConfig = false;
71 
72  bool inputTensorMeta = false;
73  uint32_t tensorMetaGieId = 0;
75  std::vector<std::vector<int>> subBatchesConfig = {};
76  std::vector<uint32_t> subBatchSizes = {};
79  bool dynamicSubBatching = false;
81 
85  uint32_t numTransforms;
86  uint32_t maxTargetsPerStream;
87  uint32_t maxShadowTrackingAge;
88  bool pastFrame;
91 
92  bool outputShadowTracks;
93 
95  uint32_t maxConvBufPoolSize;
96  uint32_t maxMiscDataPoolSize;
97  uint32_t reidFeatureSize;
98  uint32_t maxConvexHullSize;
99  bool outputReidTensor;
100  bool outputVisibility;
101  bool outputFootLocation;
102  bool outputConvexHull;
103 
104  char* gstName;
105 
107  std::vector<gboolean> operateOnClassIds;
108 };
109 
111 class INvTrackerProc
112 {
113 public:
114  virtual ~INvTrackerProc() {};
115 
116  virtual bool init(const TrackerConfig& config) = 0;
117  virtual void deInit() = 0;
118 
120  virtual bool addSource(uint32_t sourceId) = 0;
122  virtual bool removeSource(uint32_t sourceId, bool removeObjectIdMapping=true) = 0;
124  virtual bool resetSource(uint32_t sourceId) = 0;
126  virtual bool submitInput(const InputParams& inputParams) = 0;
128  virtual CompletionStatus waitForCompletion(InputParams& inputParams) = 0;
130  virtual bool flushReqs() = 0;
132  virtual bool updateDynamicConfig(const std::string& configStr, uint32_t sourceId)=0;
133 };
134 
135 #endif
InputParams
Input data for tracker plugin.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:22
TrackerConfig::outputVisibility
bool outputVisibility
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:100
TrackerConfig::operateOnClassIds
std::vector< gboolean > operateOnClassIds
Operate on class IDs filtering parameters.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:107
CompletionStatus_Exit
@ CompletionStatus_Exit
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:35
InputParams::pBatchMeta
NvDsBatchMeta * pBatchMeta
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:25
TrackerConfig::trackingSurfType
uint32_t trackingSurfType
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:69
TrackerConfig::maxTargetsPerStream
uint32_t maxTargetsPerStream
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:86
INvTrackerProc::waitForCompletion
virtual CompletionStatus waitForCompletion(InputParams &inputParams)=0
Wait until a batch's process is done.
INvTrackerProc::flushReqs
virtual bool flushReqs()=0
Flush the request to send the batch downstream.
NvBufSurface
Holds information about batched buffers.
Definition: sources/includes/nvbufsurface.h:597
TrackerConfig::batchSize
uint32_t batchSize
From DeepStream app config file.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:55
TrackerConfig::trackerLibFile
char * trackerLibFile
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:58
TrackerConfig::maxMiscDataPoolSize
uint32_t maxMiscDataPoolSize
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:96
TrackerConfig::tensorMetaGieId
uint32_t tensorMetaGieId
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:73
CompletionStatus_Error
@ CompletionStatus_Error
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:34
InputParams::pPreservedData
void * pPreservedData
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:26
TrackerConfig::outputConvexHull
bool outputConvexHull
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:102
TrackerConfig::reidFeatureSize
uint32_t reidFeatureSize
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:97
CompletionStatus_OK
@ CompletionStatus_OK
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:33
TrackerConfig::outputTerminatedTracks
bool outputTerminatedTracks
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:89
TrackerConfig::colorFormat
NvBufSurfaceColorFormat colorFormat
From low level tracker library query.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:83
INvTrackerProc::updateDynamicConfig
virtual bool updateDynamicConfig(const std::string &configStr, uint32_t sourceId)=0
Update the low-level tracker lib's config dynamically during runtime.
TrackerConfig::maxTrajectoryBufferLength
uint32_t maxTrajectoryBufferLength
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:90
TrackerConfig::displayTrackingId
bool displayTrackingId
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:62
CompletionStatus
CompletionStatus
Tracker process completion status.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:31
NvMOTCompute
uint8_t NvMOTCompute
Definition: sources/includes/nvdstracker.h:67
TrackerConfig::subBatchSizes
std::vector< uint32_t > subBatchSizes
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:76
TrackingIdResetMode_FromZeroAfterEOS
@ TrackingIdResetMode_FromZeroAfterEOS
Id starts from 0 after stream reaching EOS.
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:46
TrackerConfig::maxConvexHullSize
uint32_t maxConvexHullSize
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:98
TrackerConfig::subBatchErrRecoveryTrialCnt
int subBatchErrRecoveryTrialCnt
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:80
TrackerConfig::outputShadowTracks
bool outputShadowTracks
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:92
TrackerConfig::trackingSurfTypeFromConfig
bool trackingSurfTypeFromConfig
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:70
INvTrackerProc::addSource
virtual bool addSource(uint32_t sourceId)=0
Tracker actions when a source is added to the pipeline.
TrackerConfig::pastFrame
bool pastFrame
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:88
_NvDsBatchMeta
Holds information about a formed batch containing frames from different sources.
Definition: sources/includes/nvdsmeta.h:257
TrackerConfig::gstName
char * gstName
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:104
TrackerConfig::compute_hw
int32_t compute_hw
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:67
INvTrackerProc::deInit
virtual void deInit()=0
TrackerConfig::maxConvBufPoolSize
uint32_t maxConvBufPoolSize
Store buffer pool size since low level tracker needs this info.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:95
NvBufSurfaceMemType
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
Definition: sources/includes/nvbufsurface.h:350
TrackerConfig::maxShadowTrackingAge
uint32_t maxShadowTrackingAge
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:87
TrackerConfig::numTransforms
uint32_t numTransforms
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:85
TrackerConfig::memType
NvBufSurfaceMemType memType
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:84
TrackerConfig::outputReidTensor
bool outputReidTensor
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:99
TrackerConfig::trackingIdResetMode
TrackingIdResetMode trackingIdResetMode
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:63
TrackerConfig::trackerConfigFileList
char * trackerConfigFileList
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:59
INvTrackerProc
Virtual base class for tracker plugin processing.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:111
TrackingIdResetMode_NewIdAfterStreamReset
@ TrackingIdResetMode_NewIdAfterStreamReset
Terminate existing objects and assign new ids after stream reset.
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:44
INvTrackerProc::init
virtual bool init(const TrackerConfig &config)=0
InputParams::eventMarker
bool eventMarker
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:27
INvTrackerProc::resetSource
virtual bool resetSource(uint32_t sourceId)=0
Tracker actions when a source is reset.
TrackerConfig::trackerWidth
uint32_t trackerWidth
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:56
InputParams::pSurfaceBatch
NvBufSurface * pSurfaceBatch
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:24
TrackerConfig::outputFootLocation
bool outputFootLocation
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:101
TrackerConfig
Tracker plugin config params.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:52
TrackingIdResetMode_MaxValue
@ TrackingIdResetMode_MaxValue
Max value of the enum.
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:48
INvTrackerProc::submitInput
virtual bool submitInput(const InputParams &inputParams)=0
Submit an input batch to tracker process queue.
INvTrackerProc::removeSource
virtual bool removeSource(uint32_t sourceId, bool removeObjectIdMapping=true)=0
Tracker actions when a source is removed to the pipeline.
TrackingIdResetMode_Default
@ TrackingIdResetMode_Default
No id reset.
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:42
INvTrackerProc::~INvTrackerProc
virtual ~INvTrackerProc()
Definition: 9.0/sources/gst-plugins/gst-nvtracker/invtracker_proc.h:114
TrackerConfig::computeTarget
NvMOTCompute computeTarget
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:65
TrackerConfig::inputTensorMeta
bool inputTensorMeta
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:72
TrackerConfig::trackerHeight
uint32_t trackerHeight
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:57
TrackerConfig::gpuId
int32_t gpuId
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:66
NvBufSurfaceColorFormat
NvBufSurfaceColorFormat
Defines color formats for NvBufSurface.
Definition: sources/includes/nvbufsurface.h:105
TrackerConfig::trackerConfigFilePerSubBatch
std::vector< std::string > trackerConfigFilePerSubBatch
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:60
TrackerConfig::dynamicSubBatching
bool dynamicSubBatching
dynamicSubBatching will be set to "true" when user specifies sub-batch sizes and
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:79
TrackingIdResetMode
TrackingIdResetMode
Bitwise flags for tracker id reset.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:39
TrackerConfig::subBatchesConfig
std::vector< std::vector< int > > subBatchesConfig
vector < sub-batch ids : vector <source ids in each sub-batch > >
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:75