I am doing something similar as deepstream-infer-tensor-meta-test. I am logging all the objects to a local file.
However, sometimes in the same frame (NvDsMetaList * l_frame = batch_meta->frame_meta_list), there are two different objects with different bbox (although they are very close), which shared the same obj_meta->object_id. Shouldn’t the object_id be the unique id that only appear once each frame? How can I avoid this situation because I notice the final video doesn’t have two bbox with the same id (I print all the id to its label) on that frame.
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing) • Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
How should I dump the frame?
Also I kind of figured out it might be the tracker’s problem. The same unique ID only happens on sgie_pad_buffer_probe. But on osd_sink_pad_buffer_probe there is only one ID.
So this is the code I use in sgie_pad_buffer_probe
for (NvDsMetaList * l_frame = batch_meta->frame_meta_list; l_frame != NULL;
l_frame = l_frame->next) {
NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) l_frame->data;
/* Iterate object metadata in frame */
for (NvDsMetaList * l_obj = frame_meta->obj_meta_list; l_obj != NULL;
l_obj = l_obj->next) {
NvDsObjectMeta *obj_meta = (NvDsObjectMeta *) l_obj->data;
int object_id = obj_meta->object_id;
int class_id = obj_meta->class_id;
unsigned int left = obj_meta->rect_params.left;
unsigned int top = obj_meta->rect_params.top;
unsigned int width = obj_meta->rect_params.width;
unsigned int height = obj_meta->rect_params.height;
I have a log of all these data each frame. It doesn’t happen always, but sometimes it has two same object_id for the same class_id. I think it shouldn’t happen.