Issues of data loss with `outputReidTensor: 1` flag in the tracker config

• Hardware Platform (GPU)
• DeepStream Version 7.0
• TensorRT Version 8.6.1
• NVIDIA GPU Driver Version (535)

I was trying to use the outputReidTensor: 1 in the tracker config to get the features out and that seems to work fine. The issue is whenever I set this flag outputReidTensor: 1 the NvDsAnalyticsObjInfo start to miss out on some data. For example, if the outputReidTensor flag is set to true, then even when the line crossing happen, I don’t see any output log from this piece of code.

if user_meta_data.lcStatus: print("Object {0} line crossing status: {1}".format(obj_meta.object_id, user_meta_data.lcStatus))

It seems to work fine when I set outputReidTensor: 0.
And the data miss with outputReidTensor: 1 is very random. For some line crossing I see the logs, for some I don’t. Whereas when the outputReidTensor: 0 is set then I see all the logs perfectly fine.

Thanks for the sharing! I will check.

@nihit6129 1. I can’t reproduce this issue after doing two tests. one is using “outputReidTensor: 0” and the other one is using “outputReidTensor: 1”. here are details.
command: python3 deepstream_nvdsanalytics.py file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.mp4
two almost the same logs.1.zip (41.5 KB)
2. which sample are you testing or referring to? could you provide a simplified code to reproduce this issue? Thanks!

You can refer to this codebase. This contains the necessary model artifacts and the scripts that I’m referring to
problem_sample.zip (30.0 MB)

If you check the logs when running this script in two different conditions, with outputReidTensor: 0 and 1
You’ll notice the difference in the logs where the NvdsAnalyticsFrameMeta changes, but there is no NvdsAnalyticsObjMeta for it.

Testing the code problem_sample.zip, the all detected people did not cross the line. there is no any analytics result. please refer the screenshot and log. 2024-06-26 143316.zip (1.9 MB)log.txt (3.6 KB)
did you provide the correct code project? Thanks!

Thanks for the sharing! Here are the reason and workaround.
python issue

pyds.nvds_get_user_meta_type("NVIDIA.DSANALYTICSOBJ.USER_META")
or 
global s
s= "NVIDIA.DSANALYTICSOBJ.USER_META"
pyds.nvds_get_user_meta_type(s)

both these two methods will return a varying value, you can call “print(“py DSANALYTICSOBJ”, int(pyds.nvds_get_user_meta_type(s)))” specially in deeptream-test1 to test. but In C code, “nvds_get_user_meta_type((gchar*)“NVIDIA.DSANALYTICSOBJ.USER_META”)” will return a const value.

workaround
call the get_user_meta_type in advance in C code. here is the detail.
add the following code in function gst_nvdsanalytics_init of /opt/nvidia/deepstream/deepstream/sources/gst-plugins/gst-nvdsanalytics/gstnvdsanalytics.cpp, then make and make install according to the readme.

  NvDsMetaType user_meta_type = NVDS_USER_OBJ_META_NVDSANALYTICS;
  printf("f c NVDS_USER_OBJ_META_NVDSANALYTICS user_meta_type:%d\n", user_meta_type);

why is “outputReidTensor: 0” fine?
when outputReidTensor is 0, python calling get_user_meta_type is after C getting value.

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