I am a beginner, under pycharm, pytorch can use CUDA, can find the GPU device, indicating that my NVIDIA driver is no problem. pip opencv-python and pip opencv-contrib-python, devices for which the GPU cannot be found. What could have gone wrong?
nothing went wrong.
pycharm is an IDE for Python. it does not āuseā CUDA. packages you installed to your python may be able to use CUDA.
āsupportā means someone wrote a lot of CUDA code that duplicates non-CUDA functionality. you need to understand what you want CUDA-accelerated. itās not a ājust do everything with CUDAā thing that magically makes everything better. you should read a lot of introductions and guides for this kind of thing.
since youāre a beginner, donāt even go near any CUDA at all. you should first learn more about how computers work, what Python is, what pycharm is, and how to program in general.
if you do want the CUDA modules in opencv, there are ways.
the official opencv-python
package does not support CUDA. it does support OpenCL.
I donāt know if opencv-python-contrib
contains the CUDA modules that are among the contrib modules.
cudawarped maintains builds of OpenCV with CUDA specifically included. use one of the versioned releases here: