Deepstream test3 with tracker


We are working with Deepstream 5.1 in python.
We’re trying to add a tracker element into deepstream test3 python. We’ve followed test2 as a sample, but still failed.
Here are some parts of our code in test3 related to tracker. Most of them are copy from test2 code.

# create tracker element
tracker = Gst.ElementFactory.make("nvtracker", "tracker")

# read tracker config'dstest2_tracker_config.txt')
# The parsing part is too long, i'm not pasting them here.
# They're the same as the code in test2.

# add pipeline

# link

The code can run properly and there will be red bounding boxes in the display but without showing object id.
We’ve tried to obtain object id in probe function in python code

while l_obj is not None:
        # Casting to pyds.NvDsObjectMeta
        print(obj_meta.obj_label, obj_meta.object_id)

The output looks like all the objects are set to a strange const integer.

Frame Number= 9 Number of Objects= 10 Timestamp= 1626087427.5311701
person 18446744073709551615
person 18446744073709551615
person 18446744073709551615
person 18446744073709551615
car 18446744073709551615
car 18446744073709551615
car 18446744073709551615
car 18446744073709551615
backpack 18446744073709551615

We use the same method to obtain object id in test2, and it works fine.

Frame Number=92 Number of Objects=16 Vehicle_count=9 Person_count=5
person 1
person 3
person 40
person 52
person 27
car 61
car 79
car 7
car 93
truck 80
backpack 10

Is there any config or setting that we missed?

I don’t have a solution to your problem but I came across this discussion which seemed relevant to the issue you are trying to solve:


Which tracker are you using? IOU,KLT or NvDCF?

Hi @Fiona.Chen,
We’ve tried both KLT and IOU, and got the same result with the strange object id.

The problem is that the function tiler_src_pad_buffer_probe in test3 python code is actually used by tiler_src_pad, which is pgie.get_static_pad("src"). The pgie element is before tracker in the pipeline, so the probe function will obtain wrong object id.

Modifying line 349 tiler_src_pad=pgie.get_static_pad("src") to
osdsinkpad = nvosd.get_static_pad("sink") will work.

Hello, I have the same problem (allways getting object_id=UNTRACKED_OBJECT_ID) and the probe is correctly linked to the osd sink.

Also I guess the tracker is doing nothing, because if I increment the inference interval, the tracker is not filling in the gaps between each inference. I am using NvDCF.

Also, checking the graph of the pipeline with xdot everything seems to be connected properly.

Can you give me any idea what could be happening?

new data, it seems it has something to do with the dewarper. If I insert it into the pipeline the tracker stops working