Difference between revisions of "Jetson/Computer Vision Performance"

From eLinux.org
Jump to: navigation, search
(Created the OpenCV performance page with initial content)
 
(Added the OpenCV4Tegra presentation and made some minor touchups)
Line 1: Line 1:
 
== Hardware Acceleration of OpenCV ==
 
== Hardware Acceleration of OpenCV ==
OpenCV is the de-facto standard Computer Vision library containg more than a thousand computer vision & image processing & machine learning algorithms. See [[Tegra/Installing_OpenCV|Installing OpenCV on Jetson TK1]] if you haven't done so yet. OpenCV has been significantly optimized by NVIDIA in 2 ways:
+
OpenCV is the de-facto standard Computer Vision library containg more than 2500 computer vision & image processing & machine learning algorithms. See [[Tegra/Installing_OpenCV|Installing OpenCV on Jetson TK1]] if you haven't done so yet. OpenCV has been significantly optimized by NVIDIA in 2 ways:
  
 
# '''OpenCV4Tegra''': A free library provided by NVIDIA containing optimizations for NVIDIA's Tegra CPUs (ARM NEON SIMD optimizations, multi-core CPU optimizations and some GLSL GPU optimizations). OpenCV4Tegra is a binary replacement for the public OpenCV, thus the programmer just writes regular OpenCV code, that will automatically take advantage of OpenCV4Tegra optimizations without the developer or user necessarily knowing about it. It is supported on Android since Tegra 2 and also supported on Linux4Tegra, Vibrante, etc. It typically provides between 2x - 5x speedup on Tegra K1 compared to regular OpenCV.
 
# '''OpenCV4Tegra''': A free library provided by NVIDIA containing optimizations for NVIDIA's Tegra CPUs (ARM NEON SIMD optimizations, multi-core CPU optimizations and some GLSL GPU optimizations). OpenCV4Tegra is a binary replacement for the public OpenCV, thus the programmer just writes regular OpenCV code, that will automatically take advantage of OpenCV4Tegra optimizations without the developer or user necessarily knowing about it. It is supported on Android since Tegra 2 and also supported on Linux4Tegra, Vibrante, etc. It typically provides between 2x - 5x speedup on Tegra K1 compared to regular OpenCV.
 
# '''OpenCV 'gpu' module''': The 'gpu' module in the public OpenCV library is designed purely for CUDA GPGPU acceleration with NVIDIA's mobile & desktop GPUs. The developer must make minor changes to their code to specifically call functions from the OpenCV 'gpu' module in order for their OpenCV code to take advantage of the GPU. This allows the developer to control memory allocations for the GPU, choose when it is transferred between CPU & GPU, and choose which functions should run on GPU vs CPU and control the streaming or multi-GPU behaviour, etc. It has been an important part of OpenCV on desktop since 2010/2011, and is supported by most NVIDIA GPUs available today. Some functions (such as Haar Cascade Classifiers) are not as suited to GPUs so only get minor speedups or don't exist, while other functions (such as LBP Cascade Classifiers, HOG, stereo vision, warping, etc) are much more suited to GPUs and thus can get 5x - 20x speedups on Tegra K1 compared to regular OpenCV.
 
# '''OpenCV 'gpu' module''': The 'gpu' module in the public OpenCV library is designed purely for CUDA GPGPU acceleration with NVIDIA's mobile & desktop GPUs. The developer must make minor changes to their code to specifically call functions from the OpenCV 'gpu' module in order for their OpenCV code to take advantage of the GPU. This allows the developer to control memory allocations for the GPU, choose when it is transferred between CPU & GPU, and choose which functions should run on GPU vs CPU and control the streaming or multi-GPU behaviour, etc. It has been an important part of OpenCV on desktop since 2010/2011, and is supported by most NVIDIA GPUs available today. Some functions (such as Haar Cascade Classifiers) are not as suited to GPUs so only get minor speedups or don't exist, while other functions (such as LBP Cascade Classifiers, HOG, stereo vision, warping, etc) are much more suited to GPUs and thus can get 5x - 20x speedups on Tegra K1 compared to regular OpenCV.
 +
 +
=== Presentation videos about the OpenCV4Tegra module ===
 +
 +
A free online webinar (on NVIDIA's [http://on-demand-gtc.gputechconf.com/gtcnew/on-demand-gtc.php?searchByKeyword=opencv&submit=&select=+ GTC Express page]) introduces the OpenCV4Tegra module, from the actual OpenCV4Tegra development team:
 +
 +
# '''Introduction to OpenCV for Tegra''' (March 2013) describes OpenCV4Tegra including the installation steps for Android. [http://on-demand.gputechconf.com/gtc/2013/video/S3411-Introduction-To-OpenCV-For-Tegra.mp4 Video] and [http://on-demand.gputechconf.com/gtc/2013/presentations/S3411-OpenCV-For-Tegra.pdf Slides].
  
 
=== Presentation videos about the OpenCV 'gpu' module ===
 
=== Presentation videos about the OpenCV 'gpu' module ===
  
Two free online webinars (on NVIDIA's [http://www.gputechconf.com/page/gtc-express-webinar.html GTC Express page]) introduce OpenCV's GPU module, from the actual OpenCV development team:
+
Two free online webinars (on NVIDIA's [http://on-demand-gtc.gputechconf.com/gtcnew/on-demand-gtc.php?searchByKeyword=opencv&submit=&select=+ GTC Express page]) introduce OpenCV's GPU module, from the actual OpenCV development team:
  
 
# '''OpenCV - Accelerated Computer Vision using GPUs''' (June 2013) gives a non-technical overview of OpenCV and the GPU module, showing what is available and why you would want to use it. [http://on-demand.gputechconf.com/gtc/2013/webinar/opencv.mp4 Video] and [http://on-demand.gputechconf.com/gtc/2013/webinar/opencv-gtc-express-shalini-gupta.pdf Slides].
 
# '''OpenCV - Accelerated Computer Vision using GPUs''' (June 2013) gives a non-technical overview of OpenCV and the GPU module, showing what is available and why you would want to use it. [http://on-demand.gputechconf.com/gtc/2013/webinar/opencv.mp4 Video] and [http://on-demand.gputechconf.com/gtc/2013/webinar/opencv-gtc-express-shalini-gupta.pdf Slides].
 
# '''Getting Started with GPU-accelerated Computer Vision using OpenCV and CUDA''' (July 2013) is more technical, it shows how you can install OpenCV's GPU module, shows the memory model of the GPU module, and how to combine OpenCV's GPU module with your own custom CUDA kernels. [http://on-demand.gputechconf.com/gtc/2013/webinar/gtc-express-opencv-baksheev.mp4 Video] and [http://on-demand.gputechconf.com/gtc/2013/webinar/gtc-express-itseez-opencv-webinar.pdf Slides].
 
# '''Getting Started with GPU-accelerated Computer Vision using OpenCV and CUDA''' (July 2013) is more technical, it shows how you can install OpenCV's GPU module, shows the memory model of the GPU module, and how to combine OpenCV's GPU module with your own custom CUDA kernels. [http://on-demand.gputechconf.com/gtc/2013/webinar/gtc-express-opencv-baksheev.mp4 Video] and [http://on-demand.gputechconf.com/gtc/2013/webinar/gtc-express-itseez-opencv-webinar.pdf Slides].

Revision as of 23:31, 7 June 2014

Hardware Acceleration of OpenCV

OpenCV is the de-facto standard Computer Vision library containg more than 2500 computer vision & image processing & machine learning algorithms. See Installing OpenCV on Jetson TK1 if you haven't done so yet. OpenCV has been significantly optimized by NVIDIA in 2 ways:

  1. OpenCV4Tegra: A free library provided by NVIDIA containing optimizations for NVIDIA's Tegra CPUs (ARM NEON SIMD optimizations, multi-core CPU optimizations and some GLSL GPU optimizations). OpenCV4Tegra is a binary replacement for the public OpenCV, thus the programmer just writes regular OpenCV code, that will automatically take advantage of OpenCV4Tegra optimizations without the developer or user necessarily knowing about it. It is supported on Android since Tegra 2 and also supported on Linux4Tegra, Vibrante, etc. It typically provides between 2x - 5x speedup on Tegra K1 compared to regular OpenCV.
  2. OpenCV 'gpu' module: The 'gpu' module in the public OpenCV library is designed purely for CUDA GPGPU acceleration with NVIDIA's mobile & desktop GPUs. The developer must make minor changes to their code to specifically call functions from the OpenCV 'gpu' module in order for their OpenCV code to take advantage of the GPU. This allows the developer to control memory allocations for the GPU, choose when it is transferred between CPU & GPU, and choose which functions should run on GPU vs CPU and control the streaming or multi-GPU behaviour, etc. It has been an important part of OpenCV on desktop since 2010/2011, and is supported by most NVIDIA GPUs available today. Some functions (such as Haar Cascade Classifiers) are not as suited to GPUs so only get minor speedups or don't exist, while other functions (such as LBP Cascade Classifiers, HOG, stereo vision, warping, etc) are much more suited to GPUs and thus can get 5x - 20x speedups on Tegra K1 compared to regular OpenCV.

Presentation videos about the OpenCV4Tegra module

A free online webinar (on NVIDIA's GTC Express page) introduces the OpenCV4Tegra module, from the actual OpenCV4Tegra development team:

  1. Introduction to OpenCV for Tegra (March 2013) describes OpenCV4Tegra including the installation steps for Android. Video and Slides.

Presentation videos about the OpenCV 'gpu' module

Two free online webinars (on NVIDIA's GTC Express page) introduce OpenCV's GPU module, from the actual OpenCV development team:

  1. OpenCV - Accelerated Computer Vision using GPUs (June 2013) gives a non-technical overview of OpenCV and the GPU module, showing what is available and why you would want to use it. Video and Slides.
  2. Getting Started with GPU-accelerated Computer Vision using OpenCV and CUDA (July 2013) is more technical, it shows how you can install OpenCV's GPU module, shows the memory model of the GPU module, and how to combine OpenCV's GPU module with your own custom CUDA kernels. Video and Slides.