Build and install OpenCV from source with CUDA and cuDNN support

preview_player
Показать описание
--------- IMPORTANT ---------

If "nvcc not found" then create following soft links to local bin.
sudo ln -s /usr/local/cuda-11.3/bin/* /usr/local/bin
sudo ln -s /usr/local/cuda-11.3/nvvm/bin/* /usr/local/bin
--------- END ---------

--------- IMPORTANT ---------
cuDNN installation has changed since this video. Please refer the instruction in the documentation
--------- END ---------

CUDA instillation guide:

cuDNN installation guide:

OpenCV repositories:

CUDA wiki page:

Follow me on:
Рекомендации по теме
Комментарии
Автор

This was indeed very helpful. I was not able to build with cuda support but now I can. Thanks a ton !

kunalk
Автор

Exact and thorough manual. Need to add Ubuntu 20.04 in the title for better indexing. Huge thanks!

MrGopak
Автор

That was very helpful, thank you so much!

tungphamkhachoang
Автор

This was very informative and great narrative. But i am having issues when i am doing the 2nd round of configuration. It says "Error in configuration process, project files maybe invalid". Could you please help me.

karishmathumu
Автор

9:52 When I paste the link in this section and press enter, it gives me an error and says no such command was found. how can I do it

simplesecomumcidadao
Автор

I installed and didn't have errors. But when I run the final command is returning me 0. Could be because I have CV2 installed using pip before?

guillermoalejandrobastianf
Автор

Nice video thanks ! . I have a question i noticed that you imported cv2 globally what if i use virtualenv in a project, how can i use the opencv gpu on my venv ??

mohamedkhalilallaoui
Автор

I have done all the things you did in the video. and all things worked out perfectly fine. but in the last step when I write

import cv2
it is giving me ModuleNotFoundError: No module named 'cv2'

Abhishek_Satasiya
Автор

Hi @s1n7ax! Thank for your help but I face some trouble to install open CV. Could you answer my question
If I use (base) - virtual environment created by anaconda. can I import cv2 in (base) to used in pytorch? and I installed Cuda and CuDNN but not like you so any difference between your install process and my.
Sorry for my bad english and thank you so much for your help

timewaster
Автор

i was succeed built cv2 with cmake, installed it perfectly and cuda support also. but how to put this libs into a virtualenv

comingsoon
Автор

IMPORTANT
cuDNN installation has changed since this video. Please refer the instruction in the documentation

snax
Автор

Is it possible to install this with anaconda ?

eddygonzalez
Автор

IMPORTANT
Please add OPENCV_GENERATE_PKGCONFIG=1 flag in cmake-gui so other applications can find opencv.

If "nvcc not found" then create following soft links to local bin.
sudo ln -s /usr/local/cuda-11.3/bin/* /usr/local/bin
sudo ln -s /usr/local/bin

snax