|
NVIDIA DeepStream SDK API Reference
|
7.0 Release
|
Go to the documentation of this file.
13 #ifndef __GST_NVINFER_H__
14 #define __GST_NVINFER_H__
16 #include <gst/base/gstbasetransform.h>
17 #include <gst/video/video.h>
20 #include <unordered_map>
24 #include "cuda_runtime_api.h"
32 #include "nvtx3/nvToolsExt.h"
35 #define PACKAGE "nvinfer"
37 #define LICENSE "Proprietary"
38 #define DESCRIPTION "NVIDIA DeepStreamSDK TensorRT plugin"
39 #define BINARY_PACKAGE "NVIDIA DeepStreamSDK TensorRT plugin"
40 #define URL "http://nvidia.com/"
50 #define GST_TYPE_NVINFER (gst_nvinfer_get_type())
51 #define GST_NVINFER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVINFER,GstNvInfer))
52 #define GST_NVINFER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVINFER,GstNvInferClass))
53 #define GST_NVINFER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_NVINFER, GstNvInferClass))
54 #define GST_IS_NVINFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVINFER))
55 #define GST_IS_NVINFER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVINFER))
56 #define GST_NVINFER_CAST(obj) ((GstNvInfer *)(obj))
131 if (attr.attributeLabel)
132 free (attr.attributeLabel);
gulong last_cleanup_frame_num
Frame number of the buffer when the history map was last cleaned up.
guint min_input_object_width
Input object size-based filtering parameters for object processing mode.
Holds the box parameters of the box to be overlayed.
GThread * output_thread
Output thread.
gboolean process_full_frame
Boolean indicating if entire frame should be inferred or crop objects based on metadata recieved from...
gboolean output_instance_mask
Boolean indicating if instance masks are expected in output and has to be attached in metadata.
@ PROP_OUTPUT_WRITE_TO_FILE
std::vector< NvDsInferAttribute > attributes
Vector of cached classification attributes.
Holds the inference information/history for one object based on it's tracking id.
@ PROP_CLIP_OBJECT_OUTSIDE_ROI
GType gst_nvinfer_get_type(void)
typedefG_BEGIN_DECLS struct _GstNvInfer GstNvInfer
@ PROP_FILTER_OUT_CLASS_IDS
GstBaseTransform base_trans
Should be the first member when extending from GstBaseTransform.
Holds information about batched buffers.
NvBufSurfTransformParams transform_params
Parameters to use for transforming buffers.
NvDsInferNetworkInfo network_info
Network input information.
cudaStream_t convertStream
Cuda Stream to launch npp operations on.
Holds the bounding box coloring information for one class;.
guint max_input_object_width
@ PROP_OUTPUT_CALLBACK_USERDATA
gint network_width
Network input resolution.
std::vector< NvDsInferLayerInfo > * output_layers_info
Vector of bound output layers information.
gboolean under_inference
Boolean indicating if the object is already being inferred on.
gboolean config_file_parse_successful
Boolean indicating if the config parsing was successful.
GQueue * process_queue
Processing Queue and related synchronization structures.
std::string label
Cached string label.
gboolean write_raw_buffers_to_file
Boolean indicating if the bound buffer contents should be written to file.
NvBufSurfTransformConfigParams transform_config_params
Config params required by NvBufSurfTransform API.
gulong current_batch_num
Current batch number of the input batch.
gboolean input_tensor_from_meta
@ PROP_OPERATE_ON_CLASS_IDS
gboolean clip_object_outside_roi
Clip the object bounding-box which lies outside the roi specified by nvdspreprosess plugin.
gst_nvinfer_raw_output_generated_callback output_generated_callback
Pointer to the callback function and userdata for application access to the bound buffer contents.
NvOSD_ColorParams bg_color
NvOSD_RectParams last_inferred_coords
Bounding box co-ordinates of the object when it was last inferred on.
GThread * input_queue_thread
gchar * config_file_path
Path to the configuration file for this instance of gst-nvinfer.
gint operate_on_gie_id
Source GIE ID and class-id based filtering parameters for object processing mode.
Holds information about the model network.
gboolean classifier_async_mode
Boolean indicating if the secondary classifier should run in asynchronous mode.
struct _GstNvInferImpl GstNvInferImpl
gulong last_seen_frame_num
Frame number of the frame which .
gulong last_accessed_frame_num
Number of the frame in the stream when the object was last accessed.
guint max_batch_size
Maximum batch size.
std::vector< GstNvInferColorParams > * perClassColorParams
Vector for per-class color parameters.
gulong last_map_cleanup_frame_num
gpointer output_generated_userdata
gchar * classifier_type
String containing the type of classifier.
GstClockTime untracked_object_warn_pts
PTS of input buffer when nvinfer last posted the warning about untracked object.
guint unique_id
Unique ID of the element.
guint64 file_write_batch_num
Batch counter for writing buffer contents to file.
std::set< uint > * filter_out_class_ids
std::vector< gboolean > * operate_on_class_ids
GstFlowReturn last_flow_ret
GstFlowReturn returned by the latest buffer pad push.
Holds source-specific information.
guint gst_nvinfer_signals[LAST_SIGNAL]
@ PROP_CROP_OBJECTS_TO_ROI_BOUNDARY
guint min_input_object_height
struct _GstNvInferObjectHistory GstNvInferObjectHistory
Holds the inference information/history for one object based on it's tracking id.
gboolean have_border_color
GstNvInferObjectInfo()=default
@ PROP_OUTPUT_TENSOR_META
Holds the color parameters of the box or text to be overlayed.
GstBufferPool * pool
Internal buffer pool for memory required for scaling input frames and cropping object.
std::vector< GstNvInferDetectionFilterParams > * perClassDetectionFilterParams
Vector for per-class detection filtering parameters.
std::unordered_map< guint64, std::shared_ptr< GstNvInferObjectHistory > > GstNvInferObjectHistoryMap
Map type for maintaing inference history for objects based on their tracking ids.
NvBufSurface tmp_surf
Temporary NvBufSurface for batched transformations.
void(* model_updated)(GstNvInfer *, gint err, const gchar *cfg_file)
Signals.
gboolean stop
Boolean to signal output thread to stop.
gboolean symmetric_padding
Boolean indicating which padding to be used when scaling to network resolution.
guint max_input_object_height
G_BEGIN_DECLS typedef void(* gst_nvinfer_raw_output_generated_callback)(GstBuffer *buf, NvDsInferNetworkInfo *network_info, NvDsInferLayerInfo *layers_info, guint num_layers, guint batch_size, gpointer user_data)
Function definition for the inference raw output generated callback of Gst-NvInfer plugin.
GstNvInferObjectInfo cached_info
Cached object information.
GstNvInfer element structure.
GstNvInferObjectHistoryMap object_history_map
Map of object tracking ID and the object infer history.
guint secondary_reinfer_interval
Frame interval after which objects should be reinferred on.
nvtxDomainHandle_t nvtx_domain
NVTX Domain.
std::vector< NvDsInferLayerInfo > * layers_info
Vector of bound layers information.
std::vector< gboolean > * is_prop_set
Vector of booleans indicating if properties have been set through GObject set method.
std::unordered_map< gint, GstNvInferSourceInfo > * source_info
Per source information.
guint interval
Batch interval for full-frame processing.
gulong last_inferred_frame_num
Number of the frame in the stream when the object was last inferred on.
Holds the cached information of an object.
@ PROP_OUTPUT_INSTANCE_MASK
gboolean output_tensor_meta
Boolean indicating if tensor outputs should be attached as meta on GstBuffers.
gboolean crop_objects_to_roi_boundary
Holds the bounding box/object detection filtering parameters per class.
gboolean maintain_aspect_ratio
Boolean indicating if aspect ratio should be maintained when scaling to network resolution.
NvOSD_ColorParams border_color
guint gpu_id
ID of the GPU this element uses for conversions / inference.
GstBaseTransformClass parent_class