How to get result of secondary-gie?

• Hardware Platform (Jetson / GPU) Jetson
• DeepStream Version Deepstream 5.0

I am using deepstream-app to run a pipeline with a primary-gie and secondary-gie. Both are classifiers.

I am able to access the results in NvDsLabelInfo for the first classifer.

How can I access the results from the secondary classifier?

Here is my ds_config file:



From README of deepstream-test2:

Each of the nvinfer elements attach some MetaData to the buffer. By attaching
the probe function at the end of the pipeline, one can extract meaningful
information from these inferences. 

My question is: how to identify and access the metadata structures that were attached by the secondary nvinfer elements? The source code of osd_sink_pad_buffer_probe is not clear on how to use the secondary metadata structures.

Does anyone have any information on this?

There is a unique id(gie-unique-id) for every nvinfer element

@bcao Thank you for your response.

I should be more specific. When reading the metadata, e.g. NvDsObjectMeta or NvDsClassificationMeta how can I differentiate between the data added by pgie and that added by sgie?

@bcao Can you point me to some documentation on how to use the SGIE element?

The nvinfer documentation does not address how to access metadata attached by SGIE element.

I have read through the source code for both deepstream-test2 and back-to-back-detector sample code. The source code does not address how to access metadata structs added by the SGIE elements.

Any documentation or other references would be greatly appreciated.

Good question, There is a unique_component_id inside NvDsObjectMeta, please check the nvdsmeta.h for more details.

/** Holds a unique component ID that identifies the metadata in this structure. */ 
gint unique_component_id

Thank you @bcao. If I understand correctly, the SGIE adds an element to NvDsObjectMetaList, and the unique_component_id is the same as the gie-unique-id as specified in the inference_config.txt file? Is this correct?