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. What is DeepStream Used for? Video analytics has a vital role in the transportation, healthcare, retail, and physical security industries. DeepStream by Nvidia is an IVA SDK that enables you to attach and remove video streams without affecting the rest of the environment. Nvidia has been working on improving its deep learning stack to provide developers with even better and more accurate SDKs to create AI-based applications. DeepStream is a bundle of plug-ins used to facilitate a deep learning video analysis pipeline. Developers don’t have to build the entire application from scratch. They can use the DeepStream SDK (open source) to speed up the process and reduce the time and effort invested into the project. Being a streaming analytics toolkit, it helps create smart systems to analyze videos using artificial intelligence and deep learning. DeepStream is flexible and runs on discrete GPUs (Nvidia architecture) and chip platforms with Nvidia Jetson devices. It helps easily build complex applications with the following: Multiple streams Numerous deep learning frameworks Several models working in tandem Various models combined in series or parallel connection to create an ensemble Customized pre and post-processing Computing at different precisions Working with Kubernetes Scaling is easy when using DeepStream as it allows you to deploy applications in stages. This helps maintain accuracy and minimize the risk of errors. 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. 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. Decoder 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. Sink The sink as the name suggest is last end of pipeline where normal flows end. 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 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. FP32 FP16 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
Read More