OpenCV GPU: Installing OpenCV with GPU for Python using VS Code and CUDA

Поділитися
Вставка
  • Опубліковано 14 лип 2024
  • Inside my school and program, I teach you my system to become an AI engineer or freelancer. Life-time access, personal help by me and I will show you exactly how I went from below average student to making $250/hr. Join the High Earner AI Career Program here 👉 www.nicolai-nielsen.com/aicareer (PRICES WILL INCREASE SOON)
    You will also get access to all the technical courses inside the program, also the ones I plan to make in the future! Check out the technical courses below 👇
    _____________________________________________________________
    In this video 📝 we are going to Install and Build OpenCV with GPU for Python. We are going to use NVIDIA Cuda to run our OpenCV programs on an NVIDIA GPU. We will go over the installation process for all the required programs and files. We will then use CMake to do the configuration of the OpenCV source files and then build them with GPU support later on. At the end of the video, I'll show how we can include the OpenCV library with GPU support in Visual Studio Code and see how we can verify that everything is set up correctly.
    If you enjoyed this video, be sure to press the 👍 button so that I know what content you guys like to see.
    _____________________________________________________________
    🛠️ Freelance Work: www.nicolai-nielsen.com/nncode
    _____________________________________________________________
    💻💰🛠️ High Earner AI Career Program: www.nicolai-nielsen.com/aicareer
    ⚙️ Real-world AI Technical Courses: (www.nicos-school.com)
    📗 OpenCV GPU in Python: www.nicos-school.com/p/opencv...
    📕 YOLOv7 Object Detection: www.nicos-school.com/p/yolov7...
    📒 Transformer & Segmentation: www.nicos-school.com/p/transf...
    📙 YOLOv8 Object Tracking: www.nicos-school.com/p/yolov8...
    📘 Research Paper Implementation: www.nicos-school.com/p/resear...
    📔 CustomGPT: www.nicos-school.com/p/custom...
    _____________________________________________________________
    📞 Connect with Me:
    🌳 linktr.ee/nicolainielsen
    🌍 My Website: www.nicolai-nielsen.com/
    🤖 GitHub: github.com/niconielsen32
    👉 LinkedIn: / nicolaiai
    🐦 X/Twitter: / nielsencv_ai
    🌆 Instagram: / nicolaihoeirup
    _____________________________________________________________
    🎮 My Gear (Affiliate links):
    💻 Laptop: amzn.to/49LJkTW
    🖥️ Desktop PC:
    NVIDIA RTX 4090 24GB: amzn.to/3Uc7yAM
    Intel I9-14900K: amzn.to/3W4Z5Cb
    Motherboard: amzn.to/4aR6wBC
    32GB RAM: amzn.to/3Jt2XVR
    🖥️ Monitor: amzn.to/4aLP8hh
    🖱️ Mouse: amzn.to/3W501GH
    ⌨️ Keyboard: amzn.to/3xUGz5b
    🎙️ Microphone: amzn.to/3w1F1WK
    📷 Camera: amzn.to/4b4Ryr9
    _____________________________________________________________
    Timestamps:
    0:00 - Overview
    2:30 - Download OpenCV Source
    3:37 - Anaconda and Python
    7:33 - CMake Configuration
    19:34 - Verify Installation and VSCode Setup Python
    Tags:
    #OpenCV #opencvGPU #NVIDIA #Cuda #ComputerVision #OpenCVpython #Python
  • Наука та технологія

КОМЕНТАРІ • 185

  • @NicolaiAI
    @NicolaiAI  Рік тому +1

    Join My AI Career Program
    👉 www.nicolai-nielsen.com/aicareer
    Enroll in My School and Technical Courses
    👉 www.nicos-school.com

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

    Thanks man, After many tutorial videos, and many text tutorial, This is the one is work !!
    Thank you !!

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

      Thank you for watching! I really appreciate it and glad that it helped u

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

    Dude, you are some kind of a genius. I could spend the rest of my life trying to figure all this out. All your steps worked flawlessly (I did run into some issues with cudnn but that had nothing to do with your instructions. Very well done!

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

      Thanks a lot for watching and the nice words! Glad that it helped u out

  • @yvrip
    @yvrip Рік тому +1

    Your video was very helpful! I was able to compile with no problems :) Thank you so much!

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

      Thanks for watching! Glad that it could help u

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

    En af det bedste tutorial for installation af python og cuda.

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

    thanks so much for this guide! helped me out a ton

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

      Thank you so much! Glad that it helped u out

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

    Thanks man, I am almost done installing this. rn I am waiting for another hour to complete this all.
    Tip for others : Strictly follow the requirements with versions (I mean everything VS, numpy, python, all of them). I tried this to install on vs 15 2017 and struggled alot. there were also many problems while installing because of too many python interpreters listed on environment vairables, later I had to remove all those which weren't needed like 3.9 and 2.7. finally now it worked. and almost there to complete all steps.

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

      Thanks for watching! Glad that u have installed it now

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

    Many thanks man! very well explained.

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

      Thank you very much! Really appreciate it

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

    Thanks so much for this, this is the first tutorial that helped me actually achieve this! :)
    For some reason, it doesn't work for OpenCV 4.5.4, but 4.5.2 will do just fine for now

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

      Thanks for watching! Really glad that i could help u

  • @Lou-hl9jo
    @Lou-hl9jo 2 роки тому +1

    Thank you for teaching. This video let me done 😀

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

      Thanks for watching! Glad that it could help

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

    Great video, thank you!

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

      Thank you very much! Really appreciate it

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

    Perfectly solves my problem!!!!

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

      Great! Glad that it could help u

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

    Thanks U, for your video, so detail, and true

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

      Thank you very much! Really appreciate it

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

    Thanks brother. video was very helpful.

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

      Thanks a lot for watching!

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

    Thanks a lot!

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

    Thanks 👌🏾🔥

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

    Thank you very much

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

      Thanks for watching! Hope u can use it

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

    Thank!

  • @lucario4399
    @lucario4399 3 роки тому +3

    Nice

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

    Thanks for this great tutorial! I have a question: To install this in an anaconda environment, i just have to use path of python file and libs files of this environment? I did it today and i had a problem: this only install the "Headless" version of opencv...

  • @ShittheswaranSelvakumar
    @ShittheswaranSelvakumar Рік тому +1

    Hi..Thank you so much for this video man.. your explanation for the Anaconda path saved me a lot.. that was so useful for me. but once i start with your command in Anaconda prompt with cmake... that was not working for me. I getting an error like "there is no directory like cmake" I got stuck here.. and what is the meaning of INSTALL in that command? can you please explain this..? I looking forward to your reply. Thank you.

  • @hsiehchiacheng7863
    @hsiehchiacheng7863 Рік тому +1

    I have created other virtual env(python3.8) in my anaconda but different python version with base environment (python3.9). I have changed path of PYTHON3_LIBRARY, but CMake always keep the same path with base environment. (By the way, I reinstall my the same anaconda version as you and it worked ! )

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

      Yeah having multiple python installations on ur pc can cause some problems

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

    Hi! Thank you for your video. Really helps.
    I wonder how can I install cv2 in other environments using the same Python version as compiled (3.8 for my case)?????

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

      Thank you very much! Really appreciate it. If u are going to use it in different or other environments u will unfortunately have to do the process over again unless u have the exact same versions and can copy it somehow, but that might cause more pain than doing it over again. After a couple times it takes 5 min to do 🙂

  • @Legi0n13
    @Legi0n13 4 дні тому

    and if the build folder is in a different place. how will conda add this package to the environment?

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

    at the end i've this error on anaconda "ModuleNotFoundError: No module named 'cv2'"
    I can't get it why ..could you help me please ?

  • @sohaibhaider
    @sohaibhaider 3 роки тому +3

    In case if I need to install it on another Anaconda Environment do I have to repeat the whole process again or (Since it takes lot of time) can I install it through some copy/paste or command... plz help, and thanks for the tutorial

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

      Thank you for watching. If u install another base version u should be fine. But if u want to create virtuel environments then u would have to do it over again

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

      @@NicolaiAI do it over again.... noooooooooooooooooooooooooooooooooooooo

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

    Thanks for your video. I'd like to know if there is any documentation one can refer to if he wants to find how to use these cuda based opencv functions using Python. I guess this still hasn't been well documented because it's not common practice yet, but perhaps you know some useful sources one can refer to in this regard? Thanks.

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

      Thanks for watching! In the OpenCV official documentation they actually have the python method for cuda as well. I'll create a tutorial both in c++ and python with the cuda module, so stay tuned in the near future here

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

      ​@@NicolaiAI that's great news!

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

    Hi sir, Idk what did I do wrong. My cmaketarget after i build the install, it only show 1 success with 0 fail. In your case its 2 success. Then, when I try verify whether I installed opencv or no, it shows no. (cannot import cv2). Do you know problem like this this?

  • @MS-fk8ec
    @MS-fk8ec 3 роки тому

    All configure and build steps went smooth but importation of cv2 fails (Also I got quite a few errors in the Release command on CMD) Please Help?

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

    hello, I'm trying to install it with python 3.9, but when I type cv2.__version__ it gives version 4.5.5. opencv is not installed in anaconda

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

    I'm able to get through the entire build process but once I try to import it in python I just get errors when I import it "ImportError: DLL load failed while importing cv2: The specified module could not be found. ". It seems that the proper files have been generated in the site-packages folder and my build directory. I've been at this for two days now.

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

    Hello i've gtx 1650 ti on my notebook when i try to tick option WITH_CUDA it gives me an error what should i do ?

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

    Thank you so much for the amazing tutorial!! I might have a stupid question though...as I'm completely new to this, but what is the difference between this method and just downloading everything with 'pip' ??

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

      installing opencv through pip will not provide you with GPU access. GPU functionalities are only enabled by installing opencv from source. In this case he added those functionalities to a specific python pre-built environment called anaconda but you can build opencv into your own virtual environment as well.

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

    Hey, my generic Python installation has version 3.7 while my anaconda one has version 3.6. In CMAKE I specify the path to the anaconda 3.6 version, but it keeps configuring it to 3.7 because it keeps referencing the "/libs/python37.lib" file in generic installation even though I specify that file in anaconda3.... Ultimately that leads to import failure with CV2. Any ideas on how to make sure it is linking to the correct Library in the config file?

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

      you solved it?

  • @eden3616
    @eden3616 2 роки тому +4

    When I use cuda.printCudaDeviceInfo(0), I got the error (-216:No CUDA support) The library is compiled without CUDA support in function 'throw_no_cuda'

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

      Looks like the cmake configuration hasn't been done correctly :(

    • @RaviSingh-qd5pz
      @RaviSingh-qd5pz 2 роки тому

      Have you solved this issue now? Can you help me with it

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

      Same problem

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

      yeah same here

  • @Tuncaycortez
    @Tuncaycortez Рік тому +1

    why didn't we install cuda and cudann

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

    Hy!
    I got a problem to include python3 into my project.
    I've done the same operation, but it's still unavailable, and I don't know why.
    Could you try to help me ?

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

    Traceback (most recent call last):
    File "", line 1, in
    cv2.error: OpenCV(4.9.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' I'm getting this error, how to solve this

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

    Great vid, just a question, I'm having trouble where the anaconda prompt shows different version of python which is 3.9.7 but I've installed the python 3.9.9..I can't import the cv2 because of it. How do I solve this? Would appreciate any response, thanks!

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

    Visual Studio 16 2019
    could not find any instance of Visual Studio. I already have visual studio

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

    Thanks!

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

    Hi, thanks for the video. I am getting the following error:
    CMake Warning at cmake/OpenCVFindLibsPerf.cmake:45 (message):
    OpenCV is not able to find/configure CUDA SDK (required by WITH_CUDA).
    CUDA support will be disabled in OpenCV build.
    To eliminate this warning remove WITH_CUDA=ON CMake configuration option.
    Call Stack (most recent call first):
    CMakeLists.txt:712 (include)
    But I have installed CUDA and cuDNN. Any ideas as to why? Thanks

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

      I had this this issue for the entire day, I was able to finally making it work with OPENCV 4.5.5 CUDA 11.4 and cuDNN 8.2.4

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

    Hello, the python libraries : NO and install path :- , do you know how to fix it? i have already tried manually written the values but still wont work

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

      are u using anaconda? Try with that then and choose add to path during installation

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

      @@NicolaiAI i reinstalled anaconda and cmaker, all good now thanks for the reply !

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

      Great!

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

    Thank you for your tutorial. I have a question if installed successfully then every task with OpenCV will compute on GPUs, rights? (example cv2.bilateralFilter())

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

      Thanks for watching! U will need to upload the frames/images to the GPU before calling the functions and then it will run og the GPU. I have some examples here on the channel under the OpenCV GPU Cuda tutorial

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

      @@NicolaiAI thank you very much

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

      @@NicolaiAI what a about training a model. Will it train the model with gpu?

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

      @@ahuman5383 u can't train models with opencv only deploy

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

      @@NicolaiAI oh so when I train the model like for drowsiness detection, it will use cpu? Unless i use google colab?

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

    If I want to downgrade opencv from 4.5.4 to 4.5.3, do I have to uninstall 4.5.4 first? Because I am not sure how I uninstall a package that wasn't installed from pip. Currently, running these commands in cmd: 'import cv2' and 'cv2.__version__' returns 4.5.4, if I follow these exact steps again and build 4.5.3 will 'cv2.__version__' change to 4.5.3?

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

    15:06 When I select all necessary for Cuda and configuration show error "error in configuration process project files may be invalid" how can I solve this ??

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

      Sounds odd, it will work if u do everything step by step from the video. Seems like there is something wrong with the files

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

      I do have the same issue. Do you have a fix? :/

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

      Had the same issue. Fixed it by installing the next workloads in Visual Studio Installer:
      - Desktop development with C++
      - Universal Windows Platform development

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

    On the numpy part I get "ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
    daal4py 2021.3.0 requires daal==2021.2.3, which is not installed.
    numba 0.54.1 requires numpy=1.17, but you have numpy 1.22.2 which is incompatible." Is this okay?

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

    I have installed open cv 4.5.2 in vs code .Now what should I write to import it like import cv2 or something else. Plz reply...

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

      I go over all the steps in the video and show it in vscode

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

      @@NicolaiAI Oh yes I got it . Thanks buddy ❤️

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

      Happy to help!

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

    When I ran "cmake --build "C:\your_path\build" --target INSTALL --config Release", it kept showing me this:
    warning #1394-D: field
    of class type without a DLL interface used in a class with a DLL interface

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

    I always get this error :
    D:\OpenCVGPU\opencv-4.x\modules\core\include\opencv2/core/cuda/common.hpp(101,27): error.....and so on (There are so many error related to common.hpp)
    Does anybody know how to fix this? (I am using Windows 11)

  • @mostafael-sayed4244
    @mostafael-sayed4244 3 роки тому +2

    12:17 after i have conf for the second time error has gone but nothing have changed unavilable variables still the same (java,pyth2,pyth3)

    • @mostafael-sayed4244
      @mostafael-sayed4244 3 роки тому

      @The coding Library Dude i know what is the problem ( Cmake cant find LApack ) i have already downloaded lapack but i dont know what i should do

    • @MS-fk8ec
      @MS-fk8ec 3 роки тому

      Did you find a solution? I have the same problem

    • @mostafael-sayed4244
      @mostafael-sayed4244 3 роки тому

      @@MS-fk8ec I had python 3.7 installed so i put path to it and dat cuz the problem , you have to install anaconda

    • @MS-fk8ec
      @MS-fk8ec 3 роки тому

      @@mostafael-sayed4244 I do have Conda, removed the other (non Conda python) yet still faced the issue, it turned I out it the Conda installation had to use Conda as my primary python

    • @mostafael-sayed4244
      @mostafael-sayed4244 3 роки тому +1

      @@MS-fk8ec yeah you should put anaconda python in top in enviornment

  • @user-no8iq3me1c
    @user-no8iq3me1c 3 роки тому

    I've got a problem when I'm building & installing opencv from cmake : the build can work but it doesn't installed , plz help and thanks for the great tutorial !!

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

      Hi make sure to follow all the steps one by one and then it will work for u. Thanks for watching!

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

    Thank you, everything worked perfectly until I typed this command: cmake --build "C:\Users\User\build" --target INSTALL --config Release
    and it popped up error like this.
    'cmake' is not recognized as an internal or external command,
    operable program or batch file.
    Could you help my with this. Thank you again sir!

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

      Make sure u chose to add cmake to ur path during installation of cmake or else u will have to add it to the path urself

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

      @@NicolaiAI thank you sir.

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

      Happy to help! Thanks for watching

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

      Today I've successfully installed and followed all the steps but when I run my code it turned out:
      "Could not load library cudnn_cnn_infer64_8.dll. Error code 126
      Please make sure cudnn_cnn_infer64_8.dll is in your library path!"
      Could you help me with this, sir. Thank you.
      By the way my Cuda is 11.5 and cuDnn 8.3.

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

    Will the GTX 1650 graphics card work for me or should I go with the i5-9300h?

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

      Almost all GPUs would be an improvement over a CPU

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

    i did everything like you showed, but i can't get python3 excluded from "Unavailable" under OpenCV modules

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

    how can i go this with anaconda environment? (i have a problem because latest anaconda version comes with python version 3.9 in base environment)

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

      Have you found a solution?

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

      I built it with python 3.6 base environment then changed all the values for python in cmake, which makes it so it is built for the anaconda environment instead. Another thing you can try out is editing the PATH in environment variables and add the path to anaconda's python.

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

    It did not work for me. No module named 'cv2'. What did I do wrong?

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

      Not installed properly then since it can't find it at all. Make sure to choose the correct interpreter in vs code too

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

    command is giving error msbuild error MSB1009: Project file does not exist.

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

      please help. Thanks in advance

    • @archheresiarch9342
      @archheresiarch9342 2 роки тому +4

      You forgot to click "Generate" inside of Cmake after the configurations were set.

    • @yvrip
      @yvrip Рік тому +1

      @@archheresiarch9342 Thanks for this, it helped me :)

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

    When i type in cmd prompt - cmake build “C:\Users\mike\opencv-4.5.2\build” -target INSTALL - config Release. I get error cmake is not recognizable as an internal/external command. I saw in comments someone had problem also but unsure on fix. My CMake is installed in defaulf MyPrograms.
    How can i fix this please?

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

      Is cmake in ur path environmental variables for all users? Are u in a standard command prompt og anaconda prompt

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

      @@NicolaiAI command prompt. I typed this set PATH=C:\Program files\CMake\bin\;%PATH% per google and new error is MSBUILD: error MSB1008: only one project can be specified.

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

      @@NicolaiAI standard cmd prompt and unsure i used default install settings on cmake

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

      Think u have to check off a box during installation to add it to the path

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

      Is there a workaround or i have to start over?

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

    10:43 It doesn't work for me, idk why, please help me

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

    How do I do this without nvidia graphics card? (Intel UHD 630)

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

      U simply can't

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

      @@NicolaiAI Awww, I have to wait for gpu prices to come down.

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

    Hello, during installation few files throws up an error " #error:
    This file was generated by an older version of protoc which is (compiling source file C:\Users
    itis\Opencvpython\open
    cv-4.5.2\modules\dnn\misc\tensorflow\attr_value.pb.cc)". Please help me out and let me know what to do

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

    After doing the steps shown in 15:07 , it says Error in configuration process project files might be invalid.
    and i notice it says
    NVIDIA CUDA: NO
    CUDNN: NO

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

      I do have the same issue. Do you have a fix? :/

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

    cant use gpu with amd gpu¿?

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

      Nope u will need a cuda GPU

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

    Hi, I followed the steps till the end. But I receive error when I write import cv2 to anaconda prompt. It debugged ModuleNotFoundError.

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

      Addition to this there is no config 3.9 file in cv2 directory.

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

    I did realize Justin Bieber was so knowledgeable about these things haha

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

      Haha thanks for watching! Really appreciate it

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

    ❌"... fatal error c1189 This file was generated by an older version of protoc which is (...) [...]" while building with cmake in the command prompt ❌
    After hours wasted trying the impossible to solve this error I was FINALLY able to solve it by removing the "protobuf" library from my Anaconda environment by simply executing: "conda remove protobuf" from Anaconda Prompt (this took a few minutes for Anaconda Prompt to execute).
    So, if you're following the tutorial step-by-step you will NOT encounter this problem, but if like me you already have Anaconda installed, check weather you have the library "protobuf" in the Anaconda venv where you are building OpenCV. In this case, remove it. I tried many other workarounds but this is the only one that worked. If then you need to have "protobuf" in your venv you can always re-install it.
    And of course, thank you Nicolai for the great tutorial, it really helped dealing with this tedious installing procedure 😊💖

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

    It sucks having spent 1-2 hours into this and after everything, seeing "No module named cv2"". :/

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

      If u did every step correct and check the python path during configuration in cmake it only takes 5 min. Make sure it detects python before installing

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

    Does this work with AMD gpus?

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

    Hello, I have a problem and I can't fix the problem. I have sent you an email. Could you please read my mail please? 😭😭😭😭

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

    A very interesting OpenCV video. I am curious about using OpenCV on the new Orange Pi-5 and hope that it will run faster than the Raspberry Pi-4? Any suggestions would be helpful. ...Amazon $99.99... Orange Pi 5B 4GB Rockchip RK3588S 8 Core 64 Bit Wi-Fi6, BT5.0 Single Board Computer with 32GB eMMC, 2.4GHz Frequency Open Source Development Board Run Orange Pi OS, Android, Debian, Ubuntu (OPi 5B 4G32G) ARM Mali-G610 MP4 GPU 😎 Thank you.

  • @user-xm1ch6cq9i
    @user-xm1ch6cq9i Рік тому +1

    nooooo, after the cmake compile process,it is not install to the anaconda python🥲correctly .and there's no install file in the build library,(using lateset cmake and visual studio version

  • @TheMalvernator
    @TheMalvernator 2 місяці тому +1

    Great video and easy to follow thanks. Compiled fine thanks - Was just a bit confused with cuda version vs computer compatibilty version. Here's a link if anyone needs to find their version en.wikipedia.org/wiki/CUDA#GPUs_supported

    • @NicolaiAI
      @NicolaiAI  2 місяці тому

      Thanks man! Happy that it worked out

  • @mj9207
    @mj9207 Рік тому +1

    is it just me or does it just stop installing midway and instead of ending with "installing...: blah blah blah" , it just ends with something like "transpose.cu"

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

      U should just let it run. It can take 2 hours+

    • @mj9207
      @mj9207 Рік тому +1

      @@NicolaiAI thanks for replying! I did, I left it for 4 hours several times. But I think it was an error when configuring in cmake anyways because it gave me an error that said “opencv does not recognise MSVC:”1932”” 1932 being the version for vs 2022. So I am currently trying to download vs 2019

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

      @@mj9207 I think I did it with 2019

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

    PLZ. HELP. ERROR WHILE INSTALLING
    CUSTOMBUILD : nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures a
    re deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). [F:\elvict
    o\cmake\4.5.2\build\modules\world\opencv_world.vcxproj]
    nvcc fatal : Could not set up the environment for Microsoft Visual Studio using 'C:/Program Files (x86)/Microsoft V
    isual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/../../../../../../../VC/Auxiliary/Build/vcvars6
    4.bat'
    CMake Error at cuda_compile_1_generated_gpu_mat.cu.obj.Release.cmake:220 (message):
    Error generating
    F:/elvicto/cmake/4.5.2/build/modules/world/CMakeFiles/cuda_compile_1.dir/__/core/src/cuda/Release/cuda_compile_1_ge
    nerated_gpu_mat.cu.obj

  • @srinivasans6758
    @srinivasans6758 2 роки тому +4

    even though i upgraded numpy... still python3 is unavailable what should i do....?

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

      Are u using base python installation or anaconda?

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

      @@NicolaiAI anaconda

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

      Do u have conda in ur environmental variables? And can u see the path to the python installation in the cmake configuration as i show in the video?

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

      @@NicolaiAI yes and i found that it could not able to find the pkgconfig in bulid folder here ......VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
      OpenCV Python: during development append to PYTHONPATH: C:/coding/opencvpyhton/bulid/python_loader
      Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
      Module opencv_alphamat disabled because the following dependencies are not found: Eigen
      Caffe: NO
      Protobuf: NO
      Glog: NO
      freetype2: NO
      harfbuzz: NO
      Julia not found. Not compiling Julia Bindings.

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

      OpenCV Python: during development append to PYTHONPATH: C:/coding/opencvpyhton/bulid/python_loader
      Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)