I am building OpenCV 4.3.0-dev with cuDNN support. I pass these options to CMake:
-DWITH_CUDNN=ON \
-DCUDNN_LIBRARY="$(pwd)/../../cudnn/lib64/libcudnn.so" \
-DCUDNN_INCLUDE_DIR="$(pwd)/../../cudnn/include" \
-DCUDA_ARCH_BIN=7.0 \
However when I try to use the CUDA backend to the DNN module:
net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)
I get the message "setUpNet DNN module was not built with CUDA backend; switching to CPU".
This GitHub issue suggests disabling CUDA architectures below 7.0 which is what I am doing. Is there something else I'm missing?