← All models · DepthPro · Segformer

use case · multi-model

DepthPro × Segformer: how far is each thing?

Compose two models into one flow. Segformer answers "what is each pixel" — sky, road, person, building — across 150 semantic classes; DepthPro answers "how far is each pixel" on a metric scale. Combine them and you get the average distance of every labelled region, ranked near → far. Semantics meet geometry, entirely on your device. Needs WebGPU (for DepthPro).

A riverside at golden hour A sunlit bedroom Two cats on a couch
Drop a photo, or click to choose

Segmentation overlay

Regions, nearest first

Run to label the scene and rank each region by distance.

Segformer runs in a WASM Web Worker; DepthPro runs on WebGPU in its own worker. Each labelled region's mean depth is read from DepthPro's metric-scale field — the nearest region floats to the top of the list.

How the two connect

Segformer gives a class per pixel; DepthPro gives a depth per pixel. Overlay them and every pixel has both a label and a distance. Group by label, average the depth, and you know how far away "road", "building", or "person" is — a scene graph with geometry. No shared weights, no retraining: one model's per-pixel output indexes into the other's.

← Wild · DepthPro · Segformer →