Feature Request - Track Anything Functionality

• Hardware Platform: Jetson Orin NX 16Gb
• DeepStream Version: 7.x

• JetPack Version 6.2.x
• TensorRT Version: 10.x
• Issue Type: Feature Request
• Requirement details: nvtracker

Hi DeepStream team,

I’m looking for guidance on building a DeepStream pipeline that supports a “track anything” mode — i.e., the ability to start tracking from a user-selected ROI (or a fixed 100×100 box in the center) even when the target is not part of my trained PGIE classes. I’ve seen this concept referred to as TAM (Track Anything Model).

I will still run PGIE via nvinfer for normal detections, but my application also requires the ability to manually initiate nvtracker / NVDCF.

There are cases where:

  • The object is unique / not worth training a class for
  • Or it cannot be reliably classified (insufficient stable features)
  • But it is trackable via appearance/motion once initialized

Goal
Keep the pipeline GPU / zero-copy and avoid CPU-based OpenCV trackers (CSRT/KCF/MOSSE), since those don’t integrate as cleanly and typically break zero-copy flow.

What I’m trying to do

Inject artificial detections (object metadata) upstream of nvtracker so NVDCF starts tracking a manually provided ROI/bbox

Configure long track persistence (shadow tracking / timeout) so a manually seeded track can survive brief occlusions or detection gaps

Questions

  1. Is there a supported way to initialize NVDCF tracking from a manual ROI without a PGIE detection?
  2. If not, is it possible to inject an object as NvDsObjectMeta (or equivalent) before nvtracker (pad probe or custom plugin)?
  3. What metadata fields are required for NVDCF to accept the injected bbox and assign/maintain a track?
  4. Which tracker config parameters control shadow age / termination / timeout, and how should they be set for a long-lived manually initiated track?

Thanks in advance, looking over the forum, I can see that there are multiple people asking similar questions and looking for this functionality. Any pointers to sample code, recommended approach, or relevant docs would be very helpful.

We have masktracker here: deepstream_reference_apps/deepstream-masktracker at master · NVIDIA-AI-IOT/deepstream_reference_apps · GitHub

nvtracker can’t support ROI. You can add an object before nvtracker. You can check NvDsObjectMeta which output from nvinfer for your reference. Please check here for shadowing tracking: Gst-nvtracker — DeepStream documentation

Thanks @kschmidt1

So for the shadow tracking - I am adding the artificial ‘object’ at NvDsBatchMeta before nvtracker in order to ‘seed’ a track.

I found the properties which I deemed important to this effort, and set them as the following.

maxShadowTrackingAge = 999
earlyTerminationAge = 99
probationAge = 0
stateEstimatorType = 0

I am now able to get the nvtracker to display a bounding box on screen, but it goes away after only ~1 frame.

How does the shadow tracking keep memory of its previous frame? Should I be getting something from NvDsObjectMeta?

Thanks in advance!

Are you set “frameMeta->bInferDone = true;” when you add the artificial object if you don’t add nvinfer in your pipeline?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks.