All families

DPT

13 models, segmentation. Fewest parameters first.

DPT, the dense prediction transformer, replaces the convolutional backbone of a dense prediction network with a vision transformer and keeps a convolutional decoder to turn the tokens back into a per-pixel output. The reason to care is resolution: the transformer backbone processes representations at a constant and relatively high resolution and has a global receptive field at every stage, which the authors argue is exactly what per-pixel tasks need. Convolutional backbones, by contrast, downsample as they go, so feature resolution and granularity are lost in the deeper stages of the model and can be hard to recover in the decoder.

Read more

The decoder's key piece is a three-stage Reassemble operation that recovers image-like representations from the output tokens of arbitrary layers of the transformer encoder. Whatever the backbone, features are reassembled at four different stages and four different resolutions, with deeper layers assembled at lower resolution. A RefineNet-based fusion block then combines consecutive stages and progressively upsamples the representation by a factor of two in each fusion stage, so the final representation has half the resolution of the input image. The class token, which the paper calls the readout token, gets its own Read step, and the ablation found that fusing it into the other tokens through a projection layer yields the best performance. Three backbones are defined: ViT-Base with 12 transformer layers, ViT-Large with 24 layers and a wider feature size, and ViT-Hybrid, which computes the image embedding with a ResNet50.

The depth models were trained on a meta-dataset the authors call MIX 6, which contains about 1.4 million images. For monocular depth estimation the paper reports an improvement of up to 28% in relative performance over a state-of-the-art fully-convolutional network. For semantic segmentation the same architecture set a new state of the art on ADE20K with 49.02% mIoU.

The traced members come from three codebases, and the segmentation_models_pytorch build takes a timm classification model as its encoder and, because that backbone is a vision transformer, typically requires a fixed input image size. In Hugging Face Transformers the DPT decoder is compatible with the AutoBackbone class, so the same framework can sit on other computer vision backbones available in the library. The authors released their models at github.com/intel-isl/DPT.

AI-written summary; not reviewed by a person. Corrections welcome.

Paper: Vision Transformers for Dense Prediction

Filter and sort these in the model list