Hey,
I have two nvinfers in the pipelines. The primary one is the detector, for the second infer I am somehow not able to access the layer data using the following code.
l_user = frame_meta.frame_user_meta_list
while l_user is not None:
try:
# Note that l_user.data needs a cast to pyds.NvDsUserMeta
# The casting also keeps ownership of the underlying memory
# in the C code, so the Python garbage collector will leave
# it alone.
user_meta = pyds.NvDsUserMeta.cast(l_user.data)
except StopIteration:
break
if (
user_meta.base_meta.meta_type
!= pyds.NvDsMetaType.NVDSINFER_TENSOR_OUTPUT_META
):
continue
tensor_meta = pyds.NvDsInferTensorMeta.cast(user_meta.user_meta_data)
# if (
# int(tensor_meta.unique_id)
# == SGIE_ID
# ):
print("Unique id: {}".format(tensor_meta.unique_id))
# Boxes in the tensor meta should be in network resolution which is
# found in tensor_meta.network_info. Use this info to scale boxes to
# the input frame resolution.
layers_info = []
for i in range(tensor_meta.num_output_layers):
layer = pyds.get_nvds_LayerInfo(tensor_meta, i)
layers_info.append(layer)
print("layers name: {}".format(layer.layerName))
I have tried adding this to the SGIE probe, but I only get layer-names and id of PGIE and not SGIE.
Is there something I am missing out on?
Thanks