How to get list of predictions when using classifier in Deepstream?

• Hardware Platform (Jetson / GPU) : GPU
• DeepStream Version : 5.1
• TensorRT Version : 7.2.1-1+cuda11.1
• NVIDIA GPU Driver Version (valid for GPU only) : 455.23.05
• Issue Type(questions, new requirements, bugs) : Question


We are using a classifier model trained with TLT in Deepstream and we can access Deepstream metadata (NvDsLabelInfo) to get which is the best result/prediction in each frame (and its probability).
However, we would like to know if there is a way to obtain all the predictions for a frame, not only the best result. Is there any C structure where that information is stored?

Thanks in advance.

yeah, you can check nvdsinfer_context_impl_output_parsing.cpp → ClassifyPostprocessor::fillClassificationOutput

Sorry for my late response.
We checked that function:

But the variable called “attributes” has got 1 as size value, so the loop is executed one time each frame. The structure seems to contain only the best prediction, and we need to get all predictions for a frame, not only the best one.

Printing out the value of “attributes.size()” we get “1” in each frame as you can see below:

Console output (last frames):