Hi, I’ve been experimenting with adding custom objects in the Deepstream metadata, and have run into an issue with the tracker in the process of doing so.
To add these objects, I’m using a probe in an upstream element (nvvidconv) and this works fine when the new object’s ‘object_id’ is set to a fixed number. However, since the tracker does not modify this object_id, and all the IDs end up being the same. Reading through the sample apps, I found that the solution was to mark the objects as untracked, by setting the object_id to “UNTRACKED_OBJECT_ID”. However, when I set it to UNTRACKED_OBJECT_ID, these objects are not added to the metadata, with no errors thrown. I have the nvtracker element downstream (running NvDCF). I hope to track the objects that are added via the metadata.
This is how I’ve added the objects to the metadata:
pyds.nvds_acquire_meta_lock(batch_meta)
new_object=pyds.nvds_acquire_obj_meta_from_pool(batch_meta)
new_object.object_id = UNTRACKED_OBJECT_ID
new_object.unique_component_id = 1
new_object.class_id = 2
new_object.confidence = 1.0
new_object.obj_label = 'Test'
new_object.parent = None
new_object.rect_params.top = int(rect_coords[1])
new_object.rect_params.left = int(rect_coords[0])
new_object.rect_params.width = int(rect_coords[2])
new_object.rect_params.height = int(rect_coords[3])
pyds.nvds_add_obj_meta_to_frame(frame_meta, new_object, None)
pyds.nvds_release_meta_lock(batch_meta)
The value of untracked object ID is set like this:
UNTRACKED_OBJECT_ID = 0xffffffffffffffff
This is the output from a downstream element on reading the object metadata with object_id set to a fixed random number:
l_obj <pyds.GList object at 0x7fb520f218f0>
And this is the output with object_id set to UNTRACKED_OBJECT_ID:
l_obj None
What am I missing here?
Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU) GPU, RTX 3090
• DeepStream Version 6.0
• JetPack Version (valid for Jetson only) -
• TensorRT Version 8.0.1
• NVIDIA GPU Driver Version (valid for GPU only) 470.63.01
• Issue Type( questions, new requirements, bugs) Questions
• 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) Add a new object via a probe on a DS element upstream from tracker, check tracking ID
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)