Monocular Depth Estimation with MiDaS Neural Networks

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ก.พ. 2022
  • 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 take a look at the Latest State-of-The-ArtMonocular Depth Estimation with MiDaS Neural Networks. We will go over how to load the models with pytorch and opencv and pass the image through it for depth estimation. We will at the end of the video see the depth map results from a monocular camera with different models.
    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
    _____________________________________________________________
    Tags:
    #depthmap #deeplearning #computervision
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 76

  • @NicolaiAI
    @NicolaiAI  ปีที่แล้ว +1

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

  • @h3Xh3Xh3X
    @h3Xh3Xh3X ปีที่แล้ว +6

    Finally a machine learning project I'm able to follow along with! I modified the DPT code so now I can run semantic segmentation with my webcam. :D

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +2

      Thanks a lot for watching! Would u mind to share the code with me? Would love to make a video about it. thecodinglibraryyt@gmail.com

  • @dtjiangutube
    @dtjiangutube ปีที่แล้ว +2

    You are an excellent professor!

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Thanks for watching!

  • @janjiavicii1328
    @janjiavicii1328 2 ปีที่แล้ว +3

    My graduation project is a 3D reconstruction system. Your videos are so helpful to me. Thank you!

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Cool! Thanks for watching, really glad that I can help

    • @scoobydude
      @scoobydude 5 หลายเดือนก่อน

      hey im a 3rd year student. I'm too planning to do a 3d reconstruction using a 2d image for my 4th year project( i have a year more but i want to start now). I have no idea where to start. is there any way i can reach out

  • @sinchanag4561
    @sinchanag4561 ปีที่แล้ว +2

    Hi thank you for the great video. Can you tell how to convert relative depth maps to absolute depth maps?

  • @8eck
    @8eck 2 ปีที่แล้ว

    So that step with interpolation is a reverse logic of above input transformations?

  • @trungquyenha9951
    @trungquyenha9951 7 หลายเดือนก่อน

    Great video ! Is there any way to convert the depth you capture from the model into Meter ?

  • @user-fd6le8cl1d
    @user-fd6le8cl1d ปีที่แล้ว

    Hello,blogger, are there more papers doing supervised monocular depth estimation now?

  • @ckwcfm
    @ckwcfm ปีที่แล้ว

    Nice video. Can this be use for object dimensions estimation?

  • @user-ql2od2nr6d
    @user-ql2od2nr6d ปีที่แล้ว

    Hello, how to use this model to get the absolute distance? What code needs to be modified?

  • @FarmBoyTech
    @FarmBoyTech 8 หลายเดือนก่อน +1

    Please mention the versions of all the dependencies

  • @Noah-oc8pg
    @Noah-oc8pg 2 ปีที่แล้ว

    what's the deference between depth map and the grayscale one?

  • @gba1112001
    @gba1112001 11 หลายเดือนก่อน

    HELLO
    Can I train this nerual network for single-shot structured light depth sensgin system (speckle IR pattern just like iPhone system)?

  • @najibmoumou2675
    @najibmoumou2675 ปีที่แล้ว +1

    thank you so much it's really interesting content
    I have a question:
    is it not possible to fine tune Midas on a database? and how to do it?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      Thanks a lot for watching! Means a ton.
      Yeah u can fine tune models on ur own dataset it’s just pretty hard to get. You should def check out the Midas GitHub repo for more info. All of it is in there

  • @lucastavares7767
    @lucastavares7767 2 ปีที่แล้ว +2

    Very good 😃 🇧🇷👊

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +1

      Thanks for watching!

  • @ninja_ssj3
    @ninja_ssj3 ปีที่แล้ว

    Hi, I am very new to computer vision , I am running this code in jupyter notebook but it is not showing any output , although it ran successfully

  • @oussamabenyaala5096
    @oussamabenyaala5096 2 ปีที่แล้ว +2

    Cool Video (y). Any Idea on the accuracy of such an approach. Can I relay on translating the pixel density to mm or cm? Thanks

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Thanks a lot. The accuracy for real world distances is low and u should probably not expect more than down to cm accuracy. And that's if u have some good mapping from relative to absolute depths

  • @krinodagamer6313
    @krinodagamer6313 2 ปีที่แล้ว +2

    nice depth map

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +1

      It's really amazing!

  • @mohammedmansour1601
    @mohammedmansour1601 2 ปีที่แล้ว

    Thank you so much ...this is very interesting ,actually I want to build a robot car based on depth estimation for successful navigation and I wanna train a model and make the car go to the deepest point ... but the problem that Midas is trained on 10 datasets seems impossible to train on this verity of datasets do you have any suggestion on how to caluclate the deepest point or a good model with high prediction and can I train it and understand it by myself ..thanks you so much again for helping me in my school project.

    • @user-yl8ug8zz9y
      @user-yl8ug8zz9y 4 หลายเดือนก่อน

      Did you find the solution?

  • @cristian12346204
    @cristian12346204 ปีที่แล้ว +1

    Hi, nice video BTW, i have a question (maybe dumb but here it comes)
    If you run this MiDas implementation on an image, and you go the output (no the image, the prediction matrix) and you want to get the depth of the pixel [20][20] of an image. Suppuse that value is 20, what does this 20 means? The pixel [20[20] is 20m (or centimiteres or whaT?) far away from the camera? Or to know that distance you have to do something more?
    Thanks in advance.

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      Thanks a lot for watching! All the depths are relative to the camera and u will have to make a mapping urself to get absolute distances. It could be that u have some references in the scene

    • @cristian12346204
      @cristian12346204 ปีที่แล้ว

      @@NicolaiAI THanks for your response.
      So, if i have understood, lets say i know the real distance of pixel A and pixel B. Knowing the relative distance captured with MiDaS, there would be a relationship as a simple rule of three?
      And this would be true for every images of the same camera?

  • @sadiachowdhury3630
    @sadiachowdhury3630 ปีที่แล้ว

    Can we train MiDas with our own data?

  • @harryagrawal3689
    @harryagrawal3689 9 หลายเดือนก่อน

    Can someone explain me how to get the weights of the model???

  • @supermattosbros
    @supermattosbros 2 ปีที่แล้ว +1

    hey, do you know how to use video instead of images as input for midas?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +1

      Videos is basically just images. U would just read in the path to ur video instead of the webcam.

    • @supermattosbros
      @supermattosbros 2 ปีที่แล้ว

      @@NicolaiAI I downloaded MiDaS and I can set input images by putting them on the input folder. But videos aren't read

  • @iyshwaryakannan6677
    @iyshwaryakannan6677 ปีที่แล้ว +2

    Hi sir, can this be used for measuring the object distance from the camera??

    • @swastikmohapatra4665
      @swastikmohapatra4665 9 หลายเดือนก่อน

      We could map the coulrs to depth approximations

    • @iyshwaryakannan6677
      @iyshwaryakannan6677 9 หลายเดือนก่อน

      @@swastikmohapatra4665 can you please suggest a code

  • @dorisnataliacornejorojas1696
    @dorisnataliacornejorojas1696 2 ปีที่แล้ว +1

    Interesting video :) Do you know how to get the relative distances between the objects?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +2

      Thanks a lot, to get the relative distances u can just project the points out in the world and calculate the distance. But if u want the absolute distances u will have to have some references that u can use for mapping ur depth values to the real world

    • @dorisnataliacornejorojas1696
      @dorisnataliacornejorojas1696 2 ปีที่แล้ว

      thanks for answering, how could I project the points and calculate the distance. I am struggling with that. I will appreciate any help 😊

  • @OhGosh360
    @OhGosh360 11 หลายเดือนก่อน +2

    Apparently 2023 is the first year people started referring to CNNs as 'old school' and 'old fashioned'.

    • @NicolaiAI
      @NicolaiAI  11 หลายเดือนก่อน

      CNNs are still far ahead of transformer on inference speed

  • @najibmoumou2675
    @najibmoumou2675 ปีที่แล้ว

    please we want a neural network in the case of stereovison too

  • @user-we2bn3kq2w
    @user-we2bn3kq2w 4 หลายเดือนก่อน

    where can I get the above code?

  • @omarabubakr6524
    @omarabubakr6524 2 ปีที่แล้ว +2

    is this model better than the old monocular depth estimation?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +1

      Yeah way better actually

    • @omarabubakr6524
      @omarabubakr6524 2 ปีที่แล้ว

      @@NicolaiAI do you have the implementation of the model from scratch?

  • @karimhussein404
    @karimhussein404 2 ปีที่แล้ว +1

    Thanks Nicolai for your great videos, but do you know how to convert depth_map = prediction.cpu().numpy() to meters/cm/mm? what exactly the output is? I modified this code to detect objects with Yolo3 but I want to convert the mean object value to the meter.

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +2

      Thanks for watching! This is all relative normalized distances so I will have to do a mapping urself to another unit in ur environment

  • @johnconnor8717
    @johnconnor8717 2 ปีที่แล้ว +1

    Man your works are amazing I really appreciate. However, I don't understand that how you are aware of those technologies? I just heard by you. I mean how I can learn them own my own?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +2

      Thanks a lot for watching and the support! I just look up the latest and most cited papers within different subjects

    • @johnconnor8717
      @johnconnor8717 2 ปีที่แล้ว +1

      @@NicolaiAIDo you mean academic papers?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      @@johnconnor8717 yeye

    • @johnconnor8717
      @johnconnor8717 2 ปีที่แล้ว

      @@NicolaiAI I see thanks for informing :)

  • @sadiachowdhury3630
    @sadiachowdhury3630 2 ปีที่แล้ว +1

    Can we do this on a video input other than webcam?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Yes u can do that by replacing the camera index with the path to the video file

    • @sadiachowdhury3630
      @sadiachowdhury3630 2 ปีที่แล้ว

      Thank you! Can we calculate distance from this?

    • @kruemelkevin
      @kruemelkevin 2 ปีที่แล้ว

      @@sadiachowdhury3630 yes the Midas doesn't care what kind of input you use, as long as it is an image or imageseries

  • @ajaypatro1554
    @ajaypatro1554 10 หลายเดือนก่อน +1

    Does it require stereo image

    • @NicolaiAI
      @NicolaiAI  10 หลายเดือนก่อน

      Nope this is just for a single camera!

  • @zainulhaq6924
    @zainulhaq6924 2 ปีที่แล้ว +2

    Well, it seems to be quite slow. Are you using GPU in this video or not ?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +3

      Yes it's running on a gtx 1060. So not a great GPU but if u take the smaller models u will get faster inference

  • @siyamthandahlomendlini740
    @siyamthandahlomendlini740 9 หลายเดือนก่อน

    Please share the repo link next time. We really appreciate that, I'm sure you'll get more likes if you do

  • @aatkarelse8218
    @aatkarelse8218 2 ปีที่แล้ว +1

    Does anyone know if this depth map is absolute or relative?

    • @aatkarelse8218
      @aatkarelse8218 2 ปีที่แล้ว +1

      nevermind it is relative, is there a way to get this in absolute depth ?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +1

      @@aatkarelse8218 yeah it's the relative distance. U need some mapping with references if u want the absolute distances

    • @aatkarelse8218
      @aatkarelse8218 2 ปีที่แล้ว

      @@NicolaiAI yes, i was afraid it would be something like that, thx.

  • @durandthibaud9445
    @durandthibaud9445 2 ปีที่แล้ว

    Is there existing onnx of newest midas model ? 😇

    • @kruemelkevin
      @kruemelkevin 2 ปีที่แล้ว +1

      Look at their git lol

    • @durandthibaud9445
      @durandthibaud9445 2 ปีที่แล้ว

      @@kruemelkevin allready did, i had one for the last version, not for this one. Thx for the tips btw

  • @SuryaBoddu
    @SuryaBoddu ปีที่แล้ว

    Where's the discord server link?

  • @rauchu5861
    @rauchu5861 4 หลายเดือนก่อน +1

    and this is all with a regular camera right?

    • @NicolaiAI
      @NicolaiAI  4 หลายเดือนก่อน

      Yup works on every camera

  • @omarabubakr6524
    @omarabubakr6524 2 ปีที่แล้ว

    can you please send me this model from scratch?