nvidia.dali.fn#

The following table lists all operations available in nvidia.dali.fn module:

Function

Device support

Short description

audio_decoder

CPU

Legacy alias for decoders.audio().

audio_resample

CPU, GPU

Resamples an audio signal.

batch_permutation

CPU

Produces a batch of random integers which can be used as indices for indexing samples in the batch.

bb_flip

CPU, GPU

Flips bounding boxes horizontally or vertically (mirror).

bbox_paste

CPU

Transforms bounding boxes so that the boxes remain in the same place in the image after the image is pasted on a larger canvas.

box_encoder

CPU, GPU

Encodes the input bounding boxes and labels using a set of default boxes (anchors) passed as an argument.

brightness

CPU, GPU

Adjusts the brightness of the images.

brightness_contrast

CPU, GPU

Adjusts the brightness and contrast of the images.

caffe2_reader

CPU

Legacy alias for readers.caffe2().

caffe_reader

CPU

Legacy alias for readers.caffe().

cast

CPU, GPU

Cast a tensor to a different type.

cast_like

CPU, GPU

Cast the first tensor to the type of the second tensor.

cat

CPU, GPU

Joins the input tensors along an existing axis.

coco_reader

CPU

Legacy alias for readers.coco().

coin_flip

CPU, GPU

Generates random boolean values following a bernoulli distribution.

color_space_conversion

CPU, GPU

Converts between various image color models.

color_twist

CPU, GPU

Adjusts hue, saturation, brightness and contrast of the image.

contrast

CPU, GPU

Adjusts the contrast of the images.

coord_flip

CPU, GPU

Transforms vectors or points by flipping (reflecting) their coordinates with respect to a given center.

coord_transform

CPU, GPU

Applies a linear transformation to points or vectors.

copy

CPU, GPU

Creates a copy of the input tensor.

crop

CPU, GPU

Crops the images with the specified window dimensions and window position (upper left corner).

crop_mirror_normalize

CPU, GPU

Performs fused cropping, normalization, format conversion (NHWC to NCHW) if desired, and type casting.

dl_tensor_python_function

CPU, GPU

Executes a Python function that operates on DLPack tensors.

dump_image

CPU, GPU

Save images in batch to disk in PPM format.

element_extract

CPU, GPU

Extracts one or more elements from input sequence.

erase

CPU, GPU

Erases one or more regions from the input tensors.

expand_dims

CPU, GPU

Insert new dimension(s) with extent 1 to the data shape.

external_source

CPU, GPU

Allows externally provided data to be passed as an input to the pipeline.

fast_resize_crop_mirror

CPU, GPU

Legacy alias for ResizedCropMirror, with antialiasing disabled by default.

file_reader

CPU

Legacy alias for readers.file().

flip

CPU, GPU

Flips the images in selected dimensions (horizontal, vertical, and depthwise).

full

CPU

Returns new data of given shape and type, filled with a fill value.

full_like

CPU

Returns new data with the same shape and type as the input data, filled with a fill_value.

gaussian_blur

CPU, GPU

Applies a Gaussian Blur to the input.

get_property

CPU, GPU

Returns a property of the tensor passed as an input.

grid_mask

CPU, GPU

Performs the gridmask augmentation (https://arxiv.org/abs/2001.04086).

hsv

CPU, GPU

Adjusts hue, saturation and value (brightness) of the images.

hue

CPU, GPU

Changes the hue level of the image.

image_decoder

CPU, Mixed

Legacy alias for decoders.image().

image_decoder_crop

CPU, Mixed

Legacy alias for decoders.image_crop().

image_decoder_random_crop

CPU, Mixed

Legacy alias for decoders.image_random_crop().

image_decoder_slice

CPU, Mixed

Legacy alias for decoders.image_slice().

jitter

GPU

Performs a random Jitter augmentation.

jpeg_compression_distortion

CPU, GPU

Introduces JPEG compression artifacts to RGB images.

laplacian

CPU, GPU

Computes the Laplacian of an input.

lookup_table

CPU, GPU

Maps the input to output by using a lookup table that is specified by keys and values, and a default_value for unspecified keys.

mel_filter_bank

CPU, GPU

Converts a spectrogram to a mel spectrogram by applying a bank of triangular filters.

mfcc

CPU, GPU

Computes Mel Frequency Cepstral Coefficients (MFCC) from a mel spectrogram.

multi_paste

CPU, GPU

Performs multiple pastes from image batch to each of the outputs.

mxnet_reader

CPU

Legacy alias for readers.mxnet().

nemo_asr_reader

CPU

Legacy alias for readers.nemo_asr().

nonsilent_region

CPU, GPU

Performs leading and trailing silence detection in an audio buffer.

normal_distribution

CPU, GPU

Generates random numbers following a normal distribution.

normalize

CPU, GPU

Normalizes the input by removing the mean and dividing by the standard deviation.

numba_function

CPU, GPU

Invokes a njit compiled Numba function.

numpy_reader

CPU, GPU

Legacy alias for readers.numpy().

one_hot

CPU, GPU

Produces a one-hot encoding of the input.

ones

CPU

Returns new data of given shape and type, filled with ones.

ones_like

CPU

Returns new data with the same shape and type as the input array, filled with ones.

optical_flow

GPU

Calculates the optical flow between images in the input.

pad

CPU, GPU

Pads all samples with the fill_value in the specified axes to match the biggest extent in the batch for those axes or to match the minimum shape specified.

paste

GPU

Pastes the input images on a larger canvas, where the canvas size is equal to input size * ratio.

peek_image_shape

CPU

Obtains the shape of the encoded image.

per_frame

CPU, GPU

Marks the input tensor as a sequence.

permute_batch

CPU, GPU

Returns a batch of tensors constructed by selecting tensors from the input based on indices given in indices argument.

power_spectrum

CPU

Calculates power spectrum of the signal.

preemphasis_filter

CPU, GPU

Applies preemphasis filter to the input data.

python_function

CPU, GPU

Executes a Python function.

random_bbox_crop

CPU

Applies a prospective random crop to an image coordinate space while keeping the bounding boxes, and optionally labels, consistent.

random_crop_generator

CPU

Produces a cropping window with a randomly selected area and aspect ratio.

random_resized_crop

CPU, GPU

Performs a crop with a randomly selected area and aspect ratio and resizes it to the specified size.

reinterpret

CPU, GPU

Treats content of the input as if it had a different type, shape, and/or layout.

reshape

CPU, GPU

Treats content of the input as if it had a different shape and/or layout.

resize

CPU, GPU

Resize images.

resize_crop_mirror

CPU, GPU

Performs a fused resize, crop, mirror operation.

roi_random_crop

CPU

Produces a fixed shape cropping window, randomly placed so that as much of the provided region of interest (ROI) is contained in it.

rotate

CPU, GPU

Rotates the images by the specified angle.

saturation

CPU, GPU

Changes the saturation level of the image.

sequence_reader

CPU

Legacy alias for readers.sequence().

sequence_rearrange

CPU, GPU

Rearranges frames in a sequence.

shapes

CPU, GPU

Returns the shapes of inputs.

slice

CPU, GPU

Extracts a subtensor, or slice.

spectrogram

CPU, GPU

Produces a spectrogram from a 1D signal (for example, audio).

sphere

CPU, GPU

Performs a sphere augmentation.

squeeze

CPU, GPU

Removes the dimensions given as axes or axis_names.

ssd_random_crop

CPU

Performs a random crop with bounding boxes where Intersection Over Union (IoU) meets a randomly selected threshold between 0-1.

stack

CPU, GPU

Joins the input tensors along a new axis.

tfrecord_reader

CPU

Legacy alias for readers.tfrecord().

to_decibels

CPU, GPU

Converts a magnitude (real, positive) to the decibel scale.

torch_python_function

CPU, GPU

Executes a function that is operating on Torch tensors.

transpose

CPU, GPU

Transposes the tensors by reordering the dimensions based on the perm parameter.

uniform

CPU, GPU

Generates random numbers following a uniform distribution.

video_reader

GPU

Legacy alias for readers.video().

video_reader_resize

GPU

Legacy alias for readers.video_resize().

warp_affine

CPU, GPU

Applies an affine transformation to the images.

water

CPU, GPU

Performs a water augmentation, which makes the image appear to be underwater.

zeros

CPU

Returns new data of given shape and type, filled with zeros.

zeros_like

CPU

Returns new data with the same shape and type as the input array, filled with zeros.