NVIDIA DeepStream SDK API Reference

9.1 Release
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: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef _INVTRACKERPROC_H
19 #define _INVTRACKERPROC_H
20 
21 #include "nvbufsurface.h"
22 #include "nvdstracker.h"
23 
24 #include <vector>
25 
28 {
33 };
34 
37 {
41 };
42 
45 {
54 };
55 
58 {
60  uint32_t batchSize;
61  uint32_t trackerWidth;
62  uint32_t trackerHeight;
65  std::vector<std::string> trackerConfigFilePerSubBatch;
66 
69 
71  int32_t gpuId;
72  int32_t compute_hw;
73 
74  uint32_t trackingSurfType;
76 
77  bool inputTensorMeta = false;
78  uint32_t tensorMetaGieId = 0;
80  std::vector<std::vector<int>> subBatchesConfig = {};
81  std::vector<uint32_t> subBatchSizes = {};
84  bool dynamicSubBatching = false;
86 
90  uint32_t numTransforms;
93  bool pastFrame;
96 
98 
102  uint32_t reidFeatureSize;
108 
109  char* gstName;
110 
112  std::vector<gboolean> operateOnClassIds;
113 };
114 
117 {
118 public:
119  virtual ~INvTrackerProc() {};
120 
121  virtual bool init(const TrackerConfig& config) = 0;
122  virtual void deInit() = 0;
123 
125  virtual bool addSource(uint32_t sourceId) = 0;
127  virtual bool removeSource(uint32_t sourceId, bool removeObjectIdMapping=true) = 0;
129  virtual bool resetSource(uint32_t sourceId) = 0;
131  virtual bool submitInput(const InputParams& inputParams) = 0;
133  virtual CompletionStatus waitForCompletion(InputParams& inputParams) = 0;
135  virtual bool flushReqs() = 0;
137  virtual bool updateDynamicConfig(const std::string& configStr, uint32_t sourceId)=0;
138 };
139 
140 #endif
InputParams
Input data for tracker plugin.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:27
TrackerConfig::outputVisibility
bool outputVisibility
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:105
TrackerConfig::operateOnClassIds
std::vector< gboolean > operateOnClassIds
Operate on class IDs filtering parameters.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:112
InputParams::pBatchMeta
NvDsBatchMeta * pBatchMeta
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:30
TrackerConfig::trackingSurfType
uint32_t trackingSurfType
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:74
TrackerConfig::maxTargetsPerStream
uint32_t maxTargetsPerStream
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:91
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
CompletionStatus_Exit
@ CompletionStatus_Exit
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:40
TrackerConfig::batchSize
uint32_t batchSize
From DeepStream app config file.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:60
TrackerConfig::trackerLibFile
char * trackerLibFile
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:63
TrackerConfig::maxMiscDataPoolSize
uint32_t maxMiscDataPoolSize
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:101
TrackerConfig::tensorMetaGieId
uint32_t tensorMetaGieId
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:78
InputParams::pPreservedData
void * pPreservedData
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:31
TrackerConfig::outputConvexHull
bool outputConvexHull
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:107
TrackerConfig::reidFeatureSize
uint32_t reidFeatureSize
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:102
CompletionStatus_OK
@ CompletionStatus_OK
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:38
TrackerConfig::outputTerminatedTracks
bool outputTerminatedTracks
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:94
TrackerConfig::colorFormat
NvBufSurfaceColorFormat colorFormat
From low level tracker library query.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:88
INvTrackerProc::updateDynamicConfig
virtual bool updateDynamicConfig(const std::string &configStr, uint32_t sourceId)=0
Update the low-level tracker lib's config dynamically during runtime.
TrackingIdResetMode_NewIdAfterStreamReset
@ TrackingIdResetMode_NewIdAfterStreamReset
Terminate existing objects and assign new ids after stream reset.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:49
TrackerConfig::maxTrajectoryBufferLength
uint32_t maxTrajectoryBufferLength
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:95
TrackerConfig::displayTrackingId
bool displayTrackingId
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:67
CompletionStatus
CompletionStatus
Tracker process completion status.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:36
NvMOTCompute
uint8_t NvMOTCompute
Definition: sources/includes/nvdstracker.h:90
TrackerConfig::subBatchSizes
std::vector< uint32_t > subBatchSizes
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:81
TrackerConfig::maxConvexHullSize
uint32_t maxConvexHullSize
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:103
TrackerConfig::subBatchErrRecoveryTrialCnt
int subBatchErrRecoveryTrialCnt
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:85
TrackerConfig::outputShadowTracks
bool outputShadowTracks
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:97
TrackerConfig::trackingSurfTypeFromConfig
bool trackingSurfTypeFromConfig
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:75
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:93
_NvDsBatchMeta
Holds information about a formed batch containing frames from different sources.
Definition: sources/includes/nvdsmeta.h:262
TrackerConfig::gstName
char * gstName
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:109
TrackerConfig::compute_hw
int32_t compute_hw
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:72
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:100
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:92
TrackingIdResetMode_FromZeroAfterEOS
@ TrackingIdResetMode_FromZeroAfterEOS
Id starts from 0 after stream reaching EOS.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:51
TrackerConfig::numTransforms
uint32_t numTransforms
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:90
TrackerConfig::memType
NvBufSurfaceMemType memType
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:89
TrackerConfig::outputReidTensor
bool outputReidTensor
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:104
TrackerConfig::trackingIdResetMode
TrackingIdResetMode trackingIdResetMode
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:68
TrackerConfig::trackerConfigFileList
char * trackerConfigFileList
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:64
INvTrackerProc
Virtual base class for tracker plugin processing.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:116
INvTrackerProc::init
virtual bool init(const TrackerConfig &config)=0
InputParams::eventMarker
bool eventMarker
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:32
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:61
InputParams::pSurfaceBatch
NvBufSurface * pSurfaceBatch
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:29
TrackingIdResetMode_Default
@ TrackingIdResetMode_Default
No id reset.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:47
TrackerConfig::outputFootLocation
bool outputFootLocation
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:106
TrackerConfig
Tracker plugin config params.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:57
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_MaxValue
@ TrackingIdResetMode_MaxValue
Max value of the enum.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:53
INvTrackerProc::~INvTrackerProc
virtual ~INvTrackerProc()
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:119
TrackerConfig::computeTarget
NvMOTCompute computeTarget
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:70
TrackerConfig::inputTensorMeta
bool inputTensorMeta
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:77
TrackerConfig::trackerHeight
uint32_t trackerHeight
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:62
CompletionStatus_Error
@ CompletionStatus_Error
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:39
TrackerConfig::gpuId
int32_t gpuId
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:71
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:65
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:84
TrackingIdResetMode
TrackingIdResetMode
Bitwise flags for tracker id reset.
Definition: sources/gst-plugins/gst-nvtracker/invtracker_proc.h:44
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:80