Build and install OpenCV from source with CUDA and cuDNN support

Поділитися
Вставка
  • Опубліковано 20 сер 2024

КОМЕНТАРІ • 27

  • @kunalk1234
    @kunalk1234 2 роки тому +1

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

    • @s1n7ax
      @s1n7ax  2 роки тому

      Good if you only use cuda. cudnn installation has changed slightly since this video.

    • @kunalk1234
      @kunalk1234 2 роки тому +2

      CUDNN installation was a big pain and I had to copy files. Cmake configuration detected cudnn as well. I think only DNN module uses cudnn which I don't plan to use as of now. Cuda accelerated libraries should work fine.

  • @MrGopak
    @MrGopak 3 роки тому

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

  • @user-by2cv5ql9r
    @user-by2cv5ql9r 2 роки тому +1

    you are the best explanation

  • @arndtsteffens7831
    @arndtsteffens7831 9 місяців тому

    Very well done. Thank you

  • @zakariaesaidi843
    @zakariaesaidi843 3 роки тому +1

    Thankyou, it worked for me

  • @s1n7ax
    @s1n7ax  3 роки тому +1

    --------- 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/cuda-11.3/nvvm/bin/* /usr/local/bin

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

    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

  • @s1n7ax
    @s1n7ax  2 роки тому +1

    --------- IMPORTANT ---------
    cuDNN installation has changed since this video. Please refer the instruction in the documentation
    docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#package-manager-ubuntu-install

  • @tungphamkhachoang1625
    @tungphamkhachoang1625 3 роки тому

    That was very helpful, thank you so much!

    • @anhdang2077
      @anhdang2077 2 роки тому

      ông cài theo được ko ông

  • @Abhishek_Satasiya
    @Abhishek_Satasiya 3 роки тому +2

    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'

    • @s1n7ax
      @s1n7ax  3 роки тому

      Someone else said it worked so you could be doing something wrong. Pay attention to errors. Easier to debug

    • @recepalpsaygl8484
      @recepalpsaygl8484 2 роки тому

      did you solve the problem

  • @guillermoalejandrobastianf7330

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

  • @aliesatgungor
    @aliesatgungor 3 роки тому

    Nice Video. Thanks

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

    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.

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

    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

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

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

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

      Try creating the virtual environment first. Use the virtual environment python and include paths. I think that should work.

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

      @@s1n7ax thanks a lot sir, it works 👍

  • @mohamedkhalilallaoui4747
    @mohamedkhalilallaoui4747 2 роки тому

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

    • @s1n7ax
      @s1n7ax  2 роки тому

      Change the include directory to virtual env's include dir

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

    Is it possible to install this with anaconda ?

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

      Not with cuda enable i guess

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

      @@s1n7ax Could you verify that CUIDA is working from the vscode? is that in my case it does not take the interpreter /usr/bin/python3 it only uses /usr/bin/python and when changing it throws an error (Ubuntu 22.04). I would like the only interpreter that uses ubuntu to be that of anaconda3