opencv-python-cuda

Pre-built OpenCV wheels for Python with NVIDIA® CUDA™ support - no CUDA Toolkit or cuDNN installation required.

OpenCV 5.0 & 4.x Windows x64 CUDA 12.x Maxwell (GTX 900) or newer

Get started

  1. Install with pip (or another package manager like uv) from the package index hosted on this site:
    pip install opencv-python-cuda --extra-index-url https://breakthrough.github.io/opencv-python-cuda/packages/
    This installs the newest release, which is OpenCV 5. OpenCV 5 has breaking API changes (see the upstream change logs); to stay on OpenCV 4.x, ask for a version below 5:
    pip install "opencv-python-cuda<5" --extra-index-url https://breakthrough.github.io/opencv-python-cuda/packages/
    Or download the .whl file from the release above and install it by path:
    pip install opencv_python_cuda-*-win_amd64.whl
  2. Verify that CUDA is working:
    import cv2
    print(cv2.cuda.getCudaEnabledDeviceCount())

By downloading and using the software, you agree to fully comply with the terms and conditions of the CUDA EULA.

About

opencv-python-cuda is a fork of the official opencv-python project that ships CUDA-enabled OpenCV builds with all batteries included: every required runtime library is bundled directly in the wheel, including hardware video decoding and encoding (NVDEC/NVENC).

Two release lines are maintained: OpenCV 5.x (built from the 5.x-cuda branch) and OpenCV 4.x (built from the 4.x-cuda branch). Both are published to the same package index, so you can pick either one with a version specifier.

The only system requirement is an up-to-date NVIDIA driver - the wheel links directly against driver components, so a working driver must be installed for import cv2 to succeed.

Documentation