Acquire NvDsInferLayerInfo output

• Hardware Platform GPU
• DeepStream Version 5
• TensorRT Version 7.0
• NVIDIA GPU Driver Version 460
• Issue Type question

There are three questions
1.How to get the data in NvDsInferLayerInfo.buffer and output it through pyds?
2.How to output the dimension of NvDsInferLayerInfo through pyds?
3.What does ‘pyds.get_detections’ mean in ‘deepstream-ssd-parser’?

After trying to output, an error is reported as follows:

  1. I think you have got the interface of “pyds.get_nvds_LayerInfo” for get NvDsInferLayerInfo with pyds.
  2. pyds is the python bindings of deepstream c/c++ interfaces. Please refer to the /opt/nvidia/deepstream/deepstream-5.0/sources/includes/nvdsinfer.h for the definition of NvDsInferLayerInfo and NvDsInferDims. There is no ‘c’ in dims. You can print dims.numDims, dims.numElements, dims.d[0],… instead.
  3. pyds.get_detections(xxxx.buffer, index) means to read out the buffer as the float group in c, just read the float in the position of index.

In fact, I want to see and parse the data more clearly from the output layer.
In pyds, how can I get the data of output layer through functions and parse it?

I know that in C, the buffer pointer is used to get the data of the specified length, so how to get the data through the buffer in pyds?

deepstream-ssd-parser has shown how to get the model output layers by tensor meta Gst-nvinfer — DeepStream DeepStream Version: 5.0 documentation

With pyds.get_detections(xxxx.buffer, index), you can read the whole layer data one by one with the index from 0 to the number of the data in the layer.

Can I get output dims in pyds from function just like ‘getDimsCHWFromDims’ in C examples?
I didn’t find any reference about pyds.get_detections(xxxx.buffer, index) in nvidia‘s official pyds doc.

There is no binding for ‘getDimsCHWFromDims’