Streaming Interactive Deep Learning Applications at Peak Performance

Imagine that you have just finished implementing an awesome, interactive, deep learning pipeline on your NVIDIA-accelerated data science workstation using…

Christian Hundt
11 min readadvanced
--
View Original

Overview

The article discusses how to achieve peak performance in streaming interactive deep learning applications using NVIDIA Simple Streamer (NVSS). It highlights the challenges of remote access to GPU resources and presents NVSS as a solution for efficient streaming of webcam input and rendered output.

What You'll Learn

1

How to implement interactive streaming of webcam input using NVSS

2

Why using non-blocking message queues can improve application performance

3

How to set up remote interactive classification using Docker

Prerequisites & Requirements

  • Basic understanding of deep learning concepts and frameworks like PyTorch
  • Familiarity with Docker and OpenCV(optional)

Key Questions Answered

How does NVIDIA Simple Streamer (NVSS) enhance webcam streaming for deep learning applications?
NVIDIA Simple Streamer (NVSS) enhances webcam streaming by allowing interactive streaming of webcam input and rendered output using TCP sockets. It decouples the inference loop from the webcam's fixed capture rate, enabling applications to demonstrate peak performance for IO-bound tasks without being limited by the webcam's frame rate.
What are the performance metrics achieved using NVSS on NVIDIA DGX Station?
Using NVSS on an NVIDIA DGX Station, the article reports processing rates of up to 10,000 FPS with a dummy inference function. When the inference call is removed, the performance can reach an astonishing 80,000 FPS, showcasing the efficiency of the NVSS framework in handling interactive applications.
How can SSH be used to forward ports for remote applications using NVSS?
SSH can be used to forward ports for remote applications by mapping local ports to remote ports, allowing the WebCamServer and StreamServer to communicate securely. This is done using the command 'ssh -L 8089:localhost:8089 -L 8090:localhost:8090 remoteuser@remoteserver', ensuring encrypted video streams and seamless connections.

Key Statistics & Figures

Maximum FPS with dummy inference
10,000 FPS
Achieved on an NVIDIA DGX Station
Maximum FPS without inference
80,000 FPS
When the dummy inference function is removed
FPS on Tesla V100 GPU with batch size of 8 in FP16
400 FPS
During the classification example execution

Technologies & Tools

Some links below are affiliate links. We may earn a commission if you make a purchase.

Library
Nvidia Simple Streamer (nvss)
Used for efficient streaming of webcam input and rendered output
Containerization
Docker
Used to run GPU-accelerated applications in a containerized environment
Framework
Pytorch
Utilized for deep learning model inference in the classification example
Library
Opencv
Used for capturing webcam input and processing images

Key Actionable Insights

1
Utilize NVSS to create interactive demos for exhibitions or client meetings, showcasing real-time processing capabilities.
This approach allows you to present complex deep learning applications without relying on pre-rendered videos, enhancing audience engagement and demonstrating the true capabilities of your models.
2
Experiment with different batch sizes and precision formats (FP16 vs FP32) to optimize inference performance in your applications.
The article indicates that using half-precision (FP16) can significantly boost performance, especially with batch sizes that align with Tensor Core efficiency, making it crucial for high-performance applications.

Common Pitfalls

1
Failing to properly configure TCP port forwarding can lead to connectivity issues when accessing remote GPU resources.
This can happen if the necessary ports are not mapped correctly using SSH, which is essential for secure communication between local and remote servers.

Related Concepts

Deep Learning Frameworks Like Pytorch
Containerization With Docker
Real-time Video Processing Techniques