[PythonAPI] Multi-outputs for TensorRT

Description

Hi, I’m referring TensorRT/quickstart/SemanticSegmentation
/tutorial-runtime.ipynb
to run TensorRT inference with python. However, when I use a TensorRT model (yolov5s) with 3 outputs, the code only returns 1 output instead of 3. How should I modify it so that I can get 3 outputs?

Environment

GPU Type: 2070
Nvidia Driver Version: 525
Baremetal or Container (if container which image + tag): nvcr.io/nvidia/deepstream:6.1-devel

Hi,

Following may help you.

Thank you.

Hi @spolisetty, the link you sent seems to work for C++. However, I’m trying to use TensorRT python API, what should I do?

Hi,

Please refer to the Python API document below.
https://docs.nvidia.com/deeplearning/tensorrt/api/python_api/infer/Graph/Network.html#tensorrt.INetworkDefinition.mark_output

Thank you.