Build and Install OpenCV With CUDA GPU Support on Windows 10 | OpenCV 4.5.1 | 2021

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

КОМЕНТАРІ • 340

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

    ► *My Other Tutorials:*
    YOLOv4 On Android Using TFLite
    ua-cam.com/video/YzAjAS6Os8c/v-deo.html
    Custom YOLOv4 Object Detection with TensorFlow and TFLite
    ua-cam.com/video/vzTCJM18uoM/v-deo.html
    Darknet YOLOv4 Custom Object Detection: Part 2 (Training YOLOv4 Darknet)
    ua-cam.com/video/-NEB5P-SLi0/v-deo.html
    Darknet YOLOv4 Custom Object Detection: Part 1 (Preparing Custom Dataset)
    ua-cam.com/video/sKDysNtnhJ4/v-deo.html
    YOLOv4 Object Detection with TensorFlow, TFLite and TensorRT
    ua-cam.com/video/tCmC7nyfJp8/v-deo.html
    Darknet YOLOv4 Object Detection for Windows 10 on Images, Videos, and Webcams
    ua-cam.com/video/FE2GBeKuqpc/v-deo.html
    Real Time Object Detection on Webcam and Videos Using OpenCV With YOLOv3 and YOLOv4 | Windows Linux
    ua-cam.com/video/FjyF03uawsA/v-deo.html
    Build and Install OpenCV 4.4.0 with CUDA (GPU) Support on Windows 10
    ua-cam.com/video/tjXkW0-4gME/v-deo.html
    Install TensorFlow GPU and PyTorch with CUDA on Windows 10 Anaconda | CUDA 10.1 cuDNN 7.6
    ua-cam.com/video/PlW9zAg4cx8/v-deo.html
    Real-time Multiple Object Tracking with YOLOv4 TensorFlow and Deep Sort | Linux, Windows
    ua-cam.com/video/GagII5PAeKg/v-deo.html

    • @jesilk.b8920
      @jesilk.b8920 3 роки тому

      well explained bro.... but i'm getting an error while configure
      CMake Error at CMakeLists.txt:107 (enable_language):
      No CMAKE_C_COMPILER could be found.
      can you help me?

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

      Thank you, but after following the steps you provide i am getting this error: Traceback (most recent call last):
      File "", line 1, in
      File "C:\Users\leonr\Anaconda3\lib\site-packages\cv2\__init__.py", line 102, in
      bootstrap()
      File "C:\Users\leonr\Anaconda3\lib\site-packages\cv2\__init__.py", line 90, in bootstrap
      import cv2
      ImportError: DLL load failed while importing cv2: The specified module could not be found.

  • @andrespereira4852
    @andrespereira4852 3 роки тому +6

    THANK YOU SO MUCH DUDE!!! You really made my day. Now I can use my gpu for testing some scripts with yolo in almost real time. You are the best. Thank you for making a second chance videos for us the non-lucky ones lol. You really deserve your likes

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

      Thank you for the appreciation. I am glad it was helpful to you.

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

    This tutorial saves time and (more important) nerves! :) Big thanks for the effort! It took 50 mins on regular 7200rpm HDD

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

    Everything was executed well. But when I ran the test script file I got more speed when using the CPU.
    Here is the output.
    CUDA --- 1.0304639339447021 seconds ---
    CPU --- 0.9209995269775391 seconds ---
    My PC Specs are CPU - AMD Ryzen 9 5900x and GPU - 3080 Vision.

  • @majstrstych15
    @majstrstych15 3 роки тому +4

    I don't understand why it is so complicated...

  • @mickeytish
    @mickeytish 3 роки тому +4

    I had a problem installing opencv due to the location I chose to install opencv from. I chose to leave it at downloads which was a mistake. To avoid similar problem, follow the video and install it from C drive.

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

    😎 THAAANK you so much! I just spent two weeks trying to get various configurations for environments to run on Ubuntu without success. Your videos worked without too many issues back on Windows. Though I had to build Darknet based on what "The AI Guy" instructed.
    Working Specs:
    Windows 10
    GTX 1070
    GPU Driver: 456.71
    CUDA: 11.0.194
    cuDNN: v8.0.5.39
    NSight: 2020.3.2
    OpenCV + contrib: 4.5.1
    cMake: 3.20.1
    Anaconda 3: 2020.11
    Visual Studio Community 2019
    PS: If you want to see GPU/CUDA utilization in the task manager you can change the graphs with their drop-down menus in their top left corners.

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

      I am glad it was helpful. And kudos to "The AI Guy".

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

    Thank you Thank you Thank you. this is the clearest video so far. You solved my no module error after countless frustrating hours.

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

    dude, i did everything, i successfully switched to gpu, but anaconda prompt does not work, only IDE works. thank you so much for everything you are my hero :D

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

    Thank you so much!! It worked. And initially, I used native Python. It threw an error saying "Couldn't find some dll" so I switched to Anaconda and it worked! May be path issues I guess. But it worked. Thanks again!

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

    Thank you. Only guide that really works. Every other guide didn’t, holy moly! Thanks! Saved my life

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

    the installation worked in the base environment perfectly, but when I tried it in the virtual environment when I entered "import cv2" I get the following message: "ImportError: OpenCV loader: missing configuration file: ['config-3.8.py', 'config-3.py']. Check OpenCV installation." -- how do I fix this?

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

    Hey TheCodingBug, nice to meet you! I just found your channel and subscribed, love what you're doing!
    I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your UA-cam Journey, can't wait to see you succeed! Your content really stands out and you've put so much thought into your videos!
    Cheers, take care, and keep up the great work!

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

      Thank you for the appreciation. It's great to see people making a difference and spreading data literacy.

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

      @@TheCodingBug No problem, thank you for the kind words as well!

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

    Still showing unavailable for python3 in CMake. Please help me to solve it.

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

    I followed the instructions as the video, but python3 kept appearing as unavailable. So I uninstalled anaconda and installed it again, but this time selecting the advanced option "Add Anaconda3 to my PATH environment variable". Then I followed the rest of the video and now it is working perfectly.

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

      I hope this will be helpful for someone else.

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

    Great tutorial!
    But, I want to fill the gap that you missed on 8:55.
    Before you upgrade numpy, you should install the numpy first at the environment, after that, you can upgrade it.
    I missed that part, which confusing me little bit at first, because no numpy at my environment.
    Anyway, I subs you tho!

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

      Thank you for this information.

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

    i had an error when i tried to configured in cmake. The eroor is "error in configuration process, project file may be invalid" what should ı do?
    i installed visual studio a while ago. So i dont knowif I had press the c++ part. is it because of that? I looked up and ı installed visual studio 2019 in my D server. İs it a problem? because cmake is in my C: server.

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

    If you've got error like this "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.0\include\crt/host_config.h(143): fatal error C1189: @/error: -- unsupported Microsoft Visual Studio version! Only the versions between 2013 and 2017 (inclusive) are supported!" ,go to Program Files -NVDIA GPU Computing Toolkit CUDA -version -include and crt folder. In host_config.h file change line 141 #if _MSC_VER < 1700 || _MSC_VER >= 2000 instead of #if _MSC_VER < 1700 || _MSC_VER >= 1920.

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

      Use same versions of visual studio, CUDA and cuDNN as shown in the video.

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

    If anyone has problems at 4:25, where you have numpy 1.19.2 and still the message "Unavailable: java python2 python3" appears, install numpy 1.19.2 through pip ( pip install numpy==1.19.2 ) instad of conda. At least it worked for me. Also, upgrading/just installing numpy will upgrade/install to 1.20.1, which is not compatible
    I wasted a few hours figuring this out

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

      I did that. Still have same problem. What the problem should be?

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

      You solved that problem

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

    Thanks, but i'm stuck here:
    "C:\Program Files\CMake\bin\cmake.exe" --build "C:\OpenCV_Build\build" --target INSTALL --config Release
    Unexpected token 'build' in expression or statement.
    please help!

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

    Thank you so much for the clean up at the end very very very very helpful and useful!!

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

    You must have had previous installations as from a fresh Win10 installation this tutorial doesnt work. DLLs are missing. For example when installing Anaconda you need to add it to the path for those api dlls.

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

    I am getting MSBuild error project file not found. please guide

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

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

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

    Hi, I get this error although I try to do exactly as you do:
    CMake Error at modules/dnn/CMakeLists.txt:39 (message):
    DNN: CUDA backend requires cuDNN. Please resolve dependency or disable
    OPENCV_DNN_CUDA=OFF
    Call Stack (most recent call first):
    modules/world/CMakeLists.txt:13 (include)
    modules/world/CMakeLists.txt:32 (include_one_module)

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

      The cuDNN and CUDA versions do not match.

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

    For those who have not found python 3 even after updating numpy I found same error but it was due to my anaconda path was not set in system environment variables when I did that it installed properly and opencv was build properly without any error

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

      I hope it helps someone else.

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

      @@TheCodingBug Thankyou for such great effort it was the best tutorial for opencv cpu installation short and clear👍keep up the good work

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

      hi how did you do it?

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

      @@kristelquezon4624 I did everything as mentioned in the video but build for python was still unavailable so when I completed the whole process i found that in the end the python folder would be missing which would contain the main file

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

      Then after that I tried to recheck what was missing and I found that my anaconda path was not there in system environment variable so when I added that the error disappeared you can just search environment variable in your windows search bar you will find two things i found two things environment variable for lenevo(I have legion 5 pro) and below was system variable try to add your required python path to 'system' variable

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

    After clean installation...
    I am facing this error:
    ImportError: DLL load failed while importing cv2: The specified module could not be found.

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

    Nice tutorial. It is worked and I resolved my problem to implement opencv with gpu.

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

    Thanks man...I follow your tutorial and it works..

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

    helping others out. don't use the console command he gives. (if it's not populating the install folder)
    instead do this in the build folder (assuming the install folder should be in the build folder)
    cmake --build . --config Release
    cmake --install . --config Release

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

    instead of anaconda3 it shows this path C:/Users/Jatin/AppData/Local/Programs/Python/Python37-32/Lib/site-packages
    how to handle?pls help

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

      Looks like you have multiple versions of Python. You can change all the paths to Anaconda.

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

    MSBUILD : error MSB1009: Project file does not exist. what is the error in CMAKe

  • @science.20246
    @science.20246 10 місяців тому

    al steps fine , but i dont find the python3 folder inside lib, no pyd file of python3 that it is checked and all paths are done

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

    Hi, I need help... Its really emergency
    CMake Error at cuda_compile_1_generated_gpu_mat.cu.obj.Release.cmake:220 (message):
    Error generating
    C:/OpenCV_Build/build/modules/world/CMakeFiles/cuda_compile_1.dir/__/core/src/cuda/Release/cuda_compile_1_generated
    _gpu_mat.cu.obj
    I'm getting this error when I run this command: "C:\Program Files\CMake\bin\cmake.exe" --build "C:\OpenCV_Build\build" --target INSTALL --config Release

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

    Thank you so much for your explanation.. it helps a lot and saves a lot of time.

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

    Yes, this tutorial worked. Thanks a lot.

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

    Hi
    7:29 I have python3 and Release
    but it folder is empty what should i do now

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

    This Tutorial Helps me a lot! Thank you so much!😊

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

    @TheCodingBug had to use cuda 11.2 due to rtx 3070 showing some warnings with DLL when installing.
    Eventually got to the point where I import cv2 in gpu environment still says no module named cv2 followed all steps with clean plate and apart from warning in cmake about wrong version of python that asked me to add something to path file there were no other problems. Any idea how to solve it?
    PS. import cv2 in python does work without gpu ve

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

    thanks for explaining this so clearly, it's really helpfull 🤗

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

    Thank you very much bro

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

    Thanks!! Finally I having be able to run it.

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

    Awesome, brief and applied.

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

    Everything worked and installed perfectly in my vir env but when I try your test_script.py it returns following error:
    (C:\Users\Dell\MyEnv) C:\Users\Dell> python test_script.py
    Traceback (most recent call last):
    File "test_script.py", line 13, in
    cuMat1.upload(npMat1)
    cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-i1s8y2i1\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'
    also when I try cv2.cuda.getCudaEnabledDeviceCount() it returns 0

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

    Hi, you are my last hope, I am using OpenCV 4.4.0 with numpy 1.20.0, trying to bind tensorflow version 2.4.0 and it gives me an error (NotImplementedError: Cannot convert a symbolic Tensor (random_zoom/zoom_matrix/strided_slice:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported), but it also works fine on numpy version 1.19.2, but from this version CV2 crashes with an error (RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd). Please tell me what could be the problem?
    python 3.8.5

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

    I am getting this error in cmake :
    CMake Error at modules/dnn/CMakeLists.txt:45 (message):
    DNN: CUDA backend requires cuDNN. Please resolve dependency or disable
    OPENCV_DNN_CUDA=OFF
    Call Stack (most recent call first):
    modules/world/CMakeLists.txt:13 (include)
    modules/world/CMakeLists.txt:32 (include_one_module)
    CUDA is installed
    CUDNN is installed and added to enviroment variables
    nvcc --version is working

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

    In my case, all going smoothly but the cmkae cmd stop at this "opencv_test_core SSE4_2.vcxproj -> C:\FILES\OPENCV_BUILD\Build\modules\world\opencv_test_core SSE4_2.dir\Release\ope ncv_test_core_SSE4_2.lib" and no other explanation, just stop at that. In a video the command prompt say "installing" when done but mine different. Anyonw how to solve it? Thank you

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

    That was very helpful, thank you so much!

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

    i have entered this code to cmd "C:\Program Files\CMake\bin\cmake.exe" --build "C:\OpenCV_Build\build" --target INSTALL --config Release. But i got error. Because Cmake want to create a file in Windows apps folder. But this folder is read-only and i cant change it. I checked everything i did. Can you help me?

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

      Start cmd as administrator and try again.

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

      @@TheCodingBug i have already tried it

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

    First of all nice tutorial. Was frusturated for 3 days. The only problem was when I tried the test_script.py on my RTX3060 notebook CPU time was lesser than CUDA

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

      same issue here what did you do for sloving that issues

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

    when i install opencv in virtual environment it shows error
    "C:\openCV_build\opencv-4.5.1\modules\python\src2\cv2.cpp(33,10): fatal error C1083: Cannot open include file: 'numpy/nd
    arrayobject.h': No such file or directory [C:\openCV_build\build\modules\python3\opencv_python3.vcxproj]"
    what should i do.

  • @mrkewi1
    @mrkewi1 11 місяців тому

    thanks bro. you're awesome!

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

    Hi, my CMake is using the normal python on my system and not the Anaconda's python.exe. Is there a way to configure cmake to use anaconda python?

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

      Yes. Change all the paths to Anaconda ones. See the part where I changed paths for virtual environment.

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

      @@TheCodingBug oh thanks!! after changing the paths, do I configure again or just generate?

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

      @@mallvin2000 Configure again.

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

      @@TheCodingBug Thanks!! Last question sir sorry, do I clear the cache then configure or just click configure again?

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

      @@mallvin2000 clear the cache first.

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

    hi, when I tried installing opencv using cmake, I get an error saying "error in configuration process, project files may be invalid". How to fix this please help.

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

    C:\Program' is not recognized as an internal or external command,
    operable program or batch file.
    sir this error occurs..how to fix it

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

    Thanks dude ! :) This is really nerves saving.

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

    how do i include the paths needed in my project on pyinstaller? i always get these errors after the .exe has been built regarding the opencv;
    " File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
    File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
    File "cv2\__init__.py", line 102, in
    File "cv2\__init__.py", line 62, in bootstrap
    File "cv2\__init__.py", line 60, in load_first_config
    ImportError: OpenCV loader: missing configuration file: ['config.py']. Check OpenCV installation."
    how do i fix these?

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

    If you have module not found error, you may need to launch python from anaconda terminal using "python" instead of the shortened "py". I had it installed properly, but spent forever trying to fix it because of this stupid thing. Apparently py does not launch the anaconda activated or anaconda base environment, but launches some other version of python. Hope this helps someone else.

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

      Thank you for sharing your experience. Maybe it'll help someone.

  • @ytchannel4556
    @ytchannel4556 9 днів тому +1

    Hey coding bug I wanted to ask does the old version of gpu like GTx 1050 will work on this ? please reply its urgent need

    • @TheCodingBug
      @TheCodingBug  9 днів тому

      At the time of recording this tutorial, it worked on GTX1050 amd GTX1060. Not sure now after release of new versions of opencv, cuda, and visual studio.

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

    I am not getting cv2 in site packages...can you pls tell what's the problem

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

    My problem is when chosing cuda_arch. it dosen;t have any version to selecting. When I select the version fit to mine. it doesn't;t work. Error happened. How to solve?

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

    When I change the python path to my virtual environment it doesn't update the python version so it tries to install 3.7 on my 3.9 virtual env.

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

    By following this video also i was not able to do "import Cv".. .then i reinstalled Anaconda by choosing the Path to the environment variable and then finally i got " import Cv". currently i am using python 3.10.9..with this version i tried to create a Virtual environment.. but i am facing error here..
    the error is like :
    (base) C:\Users\FHW>conda create -n opencv_gpu python-3.10
    Collecting package metadata (current_repodata.json): done
    Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
    Collecting package metadata (repodata.json): done
    Solving environment: failed.
    can you please help me with this ?

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

    Thank you!
    Saved us

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

    Worked perfectly. Please mention how long it takes to build as it took me more than an hour and I thought of stopping it in between, glad I didn't do it. Thanks

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

      It takes 45 minutes on my SSD and 1.8 hours on HDD.

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

      @@TheCodingBug it takes nearly 4 hours on a Core i7-6850K with NVMe SSD and 64 GB of RAM. What are you guys running ? 64-core EPYC's ???

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

      @@TheNefastor 4 250GB SSDs in RAID0 configuration.

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

      @@TheCodingBug What's your processor ?

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

      @@TheCodingBug I found the "problem" : you forgot to mention one cmake setting. I was building for ALL supported CUDA architectures instead of the latest (8.6). Changed that and now I compile in less than 30 minutes. Seems like you should mention it.

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

    Hi, @TheCodingBug, I followed your all steps, but last command didn't generate cv2 library. and and during running, I found a warning message. "error C2065: 'DIFFERENT_SIZES_EXTRA' : undeclared identifier [C:\OpenCV_Build\build\modules\world\opencv_test_cudawarping.vcxproj]". Kindly resolve my issue.

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

    cmake-gui wont recognize my numpy lib even though I upgraded it

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

    got as far as to upgrading numpy which was succesfull then I hit cmake configure but it doesnt change anything while compiling I see "no numpy module"

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

    Thanks for the great tutorial. Is there any performance change between with and without GPU?

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

      Yes.
      ua-cam.com/video/FjyF03uawsA/v-deo.html
      ua-cam.com/video/GXcy7Di1oys/v-deo.html

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

    i have python 3.7.0 and cuda 10.1 in windows 10.I got error in cmake install in command prompt

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

    I am trying to configure OpenCV 4.6 in the virtual environment. However, the program is unable to detect numpy even after running the --upgrade command of numpy to the latest version. I even checked whether numpy is installed in the virtual environment, even after numpy being installed, CMake is still not detecting the numpy version in the NUMPY_INCLUDE_DIRS section. After several attempts, I even manually copied the numpy's installed path in the virtual environment to the NUMPY_INCLUDE_DIRS slot to see atleast if that works. It still won't detect numpy's version. It still mentions python3 bindings unavailable. How to solve this?
    Your assistance on this would be greatly beneficial.

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

    I followed the steps as mentioned in the tutorial. But opencv build was not available for python3 (3:40 in the tutorial). I deleted build and configured again and now opencv build is available for python3. Even I did not downgrade numpy as specified in the tutorial. Hope this helps for someone !!!

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

      i did it but still doesn't available for python3 however i've tried every way

  • @skshandilyamari
    @skshandilyamari 11 місяців тому +1

    you just explained the procedure, but not why you are doing what you are doing, would be great if you did

    • @TheCodingBug
      @TheCodingBug  11 місяців тому

      There are some functions in cv2 that can use GPU acceleration. You can see it in action in my other tutorial "Face Detection Using OpenCV with CUDA GPU Acceleration"

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

    c1xx : fatal error C1356: mspdbcore.dll est introuvable (not found))) after executing the command in description

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

    Hi there, it seems even after upgrading numpy the openncv module shows python3 unavailable. how to resolve this?

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

      same problem here

    • @RobertJohnson-xg5kh
      @RobertJohnson-xg5kh 3 роки тому +2

      @@sebastianm3505 I had to reinstall Anaconda (and I chose to include the path during the installation, not sure if that was necessary). I had two versions of Anaconda installed somehow. I had upgraded Anaconda and it showed up twice in Windows Apps and Features so I uninstalled both and then reinstalled. Anyways, that worked for me. YMMV.

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

      @@RobertJohnson-xg5kh thanks that was solved with clean installation all steps again. Still stuck on another error

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

    Bro I am getting this error " (-217:Gpu API call) cuDNN did not return a suitable algorithm for convolution. in function " Can you please help me with this .Please

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

    Thanks for your help, but i still have a problem with openCV, it works fine, but when i try to execute my OpenCV project with pyinstaller or auto-py-to-exe Opencv is not imported and the executable file won't start. have any idea on how to fix this

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

    hello great video !! ,
    I have a question I followed every step but when I try to import in anaconda I get this error
    \anaconda3\lib\site-packages\cv2\__init__.py", line 109, in load_first_config
    raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
    ImportError: OpenCV loader: missing configuration file: ['config-3.9.py', 'config-3.py']. Check OpenCV installation.

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

    Hi, I was doing all steps in order and I did not receive any errors. However, in the final step, when I want to “import cv2”, I’ve got this error?
    “DLL load failed while importing cv2: The specified module could not be found”
    Do you have any idea how can I solve this problem?
    I had: Windows 10 Enterprise N LTSC
    GPU 980 GTX

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

    Having Nvidia GeForce 1650, when I run a code before this, fps was 5-6 but after this it is still 8-9. In other words, it didn't increase as I expected. Is this normal?

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

    Hello, good tutorial, but im unable to configure the opencv the second time with error error LNK2019: unresolved external symbol fseeko referenced in function main [C:\OpenCv_Build\build\CMakeFiles\CMakeTmp\cmTC_7a241.vcxproj], i follow the steps accordingly (except redownloading the vs 2019) any solutions? Thank you

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

    It would be a good idea to do a video on steps to update opencv and tensorflow gpu versions. Always afraid I mess up something if I simply uninstall the previous version.

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

      That's true. For tensorflow, it's really easy. Just see the supported cuda and cudnn versions against a particular tensorflow version and install them. Use Anaconda for that.
      For opencv, it becomes headache though.

  • @user-id9jx8lc9k
    @user-id9jx8lc9k Рік тому

    i want see opencv4.6.0 with cuda please i need help

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

    After your command cmake could not load cache

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

    Hey nice tutorial, i get it all right untill i get this error when running the test script : Traceback (most recent call last):
    File "test_script.py", line 13, in
    cuMat1.upload(npMat1)
    cv2.error: OpenCV(4.5.3) C:/OPEN_CV/opencv-4.5.3/opencv-4.5.3/modules/core/src/cuda/gpu_mat.cu:116: error: (-217:Gpu API call) initialization error in function '::DefaultAllocator::allocate' could anyone help please

  • @AliVeli-vm6bd
    @AliVeli-vm6bd 3 роки тому

    Dear coding bug, while configuring the, I get a lot of SSL connect errors. Configuration completes but these errors are written while loading. Would this be a problem? I could not manage to do what you said. Could it be not happening because of these SSL connect errors I got?

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

    It is showing alot of warnings is it ok ???...Please Guide

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

    I had ssl / TLS error when cmake tried to make download ;(

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

    Hİ TheCodingBug,
    First of all thanks for this nice video!!
    I am getting the following warning in the opencv_world folder when installing OpenCV on Windows 10. Do you have any information about what originated from? Is it important?
    warning : field of class type without a DLL int
    erface used in a class with a DLL interface

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

      Thank you for your comment.
      This warning is okay. If there are no errors, everything will work fine at the end.

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

    fatal error C1001:Internal error in
    the compiler. [C:\Build\modules\core\opencv_test_core_AVX512_SKX.vcxproj] I have this error every time I want to install openCV, do you know any solution? I follow the steps of other tutorials, but I got the same error.

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

    it didn't worked even updating numpy

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

    good stuff! subscribed
    do you have a plan to do a session on how to build opencv with cuda on linux (say ubuntu)? im sure many are interested.

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

      I'll make that in the first half of February.

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

      @@TheCodingBug great looking forward to your video!

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

    I followed this tutorial and it recognizes my gpu and even run simple codes for gpu test. But when i run a code with cv2.dnn.DNN_BACKEND_CUDA and cv2.dnn.DNN_TARGET_CUDA nothing happens. It doesn't show any module missing or any error message, but the video where it should appear the detected objects crashes. The code isn't the problem because i tested it on google colab and works fine. Also it works fine when i let with cpu parameters. Could you tell me what do you think is may causing this problem? Thanks in advance for your attention !!

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

      Maybe things are changed over the years. I'll look into it next month.

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

    Hi, thanks for the detailed video. I followed the steps exactly as per the video (excluding the virtual environment part as I don't think I need?) but when I try and import cv2 as cv and copy your test script, calling cv.cuda_GpuMat() and other functions such as cv.imshow() and cv.imread(), pyCharm says it cannot find the reference and as such the library doesn't work. Do you know why this might be? Thanks!

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

      Hi.
      Test it in Anaconda prompt. If it works there, there might be additional configuration required for p.ycharm

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

    Thank you very much this works! Is there a way to use this with virtual environment without anaconda?

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

      Yes. Any Python path in Cmake can be used. It doesn't matter if it's for Anaconda or any other Python distribution.

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

      @@TheCodingBug edited, nvm it worked. Haha thank you very much!

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

    Could you do the same introduction for C++?

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

    help a lot, thx

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

    Why I build take so long, more than 4 hours?

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

      It depends on computer specs. It takes more time on HDD than SSD.

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

    Please help me, I have write same code in build using CMD like in the video (7:07)
    "C:\Program Files\CMake\bin\cmake.exe" --build "C:\OpenCV_Build\build"--target INSTALL --config Release
    Error: C:/OpenCV_Build/build--target is not a directory
    and get error like this, what shoul i do?

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

      Try copying command from the description and paste it.

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

      @@TheCodingBug Thankyou sir! done, but. If I import cv2 by code in cmd, cv2 is detected. and if I run by IDLE python, cv2 still not detected. what should I do?

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

      @@jonarad9955 it seems your IDE is using a virtual environment. You have to build for that environment as well or change IDE settings to use base Python environment.
      Also, make sure there are no multiple Python distributions installed (let's say Anaconda and native Python).

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

    Is it also possible to perform all the setups for installing opencv with gpu support
    with both native installation of python and anaconda or we just need to keep Anaconda ?

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

      You can do it with native Python too.

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

    it works for once ,then i get ImportError: DLL load failed while importing cv2: The specified module could not be found. this error

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

      Make sure you've activated the virtual environment.