Object number keeps increasing with pgie tracker

I’m testing with the deepstream-test3 app and have added in the tracker with the same code and config as used in deepstream-app. The pgie interval is set to 4. So I understand that only every 4th frame will be processed. The tracker being used is KLT.

What I notice is the bounding box text says: “Person 1”. Then it says person 1 for a few frames and I can see the bounding box jump forward a little and it then says “Person 2”.
i.e. the person number keeps increasing.

The video is of me just walking in a straight line across the camera field of view.

I would have expected that it would always display “Person 1” in the bounding box until I left the field of view and then came back in; or alternatively another person walking into the field of view.

My guess is that on every inference by the pgie its increasing the person number - then the tracker tracks this same person number until the next inference is done and so on.

Can you please confirm how this is supposed to work? I’m not sure of the point if the detected object number keeps increasing?

tracking id is for same person, car or other class type.

Thanks but that doesn’t answer the question. Why does the tracker object number keep increasing every few frames. It makes it a useless value.
I would expect that if a person walked in front of a camera they would have id “1” until the left the camera field of view.

you can check code:
it’s demonstration for how to extract metadata received on OSD sink pad and update params for drawing rectangle, object information etc.
about your second question, you can see the tracking id next to the person, car, some other class type, in case
you enabled the tracker.

Thanks. I can see the code. But if the camera is looking at a person just standing still - why does the object id number increase every few frames.? It should stay constant surely??

Closing this - thanks for everyone’s help. The problem was simply my stupidity - I added a tracker to my program which is based on deepstream_test3 but did not change the probe position to be after the tracker. ;-)

Thanks for sharing this.