Hello, I am working with DeepStream 6.0.1 on a Tesla T4 using the Python bindings.
I am trying to retrieve analytics information about line crossing, direction, and roi.
I am using the following code:
# Extract object level meta data from NvDsAnalyticsObjInfo
l_user_meta = obj_meta.obj_user_meta_list
while l_user_meta:
try:
user_meta = pyds.NvDsUserMeta.cast(l_user_meta.data)
if user_meta.base_meta.meta_type == pyds.nvds_get_user_meta_type("NVIDIA.DSANALYTICSOBJ.USER_META"):
user_meta_data = pyds.NvDsAnalyticsObjInfo.cast(user_meta.user_meta_data)
if user_meta_data.dirStatus:
print(
"Object {0} moving in direction: {1}".format(obj_meta.object_id, user_meta_data.dirStatus)
)
if user_meta_data.lcStatus:
print(
"Object {0} line crossing status: {1}".format(obj_meta.object_id, user_meta_data.lcStatus)
)
if user_meta_data.roiStatus:
print("Object {0} roi status: {1}".format(obj_meta.object_id, user_meta_data.roiStatus))
except StopIteration:
break
Here’s an example of the output:
Object 10 roi status: ['roi_person on the sidewalk_0']
Object 10 moving in direction: direction_rule with the same name as another_1_0
Object 23 line crossing status: ['line_crossing_cross vertical line in the middle of the_0']
As you can see from the output, while user_meta_data.lcStatus
and user_meta_data.roiStatus
are list of strings, user_meta_data.dirStatus
is not a list of string but a string. However, according to the doc, user_meta_data.dirStatus
should be a list of string as well.
Is this expected?