
DPT_BEiT_L_512 (MiDaS)
Depth estimation180 ops318.7K params
MiDaS DPTDepthModel, the SwinV2-T 256 build: a transformer backbone with a convolutional depth decoder.
Depth estimation · 180 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
How this diagram was made
menagerie.classics.depth_anything_dpt:build_vitl: build({}) About this model's family
This is a DPT depth model: the dense prediction transformer that uses a vision transformer in place of a convolutional network as the backbone and a convolutional decoder to produce the dense output. Monocular depth estimation is cast as a dense regression problem, so the network emits one depth value per pixel. The authors picked this task deliberately: transformers are known to realize their full potential only when an abundance of training data is available, and large depth meta-datasets can be built from existing sources.
The backbone processes representations at a constant and relatively high resolution and has a global receptive field at every stage, which the paper credits for finer-grained and more globally coherent predictions than fully-convolutional networks give. The decoder reassembles tokens from four different stages at four different resolutions, deeper layers at lower resolution. RefineNet-based fusion blocks then upsample by a factor of two per stage until the representation has half the resolution of the input image, and a task-specific head produces the final depth map.
Training follows the MiDaS protocol with a scale- and shift-invariant trimmed loss on inverse depth plus a gradient-matching loss. The training set, MIX 6, holds about 1.4 million images. In zero-shot cross-dataset transfer the average relative improvement over MiDaS is more than 23% for DPT-Hybrid and 28% for DPT-Large, and the ResNext101-WSL baseline in the backbone ablation corresponds to the original MiDaS architecture. Both DPT variants also keep similar latency to MiDaS even though DPT-Large is about 3 times larger.
Key idea. Assembling tokens from several stages of a vision transformer into image-like representations at several resolutions and fusing them with a convolutional decoder into a full-resolution depth prediction.
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
@misc{ranftl2021visiontransformersdenseprediction,
title={Vision Transformers for Dense Prediction},
author={René Ranftl and Alexey Bochkovskiy and Vladlen Koltun},
year={2021},
eprint={2103.13413},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2103.13413},
}