NVIDIA DALI
1.6.0 -54034c4
Version select:
Current release
main (unstable)
Older releases
Home
Getting Started
Installation
Prerequisites
DALI in NGC Containers
pip - Official Releases
nvidia-dali
nvidia-dali-tf-plugin
pip - Nightly and Weekly Releases
Nightly Builds
Weekly Builds
pip - Legacy Releases
Open Cognitive Environment (Open-CE)
Platform Support
Getting Started Tutorial
Overview
Pipeline
Defining the Pipeline
Building the Pipeline
Running the Pipeline
Adding Augmentations
Random Shuffle
Augmentations
Tensors as Arguments and Random Number Generation
Placement of argument inputs
Adding GPU Acceleration
Copying Tensors to GPU
Important Notice
Hybrid Decoding
Python API Documentation
Pipeline
Data Processing Graphs
Processing Graph Structure
Current Pipeline
Pipeline Decorator
DataNode
Types
TensorList
TensorListCPU
TensorListGPU
Tensor
TensorCPU
TensorGPU
Data Layouts
Tensor Layout String format
Interpreting Tensor Layout Strings
Constant wrapper
Constant
Enums
DALIDataType
DALIIterpType
DALIImageType
SampleInfo
TensorLayout
PipelineAPIType
Mathematical Expressions
Type Promotion Rules
Supported Arithmetic Operations
Mathematical Functions
Exponents and logarithms
Trigonometric Functions
Hyperbolic Functions
Indexing and Slicing
Indexing
Indexing from the end
Indexing with run-time values
Slicing
Multidimensional selection
Strided slices
Adding dimensions
Layout specifiers
Operation Reference
nvidia.dali.fn
nvidia.dali.fn.decoders
nvidia.dali.fn.noise
nvidia.dali.fn.random
nvidia.dali.fn.readers
nvidia.dali.fn.reductions
nvidia.dali.fn.segmentation
nvidia.dali.fn.transforms
nvidia.dali.plugin.numba.fn.experimental
nvidia.dali.plugin.pytorch.fn
Operator Objects (Legacy)
Mapping to Functional API
Modules
nvidia.dali.ops
nvidia.dali.ops.decoders
nvidia.dali.ops.noise
nvidia.dali.ops.random
nvidia.dali.ops.readers
nvidia.dali.ops.reductions
nvidia.dali.ops.segmentation
nvidia.dali.ops.transforms
nvidia.dali.plugin.numba.experimental
nvidia.dali.plugin.pytorch
DL Framework Plugins
MXNet
MXNet Plugin API reference
MXNet Framework
Gluon example with DALI
ExternalSource operator
Using MXNet DALI plugin: using various readers
PyTorch
PyTorch Plugin API reference
Pytorch Framework
Using DALI in PyTorch
ExternalSource operator
Using PyTorch DALI plugin: using various readers
Using DALI in PyTorch Lightning
TensorFlow
TensorFlow Plugin API reference
Experimental
Tensorflow Framework
Using Tensorflow DALI plugin: DALI and tf.data
Using Tensorflow DALI plugin: DALI tf.data.Dataset with multiple GPUs
Inputs to DALI Dataset with External Source
Using Tensorflow DALI plugin with sparse tensors
Using Tensorflow DALI plugin: simple example
Using Tensorflow DALI plugin: using various readers
PaddlePaddle
PaddlePaddle Plugin API reference
PaddlePaddle Framework
Using DALI in PaddlePaddle
ExternalSource operator
Using Paddle DALI plugin: using various readers
Examples and Tutorials
Data Loading
External Source Operator - basic usage
Define the Data Source
Defining the Pipeline
Using the Pipeline
Interacting with the GPU Input
Parallel External Source
Accepted
source
Principle of Operation
Example Pipeline and
source
Adjusting to Callable Object
Pipeline Definition
Testing the Pipelines
Going Parallel
Starting Python Workers
Running the Pipeline with Python Workers
Spawn and Serialization of Functions
Customizing Serialization
Parallel External Source - Fork
Steps to Start with Fork
Example Pipeline and
source
Callable Object
Pipeline Definition
Displaying the Results
Starting Python Workers
Running the Pipelines
Data Loading: LMDB Database
Overview
Caffe LMDB Format
Caffe 2 LMDB Format
Data loading: MXNet recordIO
Overview
Creating an Index
Defining and Running the Pipeline
Data Loading: TensorFlow TFRecord
Overview
Creating index
Defining and Running the Pipeline
COCO Reader
Numpy Reader
Overview
Test data
Usage
Glob filter
Text file with a list of file paths
List of file paths
Higher dimensionality
Region-of-interest (ROI) API
ROI start and end, in absolute coordinates
ROI start and end, in relative coordinates
Specifying a subset of the array’s axes
Out of bounds access
GPUDirect Storage Support
Operations
General Purpose
DALI Expressions and Arithmetic Operations
DALI Expressions and Arithmetic Operators
DALI Binary Arithmetic Operators - Type Promotions
Custom Augmentations with Arithmetic Operations
Conditional-Like Execution and Masking
Reduction Operators
Tensor Joining
Concatenation
Stacking
Reinterpreting Tensors
Fixed Output Shape
Reshape with Wildcards
Removing and Adding Unit Dimensions
Rearranging Dimensions
Adding and Removing Dimensions
Relative Shape
Reinterpreting Data Type
Normalize Operator
Introduction
Using the
Normalize
Operator
Adjusting Output Dynamic Range
Externally Provided Parameters
Batch Normalization
Geometric Transforms
Affine Transform
Transform Catalogue
Case Study: Transforming Keypoints
Adding Transforms to the Pipeline
Combining Transforms
Keypoint Cropping
Transform Gallery
Erase Operator
Image Processing
Augmentation Gallery
BrightnessContrast Example
Brighness and Contrast Adjustment
Step-by-Step Guide
Color Space Conversion
Defining the Pipeline
Building and Running the Pipeline
Visualizing the Results
Image Decoder examples (CPU)
Common code
Image Decoder (CPU)
Image Decoder (CPU) with Random Cropping Window Size and Anchor
Image Decoder with Fixed Cropping Window Size and External Anchor
Image Decoder (CPU) with External Window Size and Anchor
Image Decoder (Hybrid)
Image Decoder (Hybrid) with Random Cropping Window Size and Anchor
Image Decoder (Hybrid) with Fixed Cropping Window Size and External Anchor
Image Decoder (Hybrid) with External Window Size and Anchor
HSV Example
Introduction
Step-by-Step Guide
Using HSV to implement RandomGrayscale operation
Interpolation methods
Downscaling
Upscaling
Resize operator
Output Size Parameters
Scaling Modes
Region of Interest (RoI) Processing
Fused Flip
Input and Output Types
Subpixel Scale
WarpAffine
Introduction
Usage Example
Example Output
3D Transforms
Warp Operators
Usage Example
Example Output
Audio Processing
Audio Decoder in DALI
Step-by-Step Guide
Verification
Audio spectrogram
Background
Reference implementation
Calculating the Spectrogram using DALI
Mel Spectrogram
Mel-Frequency Cepstral Coefficients (MFCCs)
Video Processing
Simple Video Pipeline Reading From Multiple Files
Goal
Visualizing the Results
Video Pipeline Reading Labelled Videos from a Directory
Setting Up
Running the Pipeline
Visualizing the Results
Video Pipeline Demonstrating Applying Labels Based on Timestamps or Frame Numbers
Defining the Pipeline
Visualizing the Results
Reading Video Frames Stored as Images
Preparing the Data
Frame Sequence Reader
Optical Flow
Using Dali
Use Cases
Video Super-Resolution
Dataloaders
Data Loader Performance
Requirements
FlowNet2-SD Implementation and Pre-trained Model
Data
Training
Results on Myanmar Validation Set
Reference
ImageNet Training in PyTorch
Requirements
Training
Usage
Single Shot MultiBox Detector Training in PyTorch
Requirements
Usage
ResNet-N with TensorFlow and DALI
Training in Keras Fit/Compile mode
Predicting in Keras Fit/Compile mode
Training in CTL (Custom Training Loop) mode
Predicting in CTL (Custom Training Loop) mode
Other useful options
Requirements
You Only Look Once v4 with TensorFlow and DALI
Requirements
Usage
Training
Inference
Evaluation
PaddlePaddle Use-Cases
ResNet Training in PaddlePaddle
Training
Usage
Single Shot MultiBox Detector Training in PaddlePaddle
Requirements
Usage
Temporal Shift Module Inference in PaddlePaddle
Requirements
Usage
MXNet with DALI - ResNet 50 example
Overview
ResNet 50 Pipeline
The Training Pipeline
Using the MXNet Plugin
Training with MXNet
COCO Reader with Augmentations
WebDataset integration using External Source
Introduction
Data Representation
Sharding
Sample Implementation
Keyword Arguments:
Usage presentation
Checking consistency
Other
Multiple GPU Support
Overview
Run Pipeline on Selected GPU
Sharding
Custom Operations
Create a Custom Operator in C++
Prerequisites
Operator Definition
CPU Operator Implementation
GPU operator implementation
Building the Plugin
Importing the Plugin
Python Operators
Defining an Operation
Defining a Pipeline
Running the Pipeline and Visualizing the Results
Variety of Python Operators
Limitations of Python Operators
Processing GPU Data with Python Operators
CuPy Operations
Defining a Pipeline
Running the Pipeline and Visualizing the Results
Advanced: Device Synchronization in the DLTensorPythonFunction
Numba Function - Running a Compiled C Callback Function
Define the shape function swapping the width and height
Define the processing function that fills the output sample based on the input sample
Define the Pipeline
Serialization
Overview
Serialization
Operator Objects (Legacy)
Overview
Defining the Pipeline
Building the Pipeline
Running the Pipeline
Adding Augmentations
Random Shuffle
Augmentations
Tensors as Arguments and Random Number Generation
Adding GPU Acceleration
Copying Tensors to GPU
Hybrid Decoding
Advanced
Performance Tuning
Thread Affinity
Memory Consumption
Operator Buffer Presizing
Prefetching Queue Depth
Sharding
Framework iterator configuration
Enums
Shard calculation
Pipeline Run Methods
Experimental
C++ API
Compiling DALI from Source
Using Docker builder - recommended
Prerequisites
Building Python Wheel
Bare Metal build
Prerequisites
Build DALI
Install Python Bindings
Verify the Build (Optional)
Obtain Test Data
Set Test Data Path
Run Tests
Building DALI with Clang (Experimental)
Optional CMake Build Parameters
Cross-compiling for aarch64 Jetson Linux (Docker)
Setup
Build the aarch64 Jetson Linux Build Container
Compile
Reference
Release Notes
GitHub
Roadmap
NVIDIA DALI
»
DL Framework Plugins
»
PyTorch
»
Pytorch Framework
View page source
Pytorch Framework
¶
Using DALI in PyTorch
Overview
ExternalSource operator
Defining the Iterator
Defining the Pipeline
Using the Pipeline
Using PyTorch DALI plugin: using various readers
Overview
Using DALI in PyTorch Lightning
Overview