According to documentation _NvDsObjectMeta::object_id provides Unique ID for tracking the object, but there is no reference of how to obtain the state (eg. ntp_timestamp, NvOSD_RectParams(rect_params), age) of tracked object in the previous frames. Plz share the guidelines to achieve these previous states.
Please refer to deepstream_app.c:: tracking_done_buf_prob() to record each frame/objects’s states you want. When new frame coming, check the object_id and search all relative previous states.
Hi kayccc, Thanks for your suggestion, but for my usecase searching all the relative previous states is not usable as it’ll be time consuming. I need to store data only for tracking id’s that are active ( means for objects which are not gone out of the frame/ technically objects for which shadowTrackingAge increase more than maxShadowTrackingAge).
The application i am building requires the speed of bounding boxes and also save some data for each tracked object that persists for future frames. Speed calculation also require bounding box position and timestamp in previous frames. Getting only object-id is not sufficient in this case, also the data in obj_user_meta_list for each object doesn’t persists for future frames.
Is there some way i can save the data for each tracked object that persists for future frames? i know there is pPreserveData field for _NvMOTObjToTrack but don’t know how to fetch that
_NvMOTObjToTrack :: *pPreservedData; /**< Used for the client to keep track of any data associated with the object. */
If i try to save data for each tracked object, then i will need the object-id that tracker has deleted after they go out of frame(means their shadowTrackingAge increase more than maxShadowTrackingAge ) to delete the data corresponding to those object-id.
How can i get the object-id that are deleted (goes out of the frame).
This is a must requirement to get the speed and some obj_user_meta_list field for each tracked-id (unique object-id) that persists for future frames for many applications. Without these features Deepstream will be only useful for static applications. Deepstream must have these features.
Are you using nvtraker plugin or just refer the low level tracker lib?
currently the feature is not supported. You need one of the following:
A) For the tracker output to include each object’s bboxes in previous frames; or
B) IDs of objects that get dropped by the tracker because they are no longer in the scene.
Cache bbox history for all the objects because it’s very inefficient. For now we can suggest an optimization for that method:
- Cache bbox history for each object in deepstream_app::tracking_done_buf_prob() . For each object, store the latest frame number seen.
- Periodically (or on each frame), remove objects whose last seen frame number is older than some threshold, e.g. current_frame - last_seen_frame > maxShadowTrackingAge
As for pPreservedData, it wouldn’t help in this case because that is set in input to the tracker. The input consists of detector bboxes and the IDs for them are not known at that point.