Setupnet dnn module was not built with cuda backend; switching to cpu Issue

Hello,
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.

@Karishma @berak

Have you got CUDNN installed? If yes, which version?
Please check if that particular version of CUDNN is compatible with your installed CUDA version.

  • Set up the parameters with CMAKE_GUI and configure.
  • Uninstall the OpenCV 4.1.1 and go and install the OPEN CV 4.5._ & build it with CMAKE GUI for flexibility. And when doing that, you should select all the necessary parameters to enable dnn, CUDA, CUDNN, OPENCV, related modules and CUDA and CUDNN versions, BUILD_OPENCV_WORLD and configure and it must work. You can try to look at the log if it has been succesfully done right or not.
  • Also, make sure, you have CUDA toolkit installed on your linux system.
  • You also need add the opencv_world library to the platform, for example: Visual Studio, to link up the OPENCV_DNN Module
    Hope this helps.