Manually select an object for tracking

Hi everyone

I would like to make a simple application that lets the user click an object on a camera feed, then track it until the user clicks another button which tells the app to stop tracking

While looking for a suitable tracker I came Accross deepstream’s nvDCF tracker. as it seemed to provide fast and reliable results

The only problem I am having right now is that every app Iv’e seen that uses said tracker, seems to use it on automatically detected targets, and if they are not detected again in more than “maxshadowtrackingtime” frames, it will automatically untarget them

So i’m wondering if it’s possible to completely get rid of the object detector and replace it with the logic i explained at the beginning of the post, as well as set the “max shadow tracking time” to infinity so it won’t need the user to click the object more than once

I am developing the app for Jetson AGX Xavier running Deepstream 5.0 and jetpack 4.4.1

i’ll be glad to get hep


I think this is possible. But you may have alot of accuracy issues. Given below is just my assumption and I have not tested this to work. (My example below is in Python. There should be same functions available for C++)

Say you have a pipeline where the components are like this

(source elemenrs) -> nvstreammux -> nvtracker -> nvstreamdemux -> (sink slements)

Then at the sinkpad of nvtracker, you can retieve the frame meta and allocate a new object using
obj_meta = pyds.nvds_acquire_obj_meta_from_pool(batch)

Then you can assign all your bounding box properties to it and save it back to the frame using

This should be enough for your tracker to process that object.
Next you can attach a probe at the srcpad of the nvtracker and retrieve the updated coordinates of the tracker. Store that in some buffer and add that object back in the next frame at the sinkpad of the tracker.

Is this something you’re look to do?

so far most trackers work in the way of tracking by detector, if no targets detected, no tracking occurs. what you want looks like a business problem.

yes, that’s what im looking for. trick the tracker to belive a detector is present

The idea is just to do the detection manually, replacing the complex machine learning algorithm with a simple mouse click

Yeah, I think then it is possible based on the logic I mentioned in my post above.

DeepStream can’t support manually select object for tracking. nvtracker will track all object detected by PGIE. But you can filter the nvtracker output for your special object.

Thanks, but how do I decide the “special object” and change it?(by “closest to mouse click”)

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

Maybe you can get the object meta data in the application and check “closest to mouse click” in your application.

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