Depth Estimation (DepthAny. V2)
This function block estimates per-pixel depth (distance) from a single RGB/BGR image. It produces a colorized depth visualization and a grayscale depth map that you can view, log, or feed to other processing blocks.
π₯ Inputs
Image RGB/BGR image used as the input for depth estimation.
π€ Outputs
Depth Vis Colorized visualization of estimated depth (easy to inspect).
Depth Map Grayscale depth map normalized to 0β255 (useful for analysis and downstream blocks).
πΉοΈ Controls
Model Size Choose the model accuracy / speed trade-off. Options typically include Small, Base, and Large.
Max Size Slider to limit the largest image dimension used during processing. Larger values give more detail but require more processing time.
π¨ Features
Produces both a visual depth map and a raw grayscale depth image for flexible use.
Model selection control lets you trade inference speed for accuracy.
Max Sizeprevents very large images from slowing down processing; the block automatically resizes inputs for efficient inference.Automatically uses available processing resources to give best possible throughput (UI-level behavior).
βοΈ Running mechanism
When the block runs it takes the current input image, optionally resizes it to respect the Max Size setting, processes it with the selected model size, and returns the two outputs: a color visualization and a normalized grayscale depth map. Larger models and larger Max Size values increase processing time.
π Usage Instructions
Connect an image-producing block to the
Imageinput.Select a
Model Sizebased on the accuracy vs. speed you need.Adjust
Max Sizeto limit processing time while preserving enough detail.Use the
Depth Visto quickly inspect results; useDepth Mapas numeric input for other processing blocks.
π‘ Tips and Tricks
For very large images, use
Image Resizerbefore this block to reduce processing time while preserving the important area.If the input image is low-resolution, try running
Super Resolutionupstream to improve detail before depth estimation.To visually inspect outputs in your workflow, connect
Depth Visto theShow Imageblock.Save results automatically by sending
Depth VisorDepth MaptoImage LoggerorImage Write.When experimenting, start with
Model Sizeset to Small to get quick feedback, then switch to Base or Large once settings are stable.
(hint: recommended companion blocks β Image Resizer, Super Resolution, Show Image, Image Logger, Image Write)
π οΈ Troubleshooting
If processing is too slow: lower
Model Sizeor reduceMax Size.If results look coarse: increase
Max Sizeor try a largerModel Size(if processing resources allow).If no output appears or the block stalls: ensure the upstream image block is supplying valid image frames.
If you need to keep recent results available for review, route outputs to
Image LoggerorShow Imageto confirm expectations.
Last updated