NVIDIA DeepStream SDK API Reference

6.0.1 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvdspreprocess_interface.h
Go to the documentation of this file.
1 
38 #ifndef __NVDSPREPROCESS_INTERFACE_H__
39 #define __NVDSPREPROCESS_INTERFACE_H__
40 
41 #include <cuda.h>
42 #include <cuda_runtime.h>
43 #include "nvbufsurface.h"
44 #include "nvbufsurftransform.h"
45 #include "gstnvdsmeta.h"
46 
47 #include "nvds_roi_meta.h"
48 #include "nvtx3/nvToolsExt.h"
49 #include <unordered_map>
50 
51 typedef struct CustomCtx CustomCtx;
52 
56 typedef enum
57 {
82 
88 typedef enum
89 {
97 
101 typedef enum
102 {
117 
123 typedef struct
124 {
132 
136 typedef struct
137 {
142  std::vector<int> network_input_shape;
146  guint64 buffer_size = 1;
152  std::string tensor_name;
154 
158 typedef struct
159 {
161  unsigned int width;
163  unsigned int height;
165  unsigned int channels;
167 
171 typedef struct
172 {
174  std::vector<NvDsRoiMeta> roi_vector;
176 
180 typedef struct
181 {
187 
191 typedef struct
192 {
193  guint unique_id;
197  std::unordered_map <std::string, std::string> user_configs;
201 
206 {
208  void *memory_ptr;
209 };
210 
216 {
217 public:
218  virtual NvDsPreProcessCustomBuf *acquire() = 0;
219  virtual gboolean release(NvDsPreProcessCustomBuf *) = 0;
220 };
221 
225 typedef struct
226 {
228  NvDsObjectMeta *obj_meta = nullptr;
229  NvDsFrameMeta *frame_meta = nullptr;
232  guint batch_index = 0;
234  gulong frame_num = 0;
236  NvBufSurfaceParams *input_surf_params = nullptr;
241  gpointer converted_frame_ptr = nullptr;
244 
246 
250 typedef struct
251 {
253  std::vector<NvDsPreProcessUnit> units;
255  GstBuffer *inbuf = nullptr;
257  gulong inbuf_batch_num = 0;
262  gboolean push_buffer = FALSE;
266  gboolean event_marker = FALSE;
268  GstBuffer *converted_buf = nullptr;
274  uint32_t pitch;
276  nvtxRangeId_t nvtx_complete_buf_range = 0;
278 
279 #endif //__NVDSPREPROCESS_INTERFACE_H__
280 
Holds metadata for a frame in a batch.
Definition: nvdsmeta.h:265
unsigned int height
Holds the input height for the model.
class for acquiring and releasing a buffer from tensor pool by custom lib.
NvBufSurface Interface
Copyright (c) 2021, NVIDIA CORPORATION.
NvDsRoiMeta roi_meta
New meta for rois provided.
NvBufSurfTransformConfigParams transform_config_params
transform config params for nvbufsurftransform api
Specifies 32-bit interleaved R-G-B-A format.
struct NvBufSurfTransformSyncObj * NvBufSurfTransformSyncObj_t
Holds the information about synchronization objects for asynchronous transform/composite APIs...
Specifies NHWC network input order.
Custom Initialization parameter for custom library.
void * memory_ptr
memory ptr where to store prepared tensor
NvDsPreProcessFormat scaling_pool_format
scaling pool color format
uint32_t pitch
Holds the pitch of the buffer.
NvDsDataType
Data type used for model in infer.
Definition: nvds_roi_meta.h:56
unsigned int channels
Holds the number of input channels for the model.
std::string tensor_name
Name of the tensor same as input layer name of model.
Holds information about a single buffer in a batch.
Definition: nvbufsurface.h:263
gchar * config_file_path
nvdspreprocess config file path
NvDsPreprocess operation succeeded.
std::vector< NvDsPreProcessUnit > units
Vector of units in the batch.
Invalid parameters were supplied.
Custom Tensor Preparation failed.
NvDsPreProcessFormat network_color_format
Holds the network input format.
Specifies 24-bit interleaved B-G-R format.
NVIDIA GStreamer DeepStream: Metadata Extension
Tensor Yet not ready to be attached as meta.
virtual NvDsPreProcessCustomBuf * acquire()=0
Holds information about a formed batch containing frames from different sources.
Definition: nvdsmeta.h:221
Holds Information about ROI Metadata.
Definition: nvds_roi_meta.h:79
NvDsPreProcessTensorParams params
tensor params from plugin
std::vector< int > network_input_shape
Hold the network shape - interpreted based on network input order For resnet10 : NCHW = infer-batch-s...
NvDsBatchMeta * batch_meta
Deepstream batch meta.
NvDsDataType data_type
DataType for tensor formation.
Specifies any other custom input order handled by custom lib.
struct CustomCtx CustomCtx
Holds model parameters for tensor preparation.
virtual gboolean release(NvDsPreProcessCustomBuf *)=0
NvBufSurfaceMemType memory_type
Memory Type for tensor formation.
NvDsPreProcessStatus
Enum for the status codes returned by NvDsPreProcessImpl.
NvDsPreProcessNetworkInputOrder network_input_order
network order at which model will work
unsigned int width
Holds the input width for the model.
Holds metadata for an object in the frame.
Definition: nvdsmeta.h:323
Specifies 8-bit Luma format.
CustomSeqProcTensorParams seq_params
Additional Custom Parameters.
Specifies 24-bit interleaved R-G-B format.
Tensor params passed to custom library for tensor preparation.
custom transformation parameter for calling nvbufsurftransform api for scaling and converting the ROI...
Specifies 32-bit interleaved B-G-R-x format.
Holds configuration parameters for a transform/composite session.
NvDsPreProcessFormat
Defines model color formats.
NvBufSurfTransform Interface
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
Definition: nvbufsurface.h:180
CUDA error was encountered.
Holds information about the model network.
Tensor params for Custom sequence processing for 3d conv network.
Holds information about the batch of frames to be inferred.
NvDsPreProcessTensorParams tensor_params
tensor params from read from config file
Custom Library interface implementation failed.
NvBufSurfTransformSyncObj_t sync_obj
sync objects for async transform
std::vector< NvDsRoiMeta > roi_vector
vector of rois which can be modified by custom lib
Specifies NCHW network input order.
TensorRT interface failed.
Custom Group Transformation failed.
Custom Buffer passed to the custom lib for preparing tensor.
Holds transform parameters for a transform call.
A preprocess unit for processing which can be Frame/ROI.
Resource error was encountered.
NvDsPreProcessNetworkInputOrder
Enum for the network input order according to which network shape will be provided to prepare raw ten...
std::unordered_map< std::string, std::string > user_configs
User config map key-value pair.
NvBufSurfTransformParams transform_params
transform params for nvbufsurftransform api
Failed to configure the tensor_impl instance possibly due to an erroneous initialization property...