How to know when secondary model run the the same object again

According to DS6.0 documentation for nvinfer:
When the plugin is operating as a secondary classifier along with the tracker, it tries to improve performance by avoiding re-inferencing on the same objects in every frame. It does this by caching the classification output in a map with the object’s unique ID as the key. The object is inferred upon only when it is first seen in a frame (based on its object ID) or when the size (bounding box area) of the object increases by 20% or more.
How can I know when the secondary model is run again on the same tracked object?

In my application I have to report each object detected with its classification metadata from secondary models. Of course, I’d like to report each object only once.

So suppose I have two classification labels: A, B. Suppose object is initially classified as A, but then, once its bounding box increases, the secondary model is run again and classified as B. How can I know that the secondary model has run again? Should I store the first inference output (in this case A) and compare it with future output (in this case B)?

Is there any flag that I could use to know that the secondary model has been run again? This would be particularly useful also because it would allow me to retrieve a bigger image of the tracked object.

Nvtracker can identify this.

When there is bbox with UNTRACKED_OBJECT_ID object_id, the secondary GIE will inference it.

gst-nvinfer is open source. Please read and understand it by the source code.

Hi @Fiona.Chen, from the documentation The object is inferred upon [...] when the size (bounding box area) of the object increases by 20% or more..That means that the secondary nvinfer can run again even when the object is tracked. Is there a way to be alerted when this happens without keeping track of the all objects’ sizes? Does the tracker reports that it has re-inferred metadata on the same object?

You can have own flags/variables/events to understand if inference is performance again as nvinfer source is open.

1 Like

That just works for nvinfer but it answers my question. I just wanted to know if there was a feature or not. Thank you @Fiona.Chen !


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.