Main Content

depthpro

R2026b

Depth Pro model for monocular depth estimation

Since R2026b

    Description

    Add-On Required: This feature requires the Computer Vision Toolbox Model for Apple DepthPro Network add-on.

    The depthpro object loads a pretrained Depth Pro deep learning model for estimating dense metric depth maps from monocular images. To estimate depth values from a loaded Depth Pro model, use the estimateDepth object function.

    Creation

    Description

    depthModel = depthpro loads a pretrained Depth Pro model. The model uses a DINOv2 Vision Transformer backbone as an encoder to extract local features, global context, and field‑of‑view (FOV) information. A decoder fuses these features and generates a dense depth map.

    example

    Properties

    expand all

    This property is read-only.

    Name of the depth estimation model, represented as 'Apple Depth Pro'.

    Data Types: char

    Object Functions

    estimateDepthEstimate depth map using Depth Pro
    releaseGPUMemoryRelease GPU memory allocated for model

    Examples

    collapse all

    Load a pretrained Depth Pro model for estimating depth.

    depthModel = depthpro;

    Read an image into the MATLAB® workspace.

    img = imread("office_6.jpg");

    Estimate the depth map and the inferred focal length by using the estimateDepth function of the depthpro object.

    [depthMap,focalLengthPx] = estimateDepth(depthModel,img);

    Display the input image alongside the estimated depth map.

    figure
    imshow(img)
    title("Input Image")

    Indoor office scene with a desk, monitor, chair, bookshelves, and glass doors overlooking a garden

    figure
    imagesc(depthMap)
    colormap("jet")
    colorbar
    title("Depth Map (meters)")
    axis image off

    Depth map of the office scene using jet colormap with a colorbar ranging from 2.0 to 3.8 meters. Nearby objects like the chair appear in blue and distant objects like the windows appear in red.

    disp("Estimated Focal Length = " + round(focalLengthPx) + " in pixels")
    Estimated Focal Length = 1144 in pixels
    

    References

    [1] Bochkovskii, Aleksei, Amaël Delaunoy, Hugo Germain, Marcel Santos, Yichao Zhou, Stephan R. Richter, and Vladlen Koltun. “Depth Pro: Sharp Monocular Metric Depth in Less Than a Second.” arXiv preprint, 2025. https://doi.org/10.48550/arXiv.2410.02073

    Version History

    Introduced in R2026b