Deepstream config_tracker

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) [GeForce RTX 3070 Ti]
• DeepStream Version version 6.0.0
• JetPack Version (valid for Jetson only)
• TensorRT Version TensorRT-
• NVIDIA GPU Driver Version (valid for GPU only) CUDA Version: 11.5
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I have got the coordinates of the target and want to add it to the deepstream project through metadata, but when I use tracker, the obj_meta.object_id is always 0 and cannot be tracked normally

How should I assign values ​​to use the trancker plugin???

The code is as follows:

def add_obj_meta_to_frame(frame_object, batch_meta, frame_meta, label_names, index=-1, KeyPoint_list=None):
“”" Inserts an object into the metadata “”"
# this is a good place to insert objects into the metadata.
# Here’s an example of inserting a single object.
obj_meta = pyds.nvds_acquire_obj_meta_from_pool(batch_meta)
# Set bbox properties. These are in input resolution.
rect_params = obj_meta.rect_params
rect_params.left = int(frame_object.left) = int(
rect_params.width = int(frame_object.width)
rect_params.height = int(frame_object.height)

# Semi-transparent yellow backgroud
rect_params.has_bg_color = 0
rect_params.bg_color.set(1, 1, 0, 0.4)

# Red border of width 3
rect_params.border_width = 3
rect_params.border_color.set(1, 0, 0, 1)

# Set object info including class, detection confidence, etc.
obj_meta.confidence = frame_object.detectionConfidence
obj_meta.class_id = frame_object.classId

# There is no tracking ID upon detection. The tracker will
# assign an ID.

obj_meta.object_id = UNTRACKED_OBJECT_ID

# Set the object classification label.
obj_meta.obj_label = label_names[frame_object.classId]

# Set display text for the object.
txt_params = obj_meta.text_params

if txt_params.display_text:

txt_params.x_offset = int(rect_params.left)
txt_params.y_offset = max(0, int( - 10)
txt_params.display_text = (str(obj_meta.object_id) + " " + label_names[frame_object.classId] + " " +
# Font , font-color and font-size
txt_params.font_params.font_name = "Serif"
txt_params.font_params.font_size = 10
# set(red, green, blue, alpha); set to White
txt_params.font_params.font_color.set(1.0, 1.0, 1.0, 1.0)

# Text background color
txt_params.set_bg_clr = 1
# set(red, green, blue, alpha); set to Black
txt_params.text_bg_clr.set(0.0, 0.0, 0.0, 1.0)

pyds.nvds_add_obj_meta_to_frame(frame_meta, obj_meta, None)


Please refer the python DS samples which included tracker: Python Sample Apps and Bindings Source Details — DeepStream 6.1 Release documentation (

Thank you for your attention, I mean adds detected objects into the pipeline metadata for downstream processing。
How should I assign the metadata to call the tracker plugin?
Reference example:

nvinfer will add meta into gstbuffer. nvtracker will use those meta. What do you want to know?

Thank you for your attention, the problem has been solved, I got an error when adding the metadata

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.