I tried coding a AI DEPTH VISION app with MIDAS in 15 Minutes

Поделиться
HTML-код
  • Опубликовано: 4 янв 2023
  • MiDaS was originally developed by researchers at Intel for Robust Monocular Depth Estimation...aka derving how far objects are using a single standard camera. We're going to try to build an OpenCV app with it using Python in just 15 minutes.
    Good to be back to Code That!
    Get notified of the free Python course on the home page at www.coursesfromnick.com
    Sign up for the Full Stack course here and use RUclips50 to get 50% off:
    www.coursesfromnick.com/bundl...
    Hopefully you enjoyed this video.
    💼 Find AWESOME ML Jobs: www.jobsfromnick.com
    Thanks again to Seeed Studio for the Jetson Nano, check them out here: www.seeedstudio.com/reCompute...
    Oh, and don't forget to connect with me!
    LinkedIn: bit.ly/324Epgo
    Facebook: bit.ly/3mB1sZD
    GitHub: bit.ly/3mDJllD
    Patreon: bit.ly/2OCn3UW
    Join the Discussion on Discord: bit.ly/3dQiZsV
    Happy coding!
    Nick
  • НаукаНаука

Комментарии • 90

  • @NicholasRenotte
    @NicholasRenotte  Год назад +15

    Finally getting back to it!! Went back to the old school format where I talk while coding, hope y'all like it. Code is here: github.com/nicknochnack/CodeTHat-MiDaS

    • @demonxsave9471
      @demonxsave9471 Год назад

      Can you please check your discord,i personal messaged you

    • @mr-hotspot-2543
      @mr-hotspot-2543 Год назад

      I would like to see you build a painting or sketch to photo API like Nvidia canvas

  • @tgmeggitt1
    @tgmeggitt1 Год назад +1

    Oh man that was awesome. I'm always rooting for you to finish on time!

  • @Arvolve
    @Arvolve 8 месяцев назад +1

    You nailed it indeed! Such amazing videos man, thanks a lot!

  • @FlickCliper
    @FlickCliper Год назад +3

    I love the way you teach us about programming, I've watched your previous videos on facemask detection, can you possibly make a Python program that classifies rotting, discoloration, or cratering on celery stalks by image detection?

  • @agustinsaavedra4273
    @agustinsaavedra4273 6 месяцев назад

    Thank you for the example code with Midas.
    Since I was using python 3.10 I also needed the timm library but by downloading the library with pip
    "pip install timm"
    I was able to use the cuda option instead of the cpu one.

  • @Jaybaas
    @Jaybaas Год назад +3

    With 2 minutes to spare!! 🔥👏🏾
    You’ve got the Midas touch 👀😂

    • @NicholasRenotte
      @NicholasRenotte  Год назад +2

      LOL 🤌🏽⚱️ I woke up yesterday and In my mind I was like I am going to get this, gotta make it at least a few times this year.

  • @weareone2069
    @weareone2069 Год назад +1

    hello Nicholas. Your channel has helped me a lot in my problems. Thanks for sharing. Also please could you make a video to combine object detection with midas. This will be very helpful!

    • @psyir5593
      @psyir5593 Год назад +1

      Hey, any luck finding resources on this? I am also stuck here

  • @armanneyestani3433
    @armanneyestani3433 Год назад +1

    thanks, Nichols for the amazing video, My question is how we can use the Depth Map for visual odometry?

  • @san-um7iv
    @san-um7iv Год назад +1

    Hi Nicholas,
    Thank you for such a great video.
    I would like to know how can I train my custom dataset using the MiDaS model.

  • @yamani3882
    @yamani3882 Год назад +15

    Please don’t put a timer on yourself or restrictions to what resources you can access. I literally feel the anxiety myself and lose focus. 😅

  • @jakubkahoun8383
    @jakubkahoun8383 Год назад +2

    Looks awesome, I always wanted to predict Depth!

  • @edwardmoenga9368
    @edwardmoenga9368 Год назад +1

    Awesome stuff. Can you possibly do a cuda/gpu version of the same so that we can see the performance difference?

  • @bdanuw
    @bdanuw Год назад

    That is great! Need ro try as soon as I get to my laptop...
    (Side note, which nano is that? Tried to reset mine a d won't start of you have had that issue, please reply with pointers)

  • @muhammadumarsotvoldiev8768
    @muhammadumarsotvoldiev8768 10 месяцев назад +1

    Thank you very much for your videos!!

  • @mr.sweaty7862
    @mr.sweaty7862 Год назад

    I would really like a video where you take the some of the different NN models you've made (tweaked to the same data), put then through a ensemble to a .h5 file, then converted to protobuf and used in a c# script

  • @generationgap416
    @generationgap416 Год назад

    I think you are more of a marketer than an ML engineer, LOL. Why? your use of a countdown clock: that is the gamification of marketing. We were all hoping that you make out alive. Clever, dude. Great video.

  • @bartoszhojnacki2233
    @bartoszhojnacki2233 Год назад +1

    Finally new ep!

  • @rustcohle9134
    @rustcohle9134 Год назад

    Great!!
    what is the accuracy of the model?
    like if i want to measuring an object and object size is 20mm this model can measuring it close to 20mm?

  • @omar7613
    @omar7613 Год назад +4

    Love you Renotte I admire your hard work. Please make more education videos. I LOVED the GAN video enjoyed every second of it. Your skills are top tier impressive thank you for sharing them 😊

    • @NicholasRenotte
      @NicholasRenotte  Год назад +1

      Thank you so much for checking them out Omar!!

  • @JimBob-lq1db
    @JimBob-lq1db 7 месяцев назад

    That was amazing, thank you

  • @katu406
    @katu406 Год назад +1

    Waiting for your video!!!😇

  • @mustimply9317
    @mustimply9317 Год назад +1

    Thank you for this Video!

  • @user-nd1mv2ug8p
    @user-nd1mv2ug8p 11 месяцев назад

    Hey could you explain how to download visual studio code on the jetson nano? What version did you use and how'd you get it on there?

  • @rahulkiroriwal8779
    @rahulkiroriwal8779 Год назад +2

    King Nick is back with a banger ❤️

  • @mr.sweaty7862
    @mr.sweaty7862 Год назад

    Would it be possible to configure this to measure very small depth changes. Say under 1mm? With a greyscale picture?

  • @faqu2gamer566
    @faqu2gamer566 8 месяцев назад

    Is Midas able to produce true depth/hight maps that could be used with CnC 2.5d bas relief carving?

  • @yasminebaroud3965
    @yasminebaroud3965 Год назад

    can i use this model to estimate the depth after trained a model for object detection and instance segmentation ?

  • @kevynkrancenblum5350
    @kevynkrancenblum5350 Год назад +1

    What a come back 🎉

  • @atharvamadiwale8096
    @atharvamadiwale8096 11 месяцев назад

    Can this model be used to convert a 2D camera feed into 3D ? Wanted to implement a similar idea for a project..

  • @kushagrgoyal9614
    @kushagrgoyal9614 Год назад +1

    awesome video, like always! why did u run it on the cpu nd not the gpu??

    • @lucyegan82
      @lucyegan82 Год назад

      awesome comment, somewhere else! why did u not watch the video??

    • @NicholasRenotte
      @NicholasRenotte  Год назад +1

      Midas requires the library, timm, which needs a newer version of CUDA than what I had available on the jetson. I think I could of fixed this by flashing a newer version of Jetpack but ran out of dev time.

  • @varunvijay6546
    @varunvijay6546 Год назад

    Hello, Nicholas.
    When I try to run the code the kernel fails. Would you please help me resolve this problem?

  • @homealone75
    @homealone75 Год назад +1

    Wow technology keeps on evolving. Didn’t think it was even possible.

    • @NicholasRenotte
      @NicholasRenotte  Год назад

      Pretty cool right?! Been on my list to dig into for a while!

  • @ruquz
    @ruquz Год назад

    hi nick im getting this error . FileNotFoundError: Could not find module 'C:\Users\ADMIN\anaconda3\lib\site-packages\torch\lib\caffe2_nvrtc.dll' (or one of its dependencies). Try using the full path with constructor syntax.

  • @kadaliakshay6770
    @kadaliakshay6770 2 месяца назад

    YOu got a new sub bro (me), keep it up

  • @Abstract_Code
    @Abstract_Code Год назад +2

    Hey Nicholas, I wonder if you can make a tutorial on creating a custom object detection with YOLOv7. Thanks, and keep doing these great videos!

  • @g.s.3389
    @g.s.3389 Год назад +2

    you should make more video on jetson nano using gpu.

  • @dipanjanmandal1771
    @dipanjanmandal1771 Год назад +2

    Nice to see

  • @heyricksander
    @heyricksander Год назад

    How do I get this to work with my macbook's web cam?

  • @snazalsingh2465
    @snazalsingh2465 4 месяца назад

    What is the unit of the depth calcuakted here....

  • @gundachan
    @gundachan Год назад

    big fan of you bro I take many reference from object detection series and completed my college project........I need your help in regarding research paper...I never write and know how to write a research paper and my college want to prepare one for finals.....My writing skills are too simple and straightforward can you help me regarding this situation by providing some tips and references

  • @jerbky
    @jerbky Год назад +1

    you did it again

  • @robinchriqui2407
    @robinchriqui2407 Год назад +1

    Amazing!

  • @venkateshr6127
    @venkateshr6127 Год назад +2

    Please Make a video on video classification with CNN ,Transformer, media pipe holistic 🙏 🙏 🙏

  • @soumyadarshandash7255
    @soumyadarshandash7255 Год назад +1

    Awesome ❤️

  • @dopered5821
    @dopered5821 Год назад

    Is remote oversea possible ?

  • @reubenthomas1033
    @reubenthomas1033 Год назад +2

    Hey Nick, how do we extract the depth data from the output?

    • @NicholasRenotte
      @NicholasRenotte  Год назад

      Heya Reuben, you can use the outputs variable it'll contain the depth measures!

    • @reubenthomas1033
      @reubenthomas1033 Год назад +2

      @@NicholasRenotte The outputs variable has the shape of an image (makes sense, because that's whats being plotted in imshow). But it doesn't seem like there's any absolute depth data. Does this model only output relative depth?

    • @davidschaupp5423
      @davidschaupp5423 Год назад

      The model outputs only relative depth - i struggle on converting this to absolute depth…

    • @davidmata3104
      @davidmata3104 11 месяцев назад

      depth = depth_map[y, x] where x and y are the coordinates of the point on the image

  • @mmaxeator
    @mmaxeator Год назад +1

    You did it !

  • @sruthisajeev
    @sruthisajeev Год назад

    Hey bro..
    This is Sruthy
    I'm doing master's in construction engineering and management. And I've been researching on Real time hand signal detection for safe material handling at Construction site..as a part my final year thesis..I've been learning your course on RUclips titled "Tensorflow Object Detection in 5 hours with Python" for the past 2 weeks..And I've been working on my thesis simultaneously.
    I got stuck at Project 2: Web Direction using Tensorflow JS.. In that, I've some trouble using my IBM Cloud account. When i tried to create a new account..i couldn't use it for free..or its not authorising my account eventhough i gave my credit card details..
    Is there any way to make this work without IBM account. Please do help me 🥲

  • @inadjaooponomarevj8990
    @inadjaooponomarevj8990 3 месяца назад

    so fucking awesome!

  • @vamsiaccount8592
    @vamsiaccount8592 11 месяцев назад

    Can we get the distance from the camera to the object ?? And how

    • @davidmata3104
      @davidmata3104 11 месяцев назад

      def calculate_distance(output, x, y):
      # Get the depth value at (x, y) coordinate
      depth = output[y, x]
      # Convert the depth value to distance (modify based on model-specific conversion)
      # For MiDaS, the depth values represent inverse depth, so we can calculate distance as 1/depth
      distance = 1 / depth
      return distance

    • @davidmata3104
      @davidmata3104 11 месяцев назад

      To obtain meaningful distance measurements, you would need to apply a calibration step using reference distances or known object sizes in the scene.

  • @bilalahmed1247
    @bilalahmed1247 Год назад +1

    Sir how to improve in making logics

    • @NicholasRenotte
      @NicholasRenotte  Год назад

      Heya Bilal, you can grab the depth measures from the outputs variable and add logic from there :)

  • @romanemul1
    @romanemul1 Год назад

    It would be actually funny woking that way at IBM . Penalties/Amazon giftcard "carrots and sticks" way .

  • @bichhubiswa13
    @bichhubiswa13 Год назад +2

    Hi Nicholas,
    It's absolutely fine to take more time but please explain the things in detail,so that we can also understand the things clearly and it will be helpful for us.

  • @hafezfarazi5513
    @hafezfarazi5513 Год назад +2

    Memorizing couple of line of codes (sometimes also looking at it) and typing it under arbitrary time constraints does not add any value to the viewers. Please find some new applications or explain underlying model. Just loading from torch hub is not coding challenge!😅

    • @davidmata3104
      @davidmata3104 11 месяцев назад

      That's why he can't answer technical questions in the comments or why he didn't explain the calibration process.

    • @amrouhussein8303
      @amrouhussein8303 3 месяца назад

      You are right

  • @cedvano
    @cedvano Год назад +2

    I use Midas v3.1 to convert movies in 3D, and I have good results.

    • @PreethamReddy-no7kn
      @PreethamReddy-no7kn Год назад

      Hi
      Is there any tutorial or website for learning that

    • @cedvano
      @cedvano Год назад +1

      @@PreethamReddy-no7kn Hi, no, I dev my own software to create sbs 3D video.

    • @PreethamReddy-no7kn
      @PreethamReddy-no7kn Год назад

      @@cedvano ok, Thanks for the reply

    • @NicholasRenotte
      @NicholasRenotte  Год назад +1

      Oooooh, that's an awesome idea! Might need to take a look.

  • @javlontursunov6527
    @javlontursunov6527 7 месяцев назад +1

    Bro, thank you for the video but I am having there errors and I am leaving the error message here in the comment section. Having read this code, please provide a piece of advice to solve this error. Thank u in advance.
    Using cache found in C:\Users\user/.cache\torch\hub\intel-isl_MiDaS_master
    C:\Users\user\PycharmProjects\Midas\venv\lib\site-packages\torchvision\models\detection\anchor_utils.py:63: UserWarning: Failed to initialize NumPy: module compiled against API version 0x10 but this version of numpy is 0xe (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:77.)
    device: torch.device = torch.device("cpu"),
    Loading weights: None
    Using cache found in C:\Users\user/.cache\torch\hub
    wightman_gen-efficientnet-pytorch_master
    Using cache found in C:\Users\user/.cache\torch\hub\intel-isl_MiDaS_master
    Traceback (most recent call last):
    File "C:\Users\user\PycharmProjects\Midas\main.py", line 27, in
    imgbatch = transform(img).to('cpu')
    File "C:\Users\user\PycharmProjects\Midas\venv\lib\site-packages\torchvision\transforms\transforms.py", line 95, in __call__
    img = t(img)
    File "C:\Users\user/.cache\torch\hub\intel-isl_MiDaS_master\hubconf.py", line 341, in
    lambda sample: torch.from_numpy(sample["image"]).unsqueeze(0),
    RuntimeError: Numpy is not available
    Process finished with exit code 1

  • @sruthisajeev
    @sruthisajeev Год назад

    Tried texting you on linkedin as well as instagram. No response! Please help