OPENCV 4 + CUDA on Jetson Nano

Поділитися
Вставка
  • Опубліковано 20 сер 2024
  • How to build and package OpenCV with CUDA support on the NVIDIA Jetson Nano Developer Kit. Please Like, Share and Subscribe! Full article on JetsonHacks: wp.me/p7ZgI9-33e
    In the video, we use:
    * Jetson Nano
    * Raspberry Pi V2 camera
    * Samsung T5 Drive
    * A 5V, 4A power supply
    The items above are available through the JetsonHacks Amazon store front! amazon.com/sho... As an Amazon Associate I earn from qualifying purchases. There's no charge to you, and the channel gets a small commission. Thanks!
    Website: jetsonhacks.com
    Github: github.com/jet...
    Twitter: / jetsonhacks
  • Наука та технологія

КОМЕНТАРІ • 186

  • @mok7645
    @mok7645 4 роки тому +7

    Appreciate your computer vision oriented content on the Jetson nano. Thank You!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      I am glad you like the video. Thank you for taking the time to watch it!

  • @zaderathefirst7338
    @zaderathefirst7338 4 роки тому +4

    Thanks Jim, great Tutorial and a very nice build script!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Thank you for the kind words, and thanks for watching!

  • @johnganci933
    @johnganci933 4 роки тому

    Thanks for your reply, which I understand. I asked about this on the NVIDIA forum yesterday and feel that I'm getting the run-around.

  • @isbestlizard
    @isbestlizard 4 роки тому +1

    WOO! I just ordered a pair of IMX219-200's to go with my jetson dev board! I want to nvenc the streams, send them to my EPYC BEAST for some hard core cuda crunching :D

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

    This is excellent!! Very appreciate for your clear description!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Thank you for your kind words.Thank you for taking the time to watch the video!

  • @perryvanderknaap4089
    @perryvanderknaap4089 4 роки тому

    Thanks for another great video. Ps: love the [Echo on]GUI, GUI, GUI[Echo off] bit Ps2:Say hello to Bruce for me!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Thank you for the kind words. Bruce says hello back! Thanks for watching!

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

    Thank you Jim !!! Looks very simple to do, and have complete info. Next week I'll try it out. Cheers. Alberto.

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

      You are welcome. However, you should consider using the script from here instead: github.com/mdegans/nano_build_opencv

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

      @@JetsonHacks Thank you Jim !

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

      @@BTXSISTEMAS You are welcome and good luck on your project!

  • @quaternion-pi
    @quaternion-pi 4 роки тому +1

    Another awesome JetsonHacks. Thanks!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You are very welcome. Thank you for the kind words, and thanks for watching!

  • @lindongguo4414
    @lindongguo4414 4 роки тому

    Cool mic, the voice sounds extremely clear

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Thank you for the kind words. This venerable Shure 57 has been with me 30 years. There's a reason it is an industry standard. Thanks for watching!

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

    Thank you so much! It's very helpful!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      I am glad you found it helpful. Thanks for watching!

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

    As always, great content!! Thanks

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You are too kind, you are more than welcome. Thanks for watching!

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

    I was wondering that, excelent video

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      Thank you fro the kind words, and thanks for watching!

  • @patis.IA-AI
    @patis.IA-AI Рік тому +1

    Thanks verry clear

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

      You're welcome! Thanks for watching!

  • @chandandwivedi2362
    @chandandwivedi2362 4 роки тому +1

    It's really great! Love your videos

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Thank you for the kind words, and thanks for watching!

  • @MegaAhoward
    @MegaAhoward 4 роки тому +1

    Thanks - saved me a heap of time!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You're welcome! Thanks for watching!

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

    The latest version of the SDK Manager from NVIDIA installs OpenCV 4.1.1 as well.

  • @ms.global6561
    @ms.global6561 4 роки тому +1

    thanks man , great video very helpful

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You are welcome, and thanks for watching!

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

    Thank you

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You are very welcome, and thanks for watching!

  • @fpgamachine
    @fpgamachine 4 роки тому +1

    Thanks You very much!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You are welcome, and thank you for watching!

  • @masseteilchen3000
    @masseteilchen3000 4 роки тому +1

    Fantastic topic!!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Yes it is! Thank you for watching.

    • @masseteilchen3000
      @masseteilchen3000 4 роки тому

      @@JetsonHacks at 4:50 you mention you're building it for python, what would change when using opencv in C++ code?

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      The C/C++ is the heart of the library, you do not have to specify anything for it to build. If you do not intend to build for Python, you can remove the Python build flags. This will save you a large amount of time for the build.

    • @masseteilchen3000
      @masseteilchen3000 4 роки тому +1

      JetsonHacks Thanks!!

  • @hbyildiz82
    @hbyildiz82 4 роки тому +1

    on %100 "Building cxx object ............ /src2/cv2.cpp.o"
    i am waiting, waiting, waiting but nothing
    help please

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

    At 7:50 , you have mentioned "eventually killing the build , restarts make with 1 job" . How do you kill the build without closing the terminal? I am stuck with this step and I cannot move forward without knowing this. In need of your help.

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

      I too have the same problem , need some help.

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

      When the process runs out of memory, it kills itself and returns. Then, make is run again. You can ^C to terminate a process, and the terminal does not close. You may have better luck with the build CV scripts in the mdegans Github repository.

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

      @@JetsonHacks I have the same problem, just stuck and doesn't do anything :c

  • @dabin1872
    @dabin1872 4 роки тому +1

    Thanks for your information, but I'm in trouble with opencv.pc file.
    When I follow your tutorial, gcc can't find opencv.
    I think the problem is that I didn't make opencv.pc file in /usr/local/lib.
    But I really don't know how to solve it......
    Can somebody tell me how to solve problem??
    I'll very grateful of it.....
    Sorry for bad English T.T

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

    Jim, with CUDA 10.2 and OpenCV 4.1.1 fully installed on Jetson Xavier nx, driver for Arducam hq imx477 camera working fine, gst-launch-1.0 command on its own working fine for realtime camera streaming, has it ever happened to you that upon doing object detection with darknet (alexyAB set-up) and yolov4-tiny custom model that the camera started alternating a black screen with a video capture by the second? Any suggestions as to what is wrong? Thank you so much for your tutorials that have helped me a lot.

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

      You are welcome. I have not experienced this issue, perhaps someone in the official NVIDIA Jetson forums can help. Thanks for watching!

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

      @@JetsonHacks hello Jim, I solved the problem by providing direct power supply to the little screen attached and the flashing stopped. It had nothing to do with hardware set-up, but the screen was not getting sufficient power while the object detection was sapping power from the device. Attaching a smaller screen (6 inch vs 10 inch screen) solved the problem as well. Just for your info, because you are connected to many users who may be experiencing similar problems. Best! DD

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

      Thank you for sharing your solution!

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

    I wanted to know what changes are needed to install Opencv to Python3 as it by default getting install to Python2.7 ....Please help me if anyone gets this

  • @dexterpengji2118
    @dexterpengji2118 4 роки тому +1

    Amazing!

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

    Thanks :-)

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You are welcome, and thank *you* for watching!

  • @Kayram1
    @Kayram1 4 роки тому

    Awesome explanation and walk through. Very helpful. Can you post video for using Nvidia DeepStream SDK on Jetson Nano ?

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Thank you for the kind words, and thanks for watching!

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

    after i try getBuildInformation, CUDA is in python 2 but not in python 3, how can i get cuda in python3?

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

    Thanks for all your videos! I love them pretty much!
    Currently, I've trained a model in Google COLAB, but the trained model generated is in PYTORCH. So, I'd like to know what I have to do to run this model on the Jetson NANO. Thank you in advance.

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

      It is more efficient for you to look for the answers on the Jetson forums first. For example: forums.developer.nvidia.com/t/pytorch-for-jetson-version-1-10-now-available/72048

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

    Thanks very much for the tutorial. The only issue I experienced was an error with the gstreamer_view.cpp after I pasted the link into the examples directory in the terminal. Any ideas why I might be getting this?

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

    hello, i face some problem to use opencv using webcam on jetson nano, it display error: ( -215 : Assertion failed ) size.width 0.aa size.heights in function ' imshow

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

      Hard to tell from your description what the problem might be.

  • @shrijank522
    @shrijank522 4 роки тому

    I kept Num_Jobs=1 since I was installing on a memory card. The installation is completed, however everything seems fine except cUDNN is still No with CUDA enabled. Do I need to add cUDNN in the cMake?

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

    Thank you very much sir! I was wondering how to get this work with another camera other than the Raspberry Pi V2 one ?
    I am using a Ricoh Theta V camera (working as a video device thanks to v4l2loopback)

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

      Please ask this question on the official NVIDIA Jetson Nano forum.

  • @tharinda07
    @tharinda07 4 роки тому

    Thanks for the guidelines, I'm interested to learn more about the pkg build, is there a referral link that I can look into?

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

    every videos are such intersting and wonderful. can you help me in making darknet frame works on jetsn nano i just wanted to train my own custom object detector(yolov4). its been difficult for me to install darknet executable file especially in make file

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

      Thank you for the kind words. I don't know enough about Darknet to provide any meaningful insight into the issues you are experiencing. Good luck on your project, and thanks for watching!

  • @gerokatseros
    @gerokatseros 4 роки тому

    if we build the opencv4 and we want to use opencv3 how do we do it then?

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

    maybe a bit outdated but I followed this tutorial to install openCV but I did not get the cuDNN installed... any tip? txs for the clarity of the explanation!

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

      It's hard to tell from your description what the issue might be. Are you using a Jetson Nano? What version of cuDNN are you installing? The script tries to use 8.0. Which version of OpenCV are you trying to build. This video has been updated here: ua-cam.com/video/art0-99fFa8/v-deo.html

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

      @@JetsonHacks I saw it... indeed covers those aspects. Trying now!!!!

  • @hejin2730
    @hejin2730 4 роки тому

    Thanks!!!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      You are welcome, and thanks for watching!

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

    After running and compiling it successfully ,when i ran example, it says package opencv was not found in the pkg-config search path? how to correct this. Thanks

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

      Is the directory containing opencv.pc in the PKG_CONFIG_PATH environment variable?

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

      @@JetsonHacks Checked on your blog and enabled the pkg flag and example is running fine but while running my custom code in vscode every time i have to pkg-config every used library every time like in the example code,I know cmake can do this too but is there any other way. Thanks for reply

  • @jeremyuzan1169
    @jeremyuzan1169 4 роки тому +1

    Hello, thanks for the vidéo :) What do you mean when you write "restarts make with one job" at 7:51 ? I also had an issue to finish to build but I don't know the command to make it continue ? Thank you again. Jeremy

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      You are welcome. In the script:
      # Consider the MAXN performance mode if using a barrel jack on the Nano
      time make -j$NUM_JOBS
      if [ $? -eq 0 ] ; then
      echo "OpenCV make successful"
      else
      # Try to make again; Sometimes there are issues with the build
      # because of lack of resources or concurrency issues
      echo "Make did not build " >&2
      echo "Retrying ... "
      # Single thread this time
      make
      if [ $? -eq 0 ] ; then
      echo "OpenCV make successful"
      else
      # Try to make again
      echo "Make did not successfully build" >&2
      echo "Please fix issues and retry build"
      exit 1
      fi
      fi
      The reference is to the second "make", after the comment "# Single thread this time"
      Thanks for watching!

    • @pietrolungaro6411
      @pietrolungaro6411 4 роки тому

      @@JetsonHacks Hi, thanks for the many and all super interesting videos. I am also confused around the same issue.
      My Jetson is totally stuck now. Am i supposed to kill it and restart the whole process again? or is this something that will happen by itself? It feels very confusing, but I am also a super beginner.
      Can you please clarify what is expected to happen and we are supposed to do?

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      @@pietrolungaro6411 This is not a beginner level project. What are you trying to accomplish by building this?

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

      Hi sir, my jetson nano stuck at "100% Building CXx object ... python2.dir/__/src2/cv2.cpp.o". Screen is freezed and mouse doesnt move now. Do i restart the device? Or it still working? How can i solve this issue. I dont understand what do i change for one job? My problem is about this issue? Please help me :'(

  • @m.g.sathiyanarayanan4527
    @m.g.sathiyanarayanan4527 Рік тому

    Hello,Sir Iam using Jetson AGX orin and H265 gimbal(camera) using python I used simple opencv cv2.videocapture program using IP address but there is lag in the video how to over come it....

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

      Not quite sure, you probably will need to adjust the GStreamer parameters to better suit your project. It's worth asking this question on the official NVIDIA Jetson forums. Thanks for watching!

    • @m.g.sathiyanarayanan4527
      @m.g.sathiyanarayanan4527 Рік тому +1

      @@JetsonHacks Thanks

  • @markopopoland
    @markopopoland 4 роки тому +1

    Hello. Thanks for explanation. Can I cmake contrib library too to run it on nano ?

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      You are welcome. If you read the script, you will see that the contrib library is included. You can configure OpenCV with any of the CMake flags that you want. Thanks for watching!

    • @markopopoland
      @markopopoland 4 роки тому +1

      @@JetsonHacks delicious :) I think it is good idea to prepare video about options during process of compiling of opencv. I was looking about explanation of flags but no found. Cuda features world etc.

    • @markopopoland
      @markopopoland 4 роки тому

      I'm doing as You said in video and contrib is not included. I have to make new flag for non free library in sh file ?

  • @krishnar754
    @krishnar754 4 роки тому

    Hello sir . Thanks for informative video.
    I have a doubt!
    Is the version of cv2 4.1.1 on running it in python3.
    I mean entering python3 interpreter ( how you entered python).
    Coz in my Jetson when I check version of cv2 using python2 it's 4.1.1 but using python3 it's 3.2.0
    I need help to change it to 4.1.1
    It would be great if you can help me with this sir.
    Hoping you'll reply 😅

  • @TheRealFrankWizza
    @TheRealFrankWizza 4 роки тому

    Thanks! I see all the all the packages in the build file, what do I run to move this to a new SD installation? Just sudo make install?

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      sudo make install will install over the default version. If you are going to do that, you should probably purge the old one first. An alternative is to set your paths to the new build. Thanks for watching!

    • @TheRealFrankWizza
      @TheRealFrankWizza 4 роки тому

      @@JetsonHacks Thanks for the prompt and good information.

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

    I have problems with this version of opencv4, now I have 2 versions of opencv, before this install ROS Melodic and all necessary plugins like opencv(3.2 is installed by default), cv-bridge etc. But now that I install this script I have 2 versions of opencv and when I catkin build my ROS packages that use cv-bridge, it recognizes both and gives me a warning! Do I have to configure opencv 4 with cuda first and then install ROS for it to work well in my packages?

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

      ROS is not linked against OpenCV 4, so you would need to recompile the ROS packages against the newer OpenCV. This is a daunting task unless you know your way around ROS extremely well. Good luck on your project!

  • @Jure1234567
    @Jure1234567 4 роки тому

    So as you compile it with qt, the whole opencv license becomes gpl right? I heard qt takes money for commercial project license..

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      Depends on how you use it. If it's an open source project, it is LGPL. If it's a commercial product, different rules may apply. It's something you will need to let the lawyers handle.

  • @pedrorafaelvidalarias6517
    @pedrorafaelvidalarias6517 4 роки тому

    Your guide are excellent! How can I use python and OpenCV to get a capture in any time from the Raspberry Pi cam at any size?

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      Thank you for the kind words. I am not sure what you are asking. The RPi camera has certain native formats which is straightforward to bring in to OpenCV. If you want to change the resolution or manipulate the image, it depends on what you do as to the performance. Thanks for watching!

    • @pedrorafaelvidalarias6517
      @pedrorafaelvidalarias6517 4 роки тому

      @@JetsonHacks Thanks for answering. What I want to say is that through a command in python3 I could take a picture from the Pi camera specifying the size of the photo. It is for a project, it consists of classifying objects through artificial vision and then being manipulated by a robotic arm. All controlled by the Jetson Nano. The control of the kinematic model for the 6 dof manipulator is already implemented on python3 in the Jetson thanks to your videos.

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      @@pedrorafaelvidalarias6517 You should experiment and see if it meets your needs. I'm not sure that you need OpenCV 4 for that application, you can probably test it out with the default that is on the Nano.

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

    Hello, Jim, I'm following your videos to build OpenCV in my Jetson nano. I got the OpenCV installed and importing cv2 on python shell compiles it successfully. But when I run the .cpp examples from your folder it gives the following error:
    /usr/bin/ld: cannot find -lopencv_contrib
    /usr/bin/ld: cannot find -lopencv_legacy
    /usr/bin/ld: cannot find -lgstreamer_view.cpp
    collect2: error: ld returned 1 exit status
    I'm new to jetson nano development. could you please give an idea of why these errors are showing?

  • @jhengineering3578
    @jhengineering3578 4 роки тому

    I installed openCV 4 but it said it failed downloading the package. what do I have to do to get openCV 4 on my jetson? how can i remove or delete the failed download? thanks!

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      I don't know what "failed downloading the package" means.

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

    Thanks for your video to begin with. So I have followed the exact same instructions to try to build my OpenCV, but when I printed cv2.getBuildInformation, the output window didn't show anything related cuda as well as the OpenCV modules that supposedly had to come with it, and I am wondering what could be the possible cause of this? I viewed the build log and nowhere did it say it failed to build the .so files. The opencvcuda .so files also existed under the lib directory as I last checked.

  • @harsh7704
    @harsh7704 4 роки тому +1

    I also appreciate your computer vision oriented content on the Jetson Nano.
    I follow the same steps in the video which you have mentioned. However, I have also extended my memory of swap to 4 GB to avoid any kind of failure. I started my build, everything went well but at 100 percent, my build got hung or what should I say . . stopped. I am not able to understand the reason for this. Your help to fix this stuff would be helpful for me :) waiting for a prompt reply

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Thank you for the kind words. I am not able to suggest a fix to your issue because I don't understand from your description what the error might be.

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

      @@JetsonHacks Hi, I think he refers to the part you mentioned with "The memory thrashes .... eventually killing the build". I guess many people are experiencing the same issue with the build not being killed and remaining stuck "forever".
      How many hours is that "eventually"? Can you please let us know? Maybe something changed with the latest software releases from Nvidia?

  • @pattaraponbuathong5186
    @pattaraponbuathong5186 4 роки тому

    Thank you so much sir! By the way, when I do ccmake in build file, it said that the OPENCV_DNN_CUDA and OPENCV_DNN_OPENCL are already turned on. But, when I do print(cv2.getBuildInformation()). It said that cudnn is "NO". (I think this is why I can't use net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)) Do you have any solution for this? Thanks in advance. Ps. I am working on NVIDIA Jetson Nano

  • @ms.global6561
    @ms.global6561 4 роки тому

    can i use this for ubuntu pc , there is any change i should to do

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      The scripts are for the Jetson CUDA architecture and may need to be different from a desktop environment. Thanks for watching!

  • @drrobotsir
    @drrobotsir 4 роки тому

    Hi Jim, have you tried Jetson Nano with Kinect V2?

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

    Hi Jim, I downgrade my opencv4 (Nano 4GB) now I want to use again and rebuild, is your video can solve my issue?

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

      This video is a little old, there's a better build script available: github.com/mdegans/nano_build_opencv
      Thanks for watching!

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

      @@JetsonHacks ah thanks, I tried to install in someone's blog but it consume about 10gb and then I had to stop it and I came here again, you never regret me:) Really thanks. I hope this installation won't cause big consuming area

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

    Thanks for the video. One question.
    I got error like "unsupported GNU version! gcc versions later than 7 are not supported!" while compiling. I see CUDA-10.0 installed in the nano. How did you manage to solve this issue? or you didn't get any error like this?

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

      The video is a few years old, the requirements may have changed. You'll probably have better luck with this script: github.com/mdegans/nano_build_opencv
      Thanks for watching!

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

    Many thanks to Mr. Jim (the Master)!!!
    If You could please give a hint how to install "CPack_binary" generated *.deb files?
    I got 5 of them (OpenCV-unknown-aarch64-dev.deb, *-libs.deb, *-licenses.deb, *-main.deb and *-scripts.deb), do I need to install all of them, and if yes: does the order somehow matter?

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

      Each one of the .deb files holds different parts of your OpenCV build. You can use the dpkg to install the .debs from the command line, or install using the GUI. If you double click the .deb file, it should launch the installer.

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

      @@JetsonHacks Thanks!!!

  • @kevin_delaney
    @kevin_delaney 4 роки тому

    2 hours, 32.5 minutes. I've got more swap!!! How'd you beat me? 😆
    By the way, thank you! Only doing this for Yolov3 and tf2 but I'll make them work with this haha

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      You're welcome. I probably just got lucky on the speed deal. Thanks for watching!

  • @SaddamBinSyed
    @SaddamBinSyed 4 роки тому

    Thank you so much for your video.
    I got successfully built the OpenCV 4.1.1 on jetson nano.
    when I try to run the yolov3 object detection code(USB camera) then the code is not using the GPU instead of all the CPU.
    please advise.

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      This is not a question that can be easily answered in a UA-cam comment. You will need to both study a little and configure the OpenCV DNN for GPU usage. Thanks for watching!

    • @SaddamBinSyed
      @SaddamBinSyed 4 роки тому

      @@JetsonHacks thanks for your reply.
      I would like to ask , If I follow your build steps, (after successful build ), then if I use (in my code) "GPU supported opencv dnn functions" will automatically use GPU instead of CPU.?
      Please advise.

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      @@SaddamBinSyedI don't understand your question. The video covers installation of a CUDA capable OpenCV. Functions/algorithm that have CUDA support built in will use CUDA (GPU). It is beyond the scope of what we can cover here to evaluate each OpenCV function as to whether it is CUDA enabled or not. I suggest that you do some research to better understand what GPU/CUDA support might mean for your use case.

    • @SaddamBinSyed
      @SaddamBinSyed 4 роки тому

      @@JetsonHacks thank you for your response.

  • @josegregorioperezmagallane3211
    @josegregorioperezmagallane3211 4 роки тому

    Hi
    Congrats for and excelent video!
    I didi run the script for Jetson Xavier NX and run smoothly without any problem and even though it installed the CUDA libraries, the cuDNN = No in the build information. Any reason, for this? Any way to solve it?

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      Did you modify the script to include cuDNN?

    • @josegregorioperezmagallane3211
      @josegregorioperezmagallane3211 4 роки тому

      @@JetsonHacks No I only run the scrtipt as you do it in the video. Do I hae to include something? where and what?

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      @@josegregorioperezmagallane3211 You can look here for an example: github.com/mdegans/nano_build_opencv

  • @fishworxify
    @fishworxify 4 роки тому

    cheers, which software do you use to record the screen?

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      I use a separate hardware capture device made by Elgato. It's an older model made by Elgato which records 1080p HDMI over USB to a Macintosh/PC. This video has a separate DSLR video overlayed on top with video editing software. Thanks for watching!

  • @masseteilchen3000
    @masseteilchen3000 4 роки тому +1

    Thanks for the script! Worked flawlessly! For those running it with root on SD card, it took around 3.5 hours.
    Running into trouble trying to use DNN_BACKEND_CUDA and DNN_TARGET_CUDA with object detection. (not a member of cv::dnn class). Even though I set the following flags:
    -D WITH_CUDA=ON \
    -D WITH_CUDNN=ON \
    -D OPENCV_DNN_CUDA=ON \
    Checked the dnn.hpp file of 4.1.1 and DNN_BACKEND(/TARGET)_CUDA wasn't listed there. The master branch is listing it. Any idea how to use it with 4.1.1?

    • @masseteilchen3000
      @masseteilchen3000 4 роки тому

      The DNN_CUDA dev confirmed his solution only works with the open cv master branch. Installed it with your script, yolov3 worked well now! Improvement from 12000ms (Cpu only) to 800ms (608px input), 400ms(416px input) and 250ms (300 input)

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      This is excellent to hear! It sounds like this might make an interesting example to show. Thanks for watching!

    • @masseteilchen3000
      @masseteilchen3000 4 роки тому

      Turned out the master branch with full DNN_CUDA support is actually 4.1.2-dev! Tiny-Yolo is running on around 28fps now! I think it would make an awesome article if you implemented opencv cuda_dnn into a ROS node? I couldn't figure out how to properly do it yet without crashing the jetson. :-/

    • @SaddamBinSyed
      @SaddamBinSyed 4 роки тому

      @@masseteilchen3000
      Hi there,
      which version of OpenCV did you install finally?
      Is it 4.1.1 or other? if not 4.1.1 how can I change the 4.1.1 into the master branch on buildOpenCV.sh file?
      highly appreciated your help.

    • @masseteilchen3000
      @masseteilchen3000 4 роки тому

      This is the modified buildOpenCV.sh which worked for me: pastebin.com/VXQR9fcQ
      Remember to use a beefy power supply when running yolo, or run it in 5W mode to prevent crashing.

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

    how much space i required to install this cuda?

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

      It depends on which options you chose to include in your build. You will need quite a bit of room to compile the code. Personally I would have at least 8GB free. As I recall, it takes significantly less than that, but because the build takes a long time it's better not to run out of space. Thanks for watching!

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

    cool!
    thanks for .sh file!

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

      You're welcome, and thanks for watching!

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

      @@JetsonHacks may I use CUDA gstreamer for convert images and video on Jetson nano plus raspberry camera to green filtered and red filtered images and video ? Thanks

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

      @@shmeleff_ural This is too involved of an answer for a UA-cam comment. Please ask this question on the official NVIDIA Jetson support forums, where a large group of developers and NVIDIA engineers share their experience.

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

    Will this method/process work for the newer 2GB Jetson nano?

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

      I do not know, I haven't tried it. When you try, make sure that you have the number of jobs = 1. Thanks for watching!

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

      @@JetsonHacks thanks! I did that and it is compiling as I type (about 3 hours in)

  • @simonkirkman4673
    @simonkirkman4673 4 роки тому

    What would you recommend as the best IDE for opencv on the nano.

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      It depends on which programming language you are using. A generally good environment is Visual Studio, especially if you are using Python.ua-cam.com/video/2sHQBTtDz6c/v-deo.html Thanks for watching!

    • @simonkirkman4673
      @simonkirkman4673 4 роки тому

      @@JetsonHacks Preferably C++. I have been using visual studio on Windows but have used code::blocks and qt in the past.

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      @@simonkirkman4673 All three work on the Jetson, whichever you feel the most comfortable with.

  • @nitinrai6093
    @nitinrai6093 4 роки тому

    just wanted to know, as this opencv 4.x is build with cuda support if i did simple image processing tasks such as generating bounding boxes or writing text on images.... will that be processed by cpu or gpu?? if possible please suggest any way to use gpu to do the task using python3 thanks!!

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      You should try to use the default OpenCV 3.3.1 and check the GPU usage. You will see that the GPU is used for drawing to the screen. Writing text and drawing boxes aren't really what the CUDA algorithms in OpenCV are about. Thanks for watching!

    • @JetsonHacks
      @JetsonHacks  4 роки тому +1

      OpenCL is not supported by the GPU on the Jetson. Typically you would use CUDA on the DNN module, this include setting the Cmake flag
      OPENCV_DNN_CUDA to YES
      Thanks for watching!

  • @markopopoland
    @markopopoland 4 роки тому

    Hi Jim. I compile opencv and oss from your tutorial. I've tried to stream h264 in opencv but video capture has lags. I've found gstreamer in Ubuntu and it has good low latency. I'm digging how to use gstreamer in python 3.6 or 2.7 but can not found. Have you any examples how to do this using gpu of Jetson nano in opencv ?

    • @JetsonHacks
      @JetsonHacks  4 роки тому

      This is beyond what can be listed in a UA-cam comment. Please ask these questions of the official NVIDIA Jetson Nano forum.

    • @m.g.sathiyanarayanan4527
      @m.g.sathiyanarayanan4527 Рік тому

      Hello @markopopoland did you overcame the above problem you have mention Iam facing the same issue

  •  3 роки тому

    is it for python3 too??

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

      Yes. Please read the accompanying article and Github repository for more information. You will be better off if you use Michael de Gans script.

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

      @@JetsonHacks thanks i did it

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

    Getting errors on CMakeOutput.log qnd in CMakeerror.log .how to reaolve sir

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

      Updated video: ua-cam.com/video/art0-99fFa8/v-deo.html