TRTEXEC with ActionRecognitionNet#
The trtexec tool is a command-line wrapper included as part of the TensorRT samples.
Refer to the official TensorRT documentation for instructions on installing or building
trtexec on your target platform (including x86 with discrete GPU and Jetson devices).
This section describes how to generate a TensorRT engine using trtexec, which allows you to deploy TAO-trained
models on TensorRT, Triton, and Deepstream.
Sample Command for a ActionRecognitionNet Model#
To generate an .onnx file for ActionRecognitionNet, refer to the ActionRecognitionNet documentation.
ActionRecognitionNet currently does not support INT8 calibration.
# convert 2D RGB model with input sequence length is 32 and input size is 224x224
trtexec --onnx=/path/to/model.onnx \
--maxShapes=input_rgb:16x3x96x224x224 \
--minShapes=input_rgb:1x3x96x224x224 \
--optShapes=input_rgb:4x3x96x224x224 \
--fp16 \
--saveEngine=/path/to/save/trt/model.engine
# convert 3D RGB model with input sequence length is 32 and input size is 224x224:
trtexec --onnx=/path/to/model.onnx \
--maxShapes=input_rgb:16x3x32x224x224 \
--minShapes=input_rgb:1x3x32x224x224 \
--optShapes=input_rgb:4x3x32x224x224 \
--fp16 \
--saveEngine=/path/to/save/trt/model.engine
# convert 2D optical-flow model with input sequence length is 32 and input size is 224x224
trtexec --onnx=/path/to/model.onnx \
--maxShapes=input_of:16x3x64x224x224 \
--minShapes=input_of:1x3x64x224x224 \
--optShapes=input_of:4x3x64x224x224 \
--fp16 \
--saveEngine=/path/to/save/trt/model.engine
# convert 3D optical-flow model with input sequence length is 32 and input size is 224x224:
trtexec --onnx=/path/to/model.onnx \
--maxShapes=input_of:16x2x32x224x224 \
--minShapes=input_of:1x2x32x224x224 \
--optShapes=input_of:4x2x32x224x224 \
--fp16 \
--saveEngine=/path/to/save/trt/model.engine