isaac_ros_tensor_proc

Source code on GitHub.

API

Overview

The isaac_ros_tensor_proc package offers functionality for processing tensors, such as normalizing tensors, converting images to tensors, reshaping tensors and more. The main use case of this package is for preprocessing or postprocessing tensors following DNN model inference. One major use case of this package can be found in Isaac ROS DNN Image Encoder. The operations performed aim to be analogous to operations available in the PyTorch library.

Available Components

Component

Topics Subscribed

Topics Published

Parameters

ImageTensorNormalizeNode

tensor The input tensor. This should originate from an image

normalized_tensor The tensor that has been normalized

mean: The mean of the images per channel that will be used for normalization
stddev: The standard deviation of the images per channel that will be used for normalization
input_tensor_name: The name of the input tensor to extract
output_tensor_name: The name of the output tensor to publish

ImageToTensorNode

image The input image.

tensor The resultant tensor, created using the input image

scale: Whether to scale the image by 255 or not
tensor_name: The name of the output tensor to publish

InterleavedToPlanarNode

interleaved_tensor A tensor that’s in interleaved (e.g. HWC) format

planar_tensor A tensor that’s in planar (e.g. CHW) format

input_tensor_shape: The shape of the interleaved_tensor
num_blocks: The number of blocks to preallocate
output_tensor_name: The name of the output tensor to publish

NormalizeNode

image The input image.

normalized_tensor The tensor that has been created using the input image and then normalized.

image_mean: The mean of the images per channel that will be used for normalization
image_stddev: The standard deviation of the images per channel that will be used for normalization
input_image_width: The input image width
input_image_height: The input image height
num_blocks: The number of blocks to preallocate
output_tensor_name: The name of the output tensor to publish

ReshapeNode

tensor The tensor whose dimensions will be reshaped

reshaped_tensor The reshaped tensor

output_tensor_name: The name of the output tensor to publish
input_tensor_shape: The shape of the input tensor, tensor
output_tensor_shape: The desired shape of the output tensor, reshaped_tensor
num_blocks: The number of blocks to preallocate