How to install OpenCV with CUDA GPU in windows 10 | Python

How to install OpenCV with CUDA GPU in windows 10 | Python

Hackers Realm

1 год назад

22,078 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@bca-rm2om
@bca-rm2om - 10.11.2024 14:38

if i have downloaded the cudatoolkit and cudnn in a virtual environment ,what should i do to make sure the opencv work,because it seem like the opencv is builded upon the base environment of anaconda.or should i have to strictly follow these steps

Ответить
@nda_cadet_yash3423
@nda_cadet_yash3423 - 05.11.2024 23:44

Hello brother will you please help me ...........

Bro I have build open cv with cuda using my pc installed python version 3.12 but I have to use in my conda environment but can't getting to use it help me brother .



I have tried by copying all dll file from cuda an cudnn to conda environment bin . Also copied that cv2*.pyd file to conda environment site packages ....



Please help me

Ответить
@survivinglife262
@survivinglife262 - 04.11.2024 09:41

I have errors while using CMake as well, and this has to do with opencv sfm and opencv hdf5. are you perhaps using this module and have you been able to install them successfully?

the issue is: opencv sfm is dependant on hdf5, and hdf5 is from open-cv contrib, its windows-related headers or linkers are broken (in the CMakeLists) file and its logged as a known issue. but without this, important modules get broken and openCV build totally fails. please let me know if have encountered such an issue and if you were able to fix it.

Ответить
@HelsenbergFan
@HelsenbergFan - 14.10.2024 04:08

Error in configuration process, project files may be invalid.


getting this error on the step after the opencv_extra_modules_path step.

i also dont see the python files you get by searching python.

followed all other steps but i couldnt use microsoft 2019 when i tried so i used 2022. unable to download 2019.

Ответить
@quifar497
@quifar497 - 09.10.2024 08:16

CUDA: OpenCV requires enabled 'cudev' module from 'opencv_contrib' whats the solution

Ответить
@XDG-INACTIVE
@XDG-INACTIVE - 17.09.2024 03:56

FOR ANYONE TRYING TO REPLICATE THE TEST SCRIPT:
CODE IS BELOW





import numpy as np
import cv2 as cv
import time

npTmp = np.random.random((1024, 1024)).astype(np.float32)

npMat1 = np.stack([npTmp, npTmp], axis=2)
npMat2 = npMat1

cuMat1 = cv.cuda_GpuMat()
cuMat2 = cv.cuda_GpuMat()
cuMat1.upload(npMat1)
cuMat2.upload(npMat2)

start_time = time.time()
cv.cuda.gemm(cuMat1, cuMat2, 1, None, 0, None, 1)

print("CUDA using GPU --- %s seconds ---" % (time.time() - start_time))

start_time = time.time()
cv.gemm(npMat1, npMat2, 1, None, 0, None, 1)

print("CPU --- %s seconds ---" % (time.time() - start_time))

Ответить
@LoukboomYT
@LoukboomYT - 27.08.2024 05:06

conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0

Ответить
@BicTic
@BicTic - 18.08.2024 22:18

nice didnt work "Error in configuration process, project files may be invalid." i see you responding to all msgs just not these ones so no help at all

Ответить
@ruzgar9629
@ruzgar9629 - 13.08.2024 03:25

i got error in configuration process, project files may be invalid

Ответить
@Jem_Link
@Jem_Link - 11.07.2024 15:13

Thank you so much for this. I have been trying to install opencv with cuda for a few days now and there was always some new error that I could not resolve. This is the first tutorial that worked without any issues. Thank you so much!!

Ответить
@YetiRUS
@YetiRUS - 08.06.2024 03:55

Это не работает. Сборка CMake прошла успешно. Но импорт cv2 невозможен
>>> import cv2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'cv2'

Ответить
@BLOCKBUSTERMOVIES1-br9ys
@BLOCKBUSTERMOVIES1-br9ys - 29.05.2024 09:24

How to fix this error please:CMake Error at modules/dnn/CMakeLists.txt:41 (message):
DNN: CUDA backend requires cuDNN. Please resolve dependency or disable
OPENCV_DNN_CUDA=OFF

Ответить
@장성규-u1d
@장성규-u1d - 04.04.2024 14:11

I built opencv using cmake. but i can not import cv2 in anaconda prompt.

Ответить
@LaloHao
@LaloHao - 02.03.2024 22:20

How do you enable nvidia video codec headers?

Ответить
@kaviprasadjay2473
@kaviprasadjay2473 - 19.02.2024 11:58

Error in configuration process, project files may be invalid.

I'm getting this error after the process at 10 th minute

Ответить
@sam_razum
@sam_razum - 18.02.2024 10:53

it is saying project files matbe invalid in cmake

Ответить
@golden5023
@golden5023 - 05.02.2024 23:33

If anyone else is having issues make sure you are using visual studio 2019 for some reason the 2022 version doesnt work :0

Ответить
@vebjrnpedersen1091
@vebjrnpedersen1091 - 29.01.2024 23:16

i get:

Could not find OpenBLAS include. Turning OpenBLAS_FOUND off
Could not find OpenBLAS lib. Turning OpenBLAS_FOUND off
Could NOT find BLAS (missing: BLAS_LIBRARIES)
Could NOT find LAPACK (missing: LAPACK_LIBRARIES)
Reason given by package: LAPACK could not be found because dependency BLAS could not be found.

Could NOT find Java (missing: Java_JAVA_EXECUTABLE Java_JAR_EXECUTABLE Java_JAVAC_EXECUTABLE Java_JAVAH_EXECUTABLE Java_JAVADOC_EXECUTABLE)
Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT JVM)
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
Configuring incomplete, errors occurred!

And an error pop up, when trying to "Generate"

Ответить
@angeljo6020
@angeljo6020 - 27.01.2024 17:25

is this video complete? where should we place the folder should we add any environment variable?

Ответить
@MozillaMayhem
@MozillaMayhem - 09.01.2024 09:31

CMake Error at modules/dnn/CMakeLists.txt:53 (message):
DNN: CUDA backend requires cuDNN. Please resolve dependency or disable
OPENCV_DNN_CUDA=OFF


what is my fix for this?

Ответить
@brooksnelson7870
@brooksnelson7870 - 15.12.2023 00:29

Great video. One question. If I have a virtual environment already developed, can I build the make file in the environment? Would I have to activate environment then follow your steps?

Ответить
@aimusicgenerates
@aimusicgenerates - 17.11.2023 09:44

i can import cv2 but not have any module: _version_ not work, all not work. only i can import it

Ответить
@ofeksasson
@ofeksasson - 10.09.2023 07:24

cv2.error: OpenCV(4.8.0) D:\a\opencv-python\opencv-python\opencv\modules\core\include\opencv2/core/private.cuda.hpp:106: error: (-216:No CUDA support) The library is compiled without CUDA support in function 'throw_no_cuda'

im getting this error after following your video, do you know of a fix?

Ответить
@lukasTHEwise
@lukasTHEwise - 29.03.2023 01:02

It doesn't show the specific python paths in CMake for me, just the build. After adding them manually, the CMake installation just stops after 30-40 seconds and it didn't install the library, do these cases have anything in common or what could be the reason?

Ответить
@rajajairamrameshbabu7605
@rajajairamrameshbabu7605 - 01.03.2023 13:11

Please make video introduction to nim game hackerrank solution

Ответить