All models

midas_dpt_swinv2_tiny_256

A dense prediction transformer for monocular depth: transformer encoder, convolutional decoder.

Depth estimation · 180 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (14 KB)

Open in a new tab

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.

At a glance

Parameters
318.7K
Operations
180
Framework
PyTorch
Recurrent
No
Published
ICCV (arXiv 2021)
Authors
René Ranftl, Alexey Bochkovskiy, Vladlen Koltun
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m12016
Graph hash
20030097a2c1ee942634b3bfde1e59e588c4c3e7d123a80c3959bc44a126baa8
Skeleton hash
46e70b8e279afba5d1189e6285bfd408986a5915cb5033768edca616fab407f9
Architecture hash
54e6979daac360b20a31a84092fa1b488e0701023c46490f24bb99c4ac01a9fc
Diagram SHA-256
c84d8dc5276a38ffd3423cc4041a1516f5f3445fd6f77a4d24a872f2bb0863da
TorchLens version
2.35.3
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

How this diagram was made

menagerie.classics.depth_anything_dpt:build_vitl: build({})

What it is

About this model's family

DPT, the dense prediction transformer, is an encoder-decoder architecture for dense prediction tasks such as monocular depth estimation and semantic segmentation. Its encoder is a vision transformer (ViT) used as the backbone in place of a convolutional network. Because a transformer keeps the number of tokens constant, the encoder holds the spatial resolution of its initial embedding through all stages and has a global receptive field at every one of them.

A convolutional decoder assembles the tokens back into image-like feature maps. A three-stage Reassemble operation recovers these maps from four transformer stages at four different resolutions. Fusion blocks based on RefineNet then combine the maps from consecutive stages, upsampling by a factor of two in each fusion stage. For monocular depth, the output head projects to a non-negative scalar for every pixel that represents inverse depth.

The paper reports that in zero-shot transfer for monocular depth estimation, the average relative improvement over MiDaS, which it calls the best published architecture, was more than 23% for DPT-Hybrid and 28% for DPT-Large. It also notes that DPT reaches its full potential when trained on large-scale datasets. The variants defined in the paper are DPT-Base, DPT-Large and DPT-Hybrid, named after the ViT backbone each one uses.

Key idea. DPT showed that a vision transformer can replace the convolutional backbone in dense prediction, with tokens reassembled into image-like maps and fused by a convolutional decoder.

  • DPT
  • dense prediction transformer
  • dense vision transformer
  • monocular depth estimation
  • midas dpt swinv2
  • dpt swinv2
  • depth estimation transformer

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@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}, 
}