Use detectnet to track two objects with same ClassID

Hi,

I can use detectnet to get the ClassID, x/y coordinate… However, if there are two objects with same ClassID, can I distinguish the two objects? I need to track the object using the x,y coordinate. Then, use the coordinates and fps to estimate the speed. (assume in horizontal direction)

Thanks,

Hi,

You will need a tracking algorithm for bounding boxes from the adjacency frames.
There are several frameworks can do this.

For example, you can apply the tracker algorithm from VPI or OpenCV.
https://docs.nvidia.com/vpi/algo_klt_tracker.html

Or you can use Deepstream SDK which can support inference + tracking directly.

Thanks.

Mmm… thx. It is getting complicated… I was hoping if detectNet has ItemID for each item…
I may make a range of previous xy coordinates, if the new xy coordinates are within the range, I assume it is the same object then.

Thanks,

Hi,

For simplicity, you can do it by checking the bbox location directly.
But please noted that you may still need a tracker if the bbox occlusion is possible.

Thanks.