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

Поділитися
Вставка
  • Опубліковано 14 лип 2024
  • ⭐️ Content Description ⭐️
    In this video, I have explained on how to install opencv with cuda gpu support in windows 10. I have also explained how to install cuda and cuda toolkit in this video, so you could use gpu for deep learning. Please follow all the steps in orderly manner for successful installation.
    Download Links:-
    MSVC - visualstudio.microsoft.com/
    Anaconda - www.anaconda.com/products/dis...
    Cmake - cmake.org/download/
    OpenCV - opencv.org/releases/
    OpenCV Contrib - github.com/opencv/opencv_contrib
    GPU version list - developer.nvidia.com/cuda-gpus
    Cuda Toolkit - conda install -c conda-forge cudatoolkit=11.2 cudnn=8.1.0
    🌐 Website: www.hackersrealm.net
    🔔 Subscribe: bit.ly/hackersrealm
    🗓️ 1:1 Consultation with Me: calendly.com/hackersrealm/con...
    📷 Instagram: / aswintechguy
    🔣 Linkedin: / aswintechguy
    🎯 GitHub: github.com/aswintechguy
    🎬 Share: • How to install OpenCV ...
    ⚡️ Data Structures & Algorithms tutorial playlist: bit.ly/dsatutorial
    😎 Hackerrank problem solving solutions playlist: bit.ly/hackerrankplaylist
    🤖 ML projects tutorial playlist: bit.ly/mlprojectsplaylist
    🐍 Python tutorial playlist: bit.ly/python3playlist
    💻 Machine learning concepts playlist: bit.ly/mlconcepts
    ✍🏼 NLP concepts playlist: bit.ly/nlpconcepts
    🕸️ Web scraping tutorial playlist: bit.ly/webscrapingplaylist
    Make a small donation to support the channel 🙏🙏🙏:-
    🆙 UPI ID: hackersrealm@apl
    💲 PayPal: paypal.me/hackersrealm
    🕒 Timeline
    00:00 Introduction to OpenCV CUDA
    01:01 Install Visual Studio and Tools
    02:32 Install CUDA Toolkit and Cudnn
    04:19 Download CMake and OpenCV
    05:15 Install CMake
    06:07 Configure OpenCV with CMake
    13:07 Build and Install OpenCV CUDA
    14:40 Test OpenCV performance with CUDA
    #opencv #machinelearning #hackersrealm #cuda #deeplearning #datascience #model #project #artificialintelligence #beginner #analysis #python #tutorial #aswin #ai #dataanalytics #data #bigdata #programming #datascientist #technology #coding #datavisualization #computerscience #pythonprogramming #analytics #tech #dataanalysis #iot #programmer #statistics #developer #ml #business #innovation #coder #dataanalyst

КОМЕНТАРІ • 36

  • @Jem_Link
    @Jem_Link 4 дні тому +1

    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!!

  • @brooksnelson7870
    @brooksnelson7870 7 місяців тому +1

    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?

    • @HackersRealm
      @HackersRealm  7 місяців тому

      I think you can use on any environment once the installation process is done. It's like a global installation similar to microsoft vs build tools

  • @lukasTHEwise
    @lukasTHEwise Рік тому +3

    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?

    • @LaloHao
      @LaloHao 4 місяці тому

      My CMake is also having problems finding python, did you manage to solve it?

  • @LaloHao
    @LaloHao 4 місяці тому

    How do you enable nvidia video codec headers?

  • @kaviprasadjay2473
    @kaviprasadjay2473 4 місяці тому +1

    Error in configuration process, project files may be invalid.
    I'm getting this error after the process at 10 th minute

  • @golden5023
    @golden5023 5 місяців тому +2

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

    • @akosbalint3485
      @akosbalint3485 Місяць тому

      I have just run into this issue, vs2019 is working fine.

  • @user-se6ry6be1t
    @user-se6ry6be1t 3 місяці тому

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

  • @MozillaMayhem
    @MozillaMayhem 6 місяців тому +1

    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?

    • @HackersRealm
      @HackersRealm  6 місяців тому

      You have to install cuda drivers for your nvidia gpu

  • @ofeksasson
    @ofeksasson 10 місяців тому +1

    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?

    • @HackersRealm
      @HackersRealm  10 місяців тому

      you might need to install cuda drivers for the nvidia gpu... If that's working then this issue will be resolved

    • @ofeksasson
      @ofeksasson 10 місяців тому

      @@HackersRealm I have the latest drivers and both cuda and cudnn are working when I use tensorflow and pytorch.
      Only when I try to use GPU with opencv I get the problems

    • @emre_tif
      @emre_tif 7 місяців тому

      check your system variable paths if you have still that error because i fix that way
      @@ofeksasson

    • @TheAhmedps
      @TheAhmedps 4 місяці тому

      same problem have you managed to solve it?

  • @rajajairamrameshbabu7605
    @rajajairamrameshbabu7605 Рік тому

    Please make video introduction to nim game hackerrank solution

  • @aimusicgenerates
    @aimusicgenerates 8 місяців тому

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

    • @HackersRealm
      @HackersRealm  8 місяців тому

      that's strange, if you can import without issues, then it should ideally work

  • @BLOCKBUSTERMOVIES1-br9ys
    @BLOCKBUSTERMOVIES1-br9ys Місяць тому

    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

    • @HackersRealm
      @HackersRealm  Місяць тому

      You need a nvidia graphics card and install the cuda toolkit to avoid this error

  • @sam_razum
    @sam_razum 4 місяці тому +1

    it is saying project files matbe invalid in cmake

    • @Th3Test5656
      @Th3Test5656 3 місяці тому

      same did u figure it out ive tried everything still no luck

  • @angeljo6020
    @angeljo6020 5 місяців тому

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

    • @HackersRealm
      @HackersRealm  5 місяців тому

      yes the video is complete, and once you complete all the steps, you can access the same way like importing opencv module

    • @angeljo6020
      @angeljo6020 5 місяців тому

      @@HackersRealm i tried and gave up , got a prebuilt whl package

    • @HackersRealm
      @HackersRealm  5 місяців тому

      @@angeljo6020If you can share the whl package link, it would be helpful to others as well.

    • @MintHimself
      @MintHimself Місяць тому

      @@angeljo6020 yoo could i get that prebuild whl package? sat here for 4 hours tryina figure this shit out

  • @YetiRUS
    @YetiRUS Місяць тому

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

    • @HackersRealm
      @HackersRealm  Місяць тому

      kindly check the environment you're trying to use, I have used anaconda environment and installed there for usage.

    • @YetiRUS
      @YetiRUS Місяць тому

      @@HackersRealmя не могу найти в CMake параметр BUILD_opencv_python3

  • @vebjrnpedersen1091
    @vebjrnpedersen1091 5 місяців тому

    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"