OpenCV (Release and Debug builds including python bindings and docs) built with VS2022 against CUDA 12.5., Nvidia Video Codec SDK 12.2 and cuDNN 9.2.0.
Suitable for all devices of compute capability >= 5.0 with binary compatible code for devices of compute capability 5.0-9.0.
Nvidia GPU Computing Toolkit v12.5 and cuDNN 9.2.0 are required dependencies.
Note: This wheel relies on cuDNN being installed in the CUDA Toolkit directory. Therefore you can either
-
Download the cuDNN Tarball (not the installer) and extract its contents to your CUDA directory, or
-
Add the path to the bin folder inside the cuDNN installation directory to your PATH_TO_PYTHON_DIST/Lib/site-packages/cv2/config.py file. e.g.
import os
BINARIES_PATHS = [
os.path.join('D:/build/opencv/install', 'x64/vc17/bin'),
os.path.join(os.getenv('CUDA_PATH', 'C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.5'), 'bin')
os.path.join('C:/Program Files/NVIDIA/CUDNN/v9.1/bin/12.4')
] + BINARIES_PATHS
CMAKE_ARGS
-DBUILD_opencv_world=ON
-DWITH_CUDA=ON
-DENABLE_CUDA_FIRST_CLASS_LANGUAGE=ON
-DCUDA_ARCH_BIN=5.0,5.2,6.0,6.1,7.0,7.5,8.0,8.6,8.9,9.0
-DCUDA_ARCH_PTX=9.0
-DINSTALL_TESTS=ON
-DINSTALL_C_EXAMPLES=ON