blog image

Nvidia DeepStream – A Simplistic Guide

Nvidia DeepStream is an AI Framework that helps in utilizing the ultimate potential of the Nvidia GPUs both in Jetson and GPU devices for Computer Vision. It powers edge devices like Jetson Nano and other devices from the Jetson family to process parallel video streams on edge devices in real-time.

DeepStream uses Gstreamer pipelines (written in C) to take input video in GPU which ultimately processes it faster for further processes.

Components of DeepStream

DeepStream has a plugin-based architecture. The Graph-based pipeline-interface allows high-level component interconnection. It enables heterogeneous parallel processing using multithreading on both GPU and CPU.

DeepStream High Level and Low Level Architecture
DeepStream High Level and Low Level Architecture

Here are the major components of DeepStream and their high-level functions –

Meta Data

It is generated by graph and it is generated at every stage of the graph. Using this we can get many important fields like Type of Object detected, ROI coordinates, Object Classification, Source, etc.


The decoders help in decoding the input video (H.264 and H.265). It supports multi-stream simultaneously decoding. It takes Bit depth and Resolution as parameters.

Video Aggregator (nvstreammux)

It helps in accepting n input streams and converts them into sequential batch frames. It uses Low Level APIs to access both GPU and CPU for the process.

Inferencing (nvinfer)

This is used to get inference of the model used. All the model related work is done through nvinfer. It also supports primary and secondary modes and various clustering methods.

Format Conversion and Scaling (nvvidconv)

It converts format from YUV to RGBA/BRGA, scales the resolution and does the image rotation part.

Object Tracker (nvtracker)

It uses CUDA and is based on KLT reference implementation. We can also replace default Tracker with other trackers.

Screen Tiler (nvstreamtiler)

It manages the output videos, i.e kind of equivalent of open cv’s imshow function.

On Screen Display (nvosd)

It manages all the drawables on the screen, like drawing lines, bounding boxes circles, ROI etc.


The sink as the name suggest is last end of pipeline where normal flows end.

DeepStream Execution Flow Architecture
DeepStream Execution Flow Architecture

Flow of execution in Nvidia DeepStream

Decoder -> Muxer -> Inference -> Tracker (if any) -> Tiler -> Format Conversion -> On Screen Display -> Sink

The DeepStream app consists of two parts, one is the config file and the other is its driver file (can be in C or in Python).

Example of Config File

# GPU ID is for the number of GPUs used, default is 0


# Scaling images


# Key is the one you get from, use the same key you used to train the model


# Path to the tlt model


# Path to label file


# Incase you converted etlt to GPU engine file (tensorrt) provide that path, this reduces reloading time at starting.


# Input dims of the image


# If model is trained through TLT kit then provide the uff params.


## 0=FP32, 1=INT8, 2=FP16 mode
# On jetson Nano use network mode as 2.

# There are various cluster method used by internal inference to select the classes read documentation of various clustering modes available


#Interval is equivalent of skip frames

# The gie unique id is the main ID which helps in acessing objects of config file which is currently processed.

# It is used when we are using Classifier after detection

# It is important to use same layer output as used when training the model.


We can decide threshold per class too

For more info refer here

Different modes in running inference on Nvidia DeepStream

While using DeepStream we can choose between 3 types of network mode.

  1. FP32
  2. FP16
  3. Int8

The performance varies with network mode Int8 being the fastest and FP32 being slowest but more accurate but the Jetson nano can not run Int8.

DataToBiz has its expertise in developing state of the art Computer Vision algorithms and inferencing them on edge devices in real-time. For more details contact us

Become a Data Driven Leader

Learn how our experts can help

Explore Possibilities

Leave a Reply

Your email address will not be published. Required fields are marked *