NVIDIA Optical Flow SDK
NVIDIA Optical Flow SDK
Optical Flow SDK exposes the latest hardware capability of Turing GPUs dedicated to computing the relative motion of pixels between images. The hardware uses sophisticated algorithms to yield highly accurate flow vectors, which are robust to frame-to-frame intensity variations, and track the true object motion. Computation of these flow vectors is faster than most other available methods at comparable accuracy, with very little load on CPU or GPU, as the vectors are computed on dedicated hardware which is independent of the GPU’s CUDA cores.
NVIDIA Optical Flow SDK exposes a new set of APIs for this hardware functionality:
- C-API – Windows and Linux
- Windows – CUDA and DirectX
- Linux – CUDA
- Granularity: 4x4 vectors at ¼ pixel resolution
- Raw vectors – directly from hardware
- Pre-/post-processed vectors via algorithms to improve accuracy
- Accuracy: low average EPE (End-Point-Error) and outliers
- Performance: Up to 150 fps at 4K resolution*
- Robust to intensity changes
- OpenCV integration (GitHub)
- NEW to 2.0: - Support for A100 GPU, with improved optical flow hardware engine, independent of NVENC
- NEW to 2.0: - Increased accuracy in flow vector’s cost, which indicates the confidence of the vector
- NEW to 2.0: - Ability to get flow vectors for a specific region of interest
- NEW to 2.0: - Hardware optical-flow-assisted object tracker library
- NEW to 2.0: - Support for 1x1 and 2x2 grid sizes
By clicking the "Agree & Download" button, you are confirming that you have read and agree to be bound by the SOFTWARE DEVELOPER KITS, SAMPLES AND TOOLS LICENSE AGREEMENT for use of the SDK package. The download will begin immediately after clicking on the "Agree & Download" button.
Optical Flow - Typical Use-Cases
Optical Flow benefits use-cases such as
- Object tracking for intelligent video analytics
- Video frame interpolation, and extrapolation
- Stereo depth estimation
- Video action recognition
Object tracking for Intelligent Video Analytics
Until a few years ago, intelligent videos analytics (IVA) required physical viewing and manual analysis of the captured videos. With rapid developments in computer vision and deep learning techniques, most of such analysis is now automated. Identifying the objects/persons/vehicles of interest from security camera footage, and tracking them across the video frames can be achieved using computer vision algorithms. GPUs are a natural choice of platform for running these applications because of high computational complexity and parallelism requirements. The most common method is to detect and identify the objects/persons/vehicles of interest in every video frame and running an algorithm to correlate the objects in successive frames to track their movement. This method, although accurate, suffers from extremely high computational complexity requirements, since the object detection/identification is a computationally intensive operation (typically using neural network inference).
The hardware optical flow engine alleviates the computational complexity requirements significantly by helping the tracking of objects. For example, once an object is detected/identified by the detector, it can be tracked in successive video frames by an algorithm based on GPU’s hardware optical flow. This eliminates the need for running the detection algorithm every frame, resulting in a massive reduction in computational complexity. The detector can now run every Kth frame without compromising the accuracy (K > 1, typically K = 4). This leaves the GPU’s CUDA cores free to run inference on additional channels or other computationally intensive tasks.
Optical Flow SDK 2.0 includes an object tracker library based on optical flow, along with source code and ready-to-use API. In our experiments, the optical flow-based object tracker has shown to reduce the GPU utilization by up to 80%, compared to some of the most popular algorithms without compromising the accuracy of tracking.
Video Frame Interpolation and Extrapolation
Optical flow can also be used very effectively for interpolating or extrapolating the video frames in real-time. This can be useful in improving the smoothness of video playback, generating slow-motion videos or reducing the apparent latency in VR experience, as used by Oculus (details)
Optical Flow functionality in Turing and Ampere GPUs accelerates these use-cases by offloading the intensive flow vector computation to a dedicated hardware engine on the GPU silicon, thereby freeing up GPU and CPU cycles for other tasks. This functionality in hardware is independent of CUDA cores.
Our forum community is where Developers can ask questions, share experiences and participate in discussions with NVIDIA and other experts in the field.
Check out the forums here.
- NVIDIA Video Codec SDK
- DeepStream SDK for Intelligent Video Analytics
- Deep Learning Software
- GitHub - NVIDIA Optical flow in OpenCV
- GTC 2020 Session - NVIDIA Video Technologies: Video Codec and Optical Flow SDK [S21337]
- GTC 2020 Session - Using Video Codec SDK and Optical Flow SDK on NVIDIA GPUs Effectively [CWE21120]
- NVIDIA DevBlog - December 5, 2019 - Accelerate OpenCV: Optical Flow Algorithms with NVIDIA Turing GPUs
- NVIDIA Developer News - August 23, 2019 - Researchers at VideoGorillas Use AI to Remaster Archived Content to 4K Resolution and Above
- Oculus Developer blog - May 23, 2019 - ASW and Passthrough+ with NVIDIA Optical Flow
- NVIDIA DevBlog - February 13, 2019 - An Introduction to the NVIDIA Optical Flow SDK