Metric monocular depth from Depth Anything 3: routes each Image through a DA3 metric head and emits a deploy-time-resolved greyscale depth Image or a MetricDepthMap in metres, recovering scale from a predicted or assumed focal length.
Typical backends
A live image stream is turned into a normalised greyscale depth view and streamed to the browser for inspection.
Metric depth from recorded frames is shipped as structured data over HTTP for downstream measurement or logging.
Caveats
- I/O contractExactly one arm is produced, fixed at deploy time by the connected consumer; fan into two instances if a graph needs both the visualisation and the metric tensor.
- Hard constraintThe repository must point at a metric (DA3METRIC) checkpoint; an any-view or mono checkpoint emits relative depth, so the metric arm aborts because no focal length is available to recover metres.
- Parameter interactionMetres are recovered from the per-frame focal length the metric head predicts; when no intrinsics are predicted it falls back to a configured pixel focal length, and otherwise to a focal derived from an assumed field of view. Scenes far from the training domain can mis-estimate the focal and rescale the whole map.
- Parameter interactionThe processing resolution caps the longest input side: smaller values speed up inference at the cost of edge detail while larger values raise VRAM and latency; the prediction is then upsampled back to native size.
- State lifetimeThe recompute cadence is configurable: unset recomputes every frame, zero computes once then frees the model and replays that map forever, and a positive value recomputes every N seconds, freeing the model between passes.
- FallbackA cuda device silently falls back to CPU with a warning when no CUDA backend is visible, continuing at CPU speeds.
- AccuracyThe visualisation
Image is min-max normalised per frame, so absolute brightness is not comparable across frames; use the MetricDepthMap for any measurement or thresholding. - State lifetimeAll configuration is captured once at startup; runtime changes have no effect and require a redeploy. Leaving the repository revision at a moving branch yields non-reproducible builds.