[VisionWorks-Tracking] Proper framework usage

Dear all,

I am developing a surveillance application based on the Jetson TX2 board.
This software has to process frames from an IP camera, detect people in frames and track their movements.
I implemented a deep neural network based algorithm to detect people in frames giving very good mAP running at 3FPS.
I was looking for an object tracker to track detected bounding boxes in images. I came across the nvidia VisionWorks tracker to track rigid objects for short time intervals.

As far as I understood, main ObjectTracker methods are:

  • addObject (adding a bounding box to be tracked while returning a pointer to tracked object)
  • process (using a grayscale image to update tracked objects status and location)

In my SW, I would like to perform the following steps :

1- Detection.
2- Use found bounding boxes in the object tracking.
Iterate:
3- Perform a new detection.
4- Solve the data association problem.
5- Perform object tracking.

After step 2, the objects have an associated ID, a location and a status. I can access them with TrackedObject getId, getLocation and getStatus. However, after data association (step 4), I cannot set neither the location nor the status to a new value (the one computed by the detector).

I thought I could remove the old object and add a new one using the ObjectTracker removeObject and addObject but this action does not preserve the ID.

Do you have any suggestion? Have I misunderstood something?

Thank you.

Attilio

Hi,

Please check here for object tracker document:
VisionWorks API > Samples and Demos > Demo Applications > CUDA Layer Object Tracker Sample App

Tracking is applied by tracker->process().
You can add a new object via addObject(), remove a object via removeObject().

For example, if your flow is detect, track, track, detect, track, track, detect, …
t0: Add obj1
t1: track for obj1 -> track1
t2: track for track2 -> track2
t3: Add obj2, remove track2

Thanks.

@AastaLLL Thank you for your reply.

I read the suggested example and it is very interesting. However, in t3 I would like to preserve the track identification number, i.e., if a detection is marked as ID 1 in t1, I would like the same detection to be ID 1 after t3. I didn’t understand if the approach you suggested would guarantee this requirement.

Thanks.

Hi,

Do you want a multi-object tracking algorithm or a refreshable tracking algorithm?
VisionWorks can support multiple object tracking but can’t manually refresh object location on the fly.

If you want to create a new object, just use addObject to add it.
If you want to refresh the location of a tracked object, it’s recommended to remove the tracked object first and add the object back with the desired position.

Thanks.

Hello,

I want to understand and try to use it too. But on my device, I don’t see the ‘/usr/share/visionworks/sources’ folder.

There are only two folders, namely, cmake and docs. Is it available elsewhere?

Hi,

This sample is contained in VisionWorks package.
Please remember to install VisionWorks package first.

Thanks.

Hi, Thanks for your answer. I figured it out. However, is there any workaround for not installing OpenCV4Tegra? Currently, the VisionWorks API is dependent on it but I already use OpenCV 3.3 and I understand that it is difficult to have two different versions on the board.

Thanks,
Bhargav

Hi,

You can purge the OpenCV4Tegra directly.
Most of the VisionWorks API is independent of OpenCV library except some sample to demonstrate the interoperability between VisionWorks and OpenCV.

Thanks.