Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to run OpenCV DNN on NVidia GPU

Hi,

I want to use my Nvidia GTX 1060 GPU when I run with my DNN code. I am using OpenCV. I tried with CPU, However, It is absolutely slow. So, I change this line,

net.setPreferableTarget(DNN_TARGET_CPU);

to,

net.setPreferableTarget(DNN_TARGET_OPENCL);

And then, I get an error that is [ WARN:0] DNN: OpenCL target is not supported with current OpenCL device (tested with Intel GPUs only), switching to CPU.

How Can I solve this problem? I have OpenCV 3.4.3.