ImportError: DLL load failed (CUDA + OpenCV on Win10 x64 for Python)

OpenCL works on NVIDIA too. the software itself doesn’t require that you use CUDA.

OpenCV can use CUDA either from CUDA-specific modules (contrib repo) or from the dnn module, as one of the backends.

OpenCV’s dnn module doesn’t do training, just inference. it has various backends you can choose from… so you can develop on your AMD card with cuda, and if that works in principle, then you can switch the dnn to use a CUDA backend. should be fairly transparent.

maybe there are OpenCV-python packages out there that come with CUDA… but those are neither official nor by conda-forge (the only unofficial builds I know that aren’t just one-off abandonware)

you’ll have to build OpenCV yourself. the cuda modules live in the contrib repo, so you’ll have to get that and specify OPENCV_EXTRA_MODULES_PATH

“DLL load failed” issues come from, most likely, some CUDA DLLs not being listed in the PATH environment variable, and so the python process can’t find it.

build still succeeds because linking (a build step) requires libraries, not DLLs.

you could browse the cuda tag in this forum. you aren’t the first with this problem and there are very likely solutions or at least hints.

https://forum.opencv.org/tag/cuda