Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuning

Weicong Liang, Yuhui Yuan, Henghui Ding, Xiao Luo, Weihong Lin +4 more
10/3/2022
55 citations
cs.CVcs.LG
transformer-attention

Official code: Expedit-LargeScale-Vision-Transformer/Expedit-DPT (10 stars, Python, MIT, last commit 2023-03-23). 2 more implementations below.

Abstract

Vision transformers have recently achieved competitive results across various vision tasks but still suffer from heavy computation costs when processing a large number of tokens. Many advanced approaches have been developed to reduce the total number of tokens in large-scale vision transformers, especially for image classification tasks.

Show full abstract

Typically, they select a small group of essential tokens according to their relevance with the class token, then fine-tune the weights of the vision transformer. Such fine-tuning is less practical for dense prediction due to the much heavier computation and GPU memory cost than image classification. In this paper, we focus on a more challenging problem, i.e., accelerating large-scale vision transformers for dense prediction without any additional re-training or fine-tuning. In response to the fact that high-resolution representations are necessary for dense prediction, we present two non-parametric operators, a token clustering layer to decrease the number of tokens and a token reconstruction layer to increase the number of tokens. The following steps are performed to achieve this: (i) we use the token clustering layer to cluster the neighboring tokens together, resulting in low-resolution representations that maintain the spatial structures; (ii) we apply the following transformer layers only to these low-resolution representations or clustered tokens; and (iii) we use the token reconstruction layer to re-create the high-resolution representations from the refined low-resolution representations. The results obtained by our method are promising on five dense prediction tasks, including object detection, semantic segmentation, panoptic segmentation, instance segmentation, and depth estimation.

View on arXivView PDF

Code Implementations(3)

Code implementations of this paper
RepositoryTypeStarsLanguageLicenseLast commit
Expedit-LargeScale-Vision-Transformer/Expedit-DPTOfficial10PythonMIT2023-03-23
Expedit-LargeScale-Vision-Transformer/Expedit-DINOOfficial8PythonApache-2.02023-10-29
Expedit-LargeScale-Vision-Transformer/Expedit-SegmenterOfficial6Jupyter NotebookApache-2.02023-08-23
MIT

[NeurIPS2022] This is the official implementation of the paper "Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuning" on DPT.

100Python, CudaMar 21, 20233 years agoMIT
Apache-2.0

[NeurIPS2022] This is the official implementation of the paper "Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuning" on DINO and MaskDINO.

81Python, CudaMar 23, 20233 years agoApache-2.0
Apache-2.0

[NeurIPS2022] This is the official implementation of the paper "Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuning" on Segmenter.

60Jupyter Notebook, PythonMar 21, 20233 years agoApache-2.0

Similar Papers

Cite this paper

@article{liang2022expediting,
  title  = {Expediting Large-Scale Vision Transformer for Dense Prediction without Fine-tuning},
  author = {Weicong Liang and Yuhui Yuan and Henghui Ding and Xiao Luo and Weihong Lin and Ding Jia and Zheng Zhang and Chao Zhang and Han Hu},
  year   = {2022},
  eprint = {2210.01035},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.01035}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.01035.svg)](https://codeofpaper.com/paper/2210.01035)

Discussion