Setup OpenCV-DNN module with CUDA backend support issue

I am currently trying to setup OpenCV DNN module with CUDA support for Jetson TX2 board. I have flashed Jetpack 4.6.3 in the TX2 board with CUDA 10.2.1 and OpenCV 4.1.1, these are installed through through the NVIDIA SDK manager installation for TX2 (followed JETSONHACKS youtube video).
But when I ran object detection with CUDA, I encountered this error " [setUpNet DNN module was not built with CUDA backend; switching to CPU]". As per few blog suggestion I followed Setup OpenCV-DNN module with CUDA backend support (For Linux) - TECHZIZOU
these steps. But at the end I am not getting the OpenCV version as 4.5.5, it is still 4.1.1 which doesn’t support CUDA DNN module.

Could anyone have an idea how to solve this issue? Is OpenCV 4.5.5 the right version for the above jetpack version installed?
Also, i couldn’t find any nvidia drivers in TX2, so nvidia-smi command didnt work for me, I wanted to manually install nvidia-440 driver which supports 10.x CUDA version.

@linux332 @linuxdev @Honey_Patouceul @kayccc @AastaLLL @jchaves

Thank You for your time :)


When you build OpenCV from the source, please enable the following two flags:



Hi @AastaLLL,

Only the BUILD_OPENCV_WORLD=ON flag has to be enabled.
Just a simple query, do I need to build make -j4 and sudo make install again?


It is important to know that the GPU on Jetsons are integrated directly to the memory controller (iGPU). The discrete GPU on desktop PCs attach via the PCI bus (dGPU). “nvidia-smi” works only on PCI bus GPUs. This cannot work on Jetsons.

Also, you would not want to use the drivers for dGPUs. The nvidia-440 driver would only cause problems when added to a Jetson. You should only use the driver which comes through the JetPack/SDK Manager install. If you’ve added this already you might end up having to flash again.


Yes, please run make and make install again after changing the build config.

Thank You everyone for the support, the error got resolved.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.