
depth_anything_v1_vitl
Depth estimation180 ops318.7K params
Dense prediction transformer that turns vision transformer tokens into a depth map with a convolutional 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({}) The dense prediction transformer (DPT) is an encoder-decoder architecture for dense prediction that uses a transformer, not a convolutional network, as the building block of its encoder. The paper applies it to monocular depth estimation and semantic segmentation. The motivation is that convolutional backbones downsample as they go, and the feature resolution and detail lost in their deeper stages are hard to recover in the decoder.
A vision transformer keeps the same number of tokens throughout, and every token can attend to every other, so the backbone has a global receptive field at every stage. DPT takes tokens from four stages of the transformer and reassembles them into image-like feature maps at four resolutions, with deeper layers assembled at lower resolution. Fusion blocks then combine the maps from consecutive stages and upsample the representation by a factor of two each time.
For monocular depth estimation the paper reports an improvement of up to 28% in relative performance over a fully-convolutional network. For semantic segmentation it reports 49.02% mIoU on ADE20K. The vision transformer also carries a readout token that is not tied to any image patch, and the paper's default design handles it with a projection that merges it into the other tokens.
Key idea. DPT replaces the convolutional backbone with a vision transformer and reassembles its tokens into multi-resolution image-like features that a convolutional decoder fuses into a dense 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},
}