Skip to content

Depth Estimation

Class: DepthEstimationBlockV1

Source: inference.core.workflows.core_steps.models.foundation.depth_estimation.v1.DepthEstimationBlockV1

        🎯 This workflow block performs depth estimation on images using Apple's DepthPro model. It analyzes the spatial relationships
        and depth information in images to create a depth map where:

        πŸ“Š Each pixel's value represents its relative distance from the camera
        πŸ” Lower values (darker colors) indicate closer objects
        πŸ”­ Higher values (lighter colors) indicate further objects

        The model outputs:
        1. πŸ—ΊοΈ A depth map showing the relative distances of objects in the scene
        2. πŸ“ The camera's field of view (in degrees)
        3. πŸ”¬ The camera's focal length

        This is particularly useful for:
        - πŸ—οΈ Understanding 3D structure from 2D images
        - 🎨 Creating depth-aware visualizations
        - πŸ“ Analyzing spatial relationships in scenes
        - πŸ•ΆοΈ Applications in augmented reality and 3D reconstruction

        ⚑ The model runs efficiently on Apple Silicon (M1-M4) using Metal Performance Shaders (MPS) for accelerated inference.

Type identifier

Use the following identifier in step "type" field: roboflow_core/depth_estimation@v1to add the block as as step in your workflow.

Properties

Name Type Description Refs
name str Enter a unique identifier for this step.. ❌
model_version str The Depth Estimation model to be used for inference.. ❌

The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.

Available Connections

Compatible Blocks

Check what blocks you can connect to Depth Estimation in version v1.

Input and Output Bindings

The available connections depend on its binding kinds. Check what binding kinds Depth Estimation in version v1 has.

Bindings
  • input

    • images (image): The image to infer on..
  • output

    • image (image): Image in workflows.
    • normalized_depth (numpy_array): Numpy array.
Example JSON definition of step Depth Estimation in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/depth_estimation@v1",
    "images": "$inputs.image",
    "model_version": "depth-anything-v2/small"
}