You probably seen one that uses a stereo source where the depth can be calculated fairly accuratly from parallax anon.
The problem of extracting depth form a single image 2D source isn't one limited by current technology it is an actually unsolvable problem.
The information you're trying to extract is simply not present in the source.
Imagine I show u a picture of a halfshaded sphere and ask you, "is this a small sphere that is close to camera, or a big sphere that is far away?"
"Or is it even a sphere? Is it perhaps a lit depression in a dark surface, or just pigment sitting on a flat surface?"
The correct answer would be: "lol, I dunno, because any of those things look the same".
Even if you built an algorithm that was this sci-fi tier strong AI that actually understood what it was looking at it would still have to guess depth in images.