Preparing Deep Learning Models for Isaac ROS
Obtaining a Pre-trained Model from NGC
The NVIDIA GPU Cloud hosts a catalog of Deep Learning pre-trained models that are available for your development.
Use the Search Bar to find a pre-trained model that you are interested in working with.
Click on the model’s card to view an expanded description, and then click on the File Browser tab along the navigation bar.
Using the File Browser, find a deployable
.etltfile for the model you are interested in.
.etltfile extension indicates that this model has pre-trained but encrypted weights, which means one needs to use the
tao-converterutility to decrypt the model, as described below.
Under the Actions heading, click on the … icon for the file you selected in the previous step, and then click Copy
Paste the copied command into a terminal to download the model in the current working directory.
tao-converter to decrypt the Encrypted TLT Model (
As discussed above, models distributed with the
.etlt file extension
are encrypted and must be decrypted before use via NVIDIA’s
tao-converter is already included in the Docker images available as
part of the standard Isaac ROS Development Environment.
The per-platform installation paths are described below:
.etlt to a TensorRT Engine Plan
Here are some examples for generating the TensorRT engine file using
tao-converter. In this example, we will use the
PeopleSemSegnet Shuffleseg model:
Generate an engine file for the
fp16 data type
mkdir -p /workspaces/isaac_ros-dev/models && \
/opt/nvidia/tao/tao-converter -k tlt_encode -d 3,544,960 -p input_2:0,1x3x544x960,1x3x544x960,1x3x544x960 -t fp16 -e /workspaces/isaac_ros-dev/models/peoplesemsegnet_shuffleseg.engine -o argmax_1 peoplesemsegnet_shuffleseg_etlt.etlt
The specific values used in the command above are retrieved from the PeopleSemSegnet
page under the Overview tab.The
model input node name and output node name can be found in
File Browser. The
output file is specified using the
-e option. The tool needs
write permission to the output directory.
A detailed explanation of the input parameters is available here.
Generate an engine file for the data type
Create the models directory:
mkdir -p /workspaces/isaac_ros-dev/models
Check the model’s page on NGC for the latest
/opt/nvidia/tao/tao-converter -k tlt_encode -d 3,544,960 -p input_2:0,1x3x544x960,1x3x544x960,1x3x544x960 -t int8 -c peoplesemsegnet_shuffleseg_cache.txt -e /workspaces/isaac_ros-dev/models/peoplesemsegnet_shuffleseg.engine -o argmax_1 peoplesemsegnet_shuffleseg_etlt.etlt
The calibration cache file (specified using the
option) is required to generate the
int8 engine file. This file
is provided in the File Browser tab of the model’s page on NGC.