Hi,
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
config.read('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
pipeline.add(pgie)
pipeline.add(tracker)
pipeline.add(tiler)
pipeline.add(nvvidconv)
pipeline.add(nvosd)
pipeline.add(sink)
# link
streammux.link(queue1)
ueue1.link(pgie)
pgie.link(tracker)
tracker.link(queue2)
queue2.link(tiler)
tiler.link(queue3)
queue3.link(nvvidconv)
nvvidconv.link(queue4)
queue4.link(nvosd)
nvosd.link(queueu5)
queue5.link(sink)
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:
try:
# Casting l_obj.data to pyds.NvDsObjectMeta
obj_meta=pyds.NvDsObjectMeta.cast(l_obj.data)
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?