Deepstream with Python: how to recognize an already identified object in video frames (detected object id)?

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version Deepstream 5.0
• JetPack Version (valid for Jetson only) Jetpack 4.4
• TensorRT Version 7.0

Hello:
when I am running the object detection is it possible that identified objects in previous frames are recognized in current frame?
means: is there an object id assigned to a detected object, which i could access? and is this also recognized even if there are some frames, where the object was not detected and then later detected again?

thanks, Martin

it seems that the test example on python is using a tracker:

–> but how can I access the Id which gets tracked?
(using libnvds_mot_klt: the field is trackingId described in https://docs.nvidia.com/metropolis/deepstream/dev-guide/DeepStream%20Development%20Guide/baggage/struct__NvMOTTrackedObj.html#ae266e2fd99c9b4c6365183d0f6a9fa2e)

Deepstream uses tracker to track the same object in different frames. The “object_id” (https://docs.nvidia.com/metropolis/deepstream/python-api/NvDsMeta/NvDsObjectMeta.html) will be the same if the tracker think it is the same object.

1 Like

thanks Fiona.
I was able to get the object_id by adding in the while loop:

while l_obj is not None:
try:
obj_meta=pyds.NvDsObjectMeta.cast(l_obj.data)

print("–> object Id: " + str(obj_meta.object_id))