This is the modified code for the MiDaS repo in which one can using webcams in real time image feed from your webcam by default but can be shifted to other sources too (other live input sources ).
There is a requirement to have intel chips for optimal performance hence when I run this code on my macbook air M2 --> shows 0 FPS