https://github.com/geeksloth/install_opencv_gpu_batch_scripts
An easier way to install OpenCV-GPU on Windows by using the Batch scripts and some tools
https://github.com/geeksloth/install_opencv_gpu_batch_scripts
batch-script opencv opencv-gpu
Last synced: about 1 year ago
JSON representation
An easier way to install OpenCV-GPU on Windows by using the Batch scripts and some tools
- Host: GitHub
- URL: https://github.com/geeksloth/install_opencv_gpu_batch_scripts
- Owner: geeksloth
- Created: 2023-07-24T12:27:59.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-24T13:21:28.000Z (almost 3 years ago)
- Last Synced: 2025-01-30T14:48:43.277Z (over 1 year ago)
- Topics: batch-script, opencv, opencv-gpu
- Language: Batchfile
- Homepage:
- Size: 263 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# install_opencv_gpu_batch_scripts
An easier way to install OpenCV-GPU on Windows by using the Batch scripts and some tools
This repo's readme is not complete yet. BTW, the more explained methods are described by Jordan Benge's post:
https://jordanbenge.medium.com/anaconda3-opencv-with-cuda-gpu-support-for-windows-10-e038569e228
This is another more explanation related to this guideline:
https://medium.com/analytics-vidhya/build-opencv-from-source-with-cuda-for-gpu-access-on-windows-5cd0ce2b9b37
## Usage and Testing
```code
set PATH="C:\\OpenCV\\opencv-4.6.0\\build\\install\\x64\\vc17\\bin";%PATH%
set PATH="C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin";%PATH%
import os
os.add_dll_directory(r'C:\\OpenCV\\opencv-4.6.0\\build\\install\\x64\\vc17\\bin')
os.add_dll_directory(r'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.8\\bin')
import cv2
print(cv2.cuda.getCudaEnabledDeviceCount())
import torch
print(torch.cuda.is_available())
print(torch.cuda.get_device_name())
```