Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Any way to have opencv_dnn run on GPU (python)?

Hi, I am running some caffe models on an Nvidia Jetson TX1, in python, loading the caffe model via opencv_dnn. This runs fine, even though quite slow.

In order to find some speed, I have recompiled OpenCV 3.4.0 with Halide support on Aarch64 and I am able to activate it by invoking " setPreferableBackend(dnn.DNN_BACKEND_HALIDE) ".

Unfortunately, with Halide the performance are approximately 10x slower. Furthermore, it makes no use of the GPU.

If I get it correctly, there is no plan to include cuDNN as a backend: the preferred way is Halide. This, however, lacks GPU support and/or is in its early stage of integration and has poor performances even on CPUs.

My question is: is there any way to run a caffe model, via opencv_dnn, having any form of (nvidia) GPU acceleration?

The answer after much investigation in my opinion is NO, but can someone confirm or deny this?

Thank you!

Giacomo