CrossFormer: A Versatile Vision Transformer Based on Cross-scale
Attention
- URL: http://arxiv.org/abs/2108.00154v1
- Date: Sat, 31 Jul 2021 05:52:21 GMT
- Title: CrossFormer: A Versatile Vision Transformer Based on Cross-scale
Attention
- Authors: Wenxiao Wang, Lu Yao, Long Chen, Deng Cai, Xiaofei He and Wei Liu
- Abstract summary: We propose Cross-scale Embedding Layer (CEL) and Long Short Distance Attention (LSDA)
CEL blends each embedding with multiple patches of different scales, providing the model with cross-scale embeddings.
LSDA splits the self-attention module into a short-distance and long-distance one, also lowering the cost but keeping both small-scale and large-scale features in embeddings.
- Score: 37.39327010226153
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: Transformers have made much progress in dealing with visual tasks. However,
existing vision transformers still do not possess an ability that is important
to visual input: building the attention among features of different scales. The
reasons for this problem are two-fold: (1) Input embeddings of each layer are
equal-scale without cross-scale features; (2) Some vision transformers
sacrifice the small-scale features of embeddings to lower the cost of the
self-attention module. To make up this defect, we propose Cross-scale Embedding
Layer (CEL) and Long Short Distance Attention (LSDA). In particular, CEL blends
each embedding with multiple patches of different scales, providing the model
with cross-scale embeddings. LSDA splits the self-attention module into a
short-distance and long-distance one, also lowering the cost but keeping both
small-scale and large-scale features in embeddings. Through these two designs,
we achieve cross-scale attention. Besides, we propose dynamic position bias for
vision transformers to make the popular relative position bias apply to
variable-sized images. Based on these proposed modules, we construct our vision
architecture called CrossFormer. Experiments show that CrossFormer outperforms
other transformers on several representative visual tasks, especially object
detection and segmentation. The code has been released:
https://github.com/cheerss/CrossFormer.
Related papers
Err
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.