I want to know whether opencv3 and python3 have GPU mode,I looked at this link and knew that there was no GPU mode when opencv2, but does opencv3 have GPU mode now?
Asked
Active
Viewed 1,342 times
2 Answers
2
You can manually compile the OpenCV 3 source with GPU support for Python 3. All steps are outlined in this blog post. To answer your question, follow all parts of Step 0 up to and including step 5 to install OpenCV 3 with GPU support for Python 3.
The major requirement is to have an NVIDIA graphics card with CUDA support and all required graphics drivers installed. These steps should work for any debian-like linux distro, I have tested on Ubuntu 16.04, 17.04 and Linux Mint 18.3 without problem.

sparkitny
- 1,503
- 4
- 18
- 23
-
Not deep learning, just the methods commonly used by opencv, is there a GPU mode? – Jan 12 '18 at 13:14
-
Yes, the blog post goes into more detail if you want to install several packages for deep learning to set up a development environment. For OpenCV 3 GPU and Python 3 - Just follow the guide starting from Step 0 to and up to Step 5. From Step 6 to the end the guide it describes how to install other deep learning tools. – sparkitny Jan 12 '18 at 13:17
-
1From the first paragraph of https://opencv.org/ : "Enabled with OpenCL, it can take advantage of the hardware acceleration of the underlying heterogeneous compute platform.". From https://developer.nvidia.com/opencl : "OpenCL™ (Open Computing Language) is a low-level API for heterogeneous computing that runs on CUDA-powered GPUs." – Tom Dalton Jan 12 '18 at 13:31
1
As per the latest release 4.0.0-pre, GPU modules are not yet supported by OpenCV-python.
- Remaining fields specify what modules are to be built. Since GPU modules are not yet supported by OpenCV-Python, you can completely avoid it to save time (But if you work with them, keep it there).
Source: OpenCV Docs

Neeraj Gulia
- 640
- 8
- 24