I am quite confused: (1) these shouldn’t be the same number, that is, two different objects, two different numbers; (2) I expected the number 2 and 18, just like de OSD, but I get these large integers. What am I missing here?
class_id provides the index of the object class that was inferred, but I already have this, and it is already mapped the label “Car”.
So, back to object_id, why it always shows me 18446744073709551615? I read the documentation previously and it says “Unique ID for tracking the object”, but this is not what is happening. I expected to receive the same ID from what is printed on the OSD (2 and 18, please, take a look at the image), or even a long integer, but it is not correct to show the same number.
This number 18446744073709551615 for object_id is weird. Despite Nvidia documentation say object_id type is int, it looks much like a memory address. However, this number is found often in Nvidia Forum, and it is unreasonable to believe that an memory address from my device is the same from another device.
The fact is: object_id is not being set!! This is the default value for object_id (Nvidia guys, recall to initialize variables with good values, it a good programming practice and helps other developers).
The problem is that the probe function (in my case: tiler_src_pad_buffer_probe) is actually used by pgie.get_static_pad("src"). And attention, the pgie element is before tracker in the pipeline, so the probe function will obtain wrong object id.
Just need to place the probe in the correct position: voilá.
In my case, just changed osdsinkpad = pgie.get_static_pad("src") to osdsinkpad = nvosd.get_static_pad("sink"). Since: ... -> pgie -> tracker -> nvosd -> ...