How to access NvMOTTrackedObj

• Hardware Platform (Jetson / GPU): GPU
• DeepStream Version: 5.0
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only) 440.33.01
• Issue Type( questions, new requirements, bugs) question
• How to reproduce the issue ?

How can I access the tracking data (e.g. age) from a probe or another plugin that’s downstream of nvtracker? I would like to get NvMOTTrackedObj or other structs from the Object Tracker API from the frame meta data. Is that possible?

The struct is used for nvtracker plugin, but not attached to meta data, any reason you need to access it?

I would like to add a custom object to the tracker. The object will not be detected by nvinfer. I can inject it using a probe, but the object is killed by tracker if the age is exceeding the value set in the configuration file.

I could increase maxShadowTrackingAge and earlyTerminationAge but that doesn’t seem to prevent the object from being killed and also I don’t even want to increase the value, since this would affect all other obejcts as well.

  maxShadowTrackingAge: 100  # Max length of shadow tracking (the shadow tracking age is incremented when (1) there's detector input yet no match or (2) tracker confidence is lower than minTrackerConfidence). Once reached, the tracker will be terminated.
  probationAge: 1           # Once the tracker age (incremented at every frame) reaches this, the tracker is considered to be valid
  earlyTerminationAge: 100    # Early termination age (in terms of shadow tracking age) during the probation period. If reached during the probation period, the tracker will be terminated prematurely.

My idea for a workaround was to reset the age of that particular object to 0 to keep it alive.

Or is there a better way to do this?


Age data is an internally-managed variable, so there’s no way to directly alter/manipulate it from outside of low-level tracker.

If you want to inject a custom object, I would recommend to add a custom object as a part of NvTracker input, which is NvDsMetaList. To make the added custom object to be alive inside the tracker, you would need to feed the custom object input for a few frames like longer than probationAge


I am trying the approach with custom objects added to NvDsMetaList.

I get the position as a user input and since the object is moving, I don’t have the position in subsequent frames for initialization of a custom object. So I set probation age to 1. The object is then tracked (for a short time).

It is my understanding, that the tracker will still kill the object eventually, if it doesn’t get confirmations from the infer module. Is that correct? Increasing this time interval wouldn’t be a solution since this would also affect other (non-custom) objects, which should be killed, if not confirmed by nvinfer.

Yes, it is correct.

I’m afraid this means I have to write a custom tracker. In this tracker, I would like access to batch_user_meta, frame_user_meta, or obj_user_meta. If I see this correctly, those are not accessibly from a custom tracker?

You mentioned that your usecase is to keep track of a user-provided bbox even if it is not detected by PGIE. However, all the trackers in DeepStreams are designed to work in conjunction with a detector that is expected to provide the object metadata whenever detected. So, unfortunately your usecase is not supported right now, unless you manipulate the detector’s output (i.e., tracker input) via a probe.

Also, as you can find more information on custom low-level tracker in DS Doc, all the input/output data are defined by an API in sources/includes/nvdstracker.h. So the access to user_meta is only available in the plugin, not the low-level tracker library. This means that even if you implement a custom tracker, the user_meta can’t be provided to the low-level tracker unless the APIs are modified.


thank you for your reply. I realized that a custom tracker would not be a solution for my problem so I will implement a replacement for nvtracker.