In this model, we have used the pretrained dpt_hybrid model to find the distance of the center of the depth map generated by the MiDaS model.
You can clone the MiDaS repo by typing
https://github.com/isl-org/MiDaS.gitAnd download the weights from
https://github.com/isl-org/MiDaS/releases/download/v3/dpt_hybrid_384.pt
MiDaS model does not give the direct distance of points but a depth map.
In this model, we calculated the center depth value and converted it into the distance.
We performed an experiment, in which an object is placed at various distances from the camera and it's depth value is checked and on the basis of that depth valye and known distance, we find an equation and on the basis of that equation we find the distance of the center point of the scene.