# How to access NvMOTTrackedObj

**URL:** <https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400>\
**Category:** DeepStream SDK\
**Created:** [January 7, 2021, 11:37am UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400 "2021-01-07T11:37:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nors](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nors](https://forums.developer.nvidia.com/u/nors)\
**Post date:** [January 7, 2021, 11:37am UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/1 "2021-01-07T11:37:38Z")

</div>

**• Hardware Platform (Jetson / GPU)**: GPU  
**• DeepStream Version** : 5.0  
**• TensorRT Version** 7.1.3.4  
**• 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](https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/DeepStream_Development_Guide/baggage/struct__NvMOTTrackedObj.html) or other structs from the Object Tracker API from the frame meta data. Is that possible?

---

<div class="post-metadata">

**Author:** ![bcao](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/bcao/32/14043_2.png) [@bcao](https://forums.developer.nvidia.com/u/bcao)\
**Post date:** [January 8, 2021, 10:13am UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/3 "2021-01-08T10:13:50Z")

</div>

> [@nors](#):
>
> [NvMOTTrackedObj](https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/DeepStream_Development_Guide/baggage/struct__NvMOTTrackedObj.html)

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

---

<div class="post-metadata">

**Author:** ![nors](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nors](https://forums.developer.nvidia.com/u/nors)\
**Post date:** [January 8, 2021, 1:52pm UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/4 "2021-01-08T13:52:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pshin](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/pshin/32/15508_2.png) [@pshin](https://forums.developer.nvidia.com/u/pshin)\
**Post date:** [January 13, 2021, 6:51pm UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/5 "2021-01-13T18:51:45Z")

</div>

Hello,

`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`

---

<div class="post-metadata">

**Author:** ![nors](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nors](https://forums.developer.nvidia.com/u/nors)\
**Post date:** [January 14, 2021, 2:33pm UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/6 "2021-01-14T14:33:44Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![pshin](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/pshin/32/15508_2.png) [@pshin](https://forums.developer.nvidia.com/u/pshin)\
**Post date:** [January 18, 2021, 6:09am UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/7 "2021-01-18T06:09:58Z")

</div>

> [@nors](#):
>
> 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?

Yes, it is correct.

---

<div class="post-metadata">

**Author:** ![nors](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nors](https://forums.developer.nvidia.com/u/nors)\
**Post date:** [January 22, 2021, 6:13am UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/8 "2021-01-22T06:13:18Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![pshin](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/pshin/32/15508_2.png) [@pshin](https://forums.developer.nvidia.com/u/pshin)\
**Post date:** [January 26, 2021, 3:51am UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/9 "2021-01-26T03:51:55Z")

</div>

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](https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_gst-nvtracker.html#custom-low-level-library), 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.

---

<div class="post-metadata">

**Author:** ![nors](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@nors](https://forums.developer.nvidia.com/u/nors)\
**Post date:** [January 26, 2021, 7:52am UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/10 "2021-01-26T07:52:46Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![TomNVIDIA](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tomnvidia/32/14181_2.png) [@TomNVIDIA](https://forums.developer.nvidia.com/u/TomNVIDIA)\
**Post date:** [October 12, 2021, 4:15pm UTC](https://forums.developer.nvidia.com/t/how-to-access-nvmottrackedobj/165400/12 "2021-10-12T16:15:21Z")

</div>

Closed on October 12, 2021, 4:15pm UTC


