Monocular Depth Estimation with MiDaS Neural Networks

Поделиться
HTML-код
  • Опубликовано: 4 янв 2025

Комментарии • 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 2 года назад +7

    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 года назад +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 года назад +2

    You are an excellent professor!

    • @NicolaiAI
      @NicolaiAI  2 года назад

      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 11 месяцев назад

      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

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

    Please mention the versions of all the dependencies

  • @sinchanag4561
    @sinchanag4561 2 года назад +2

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

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

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

  • @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?

  • @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

  • @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

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

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

  • @8eck
    @8eck 2 года назад

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

  • @krinodagamer6313
    @krinodagamer6313 2 года назад +2

    nice depth map

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      It's really amazing!

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

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

  • @cristian12346204
    @cristian12346204 2 года назад +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  2 года назад +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 2 года назад

      @@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?

  • @张瑞-x9s
    @张瑞-x9s 2 года назад

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

  • @来两屉包子
    @来两屉包子 Год назад

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

  • @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

  • @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 😊

  • @lucastavares7767
    @lucastavares7767 2 года назад +2

    Very good 😃 🇧🇷👊

    • @NicolaiAI
      @NicolaiAI  2 года назад +1

      Thanks for watching!

  • @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

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

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

  • @Noah-oc8pg
    @Noah-oc8pg 2 года назад

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

  • @HimanshuGupta-k3t
    @HimanshuGupta-k3t 10 месяцев назад

    where can I get the above code?

  • @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.

  • @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 Год назад +1

    Does it require stereo image

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

      Nope this is just for a single camera!

  • @ninja_ssj3
    @ninja_ssj3 2 года назад

    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

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

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

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

      CNNs are still far ahead of transformer on inference speed

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

    Can we train MiDas with our own data?

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

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

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

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

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

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

  • @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 :)

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

    and this is all with a regular camera right?

    • @NicolaiAI
      @NicolaiAI  10 месяцев назад

      Yup works on every camera

  • @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

  • @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

  • @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.

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

    Where's the discord server link?

  • @omarabubakr6524
    @omarabubakr6524 2 года назад

    can you please send me this model from scratch?