ml-depth-pro
Depth Pro: Sharp Monocular Metric Depth in Less Than a Second.
Depth Pro is a research project from Apple that takes a single photograph and estimates how far away each part of the scene is, producing what researchers call a depth map. Unlike older tools that need camera settings or paired images to figure out distances, this one works from a single image with no extra information required. It produces a 2.25-megapixel depth map in about 0.3 seconds on a typical graphics card.
The key practical output is a per-pixel distance estimate measured in real units (meters), not just relative guesses. It also estimates the focal length of the camera that took the photo, which helps calibrate the depth reading. The model is described in a research paper published through Apple, and the code here is a re-trained reference version whose quality is close to, but not identical to, the paper results.
To use it, you install the Python package in a virtual environment, download the pretrained model weights via a provided script, and then either run a command-line tool on an image file or call it directly from Python code. The Python interface loads the model, feeds it an image, and returns depth values and focal length. There are also evaluation tools included for measuring how accurately the model traces edges and boundaries in depth maps.
The repository is likely useful to developers building apps that need to understand scene geometry from photos, such as augmented reality tools, 3D reconstruction pipelines, or image editing software that needs to separate foreground from background. It is a research release rather than a production SDK, so expect to do some setup work before it fits into an existing project.