arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.13677cs.CV
收藏

ResT:一种用于视觉识别的高效Transformer

ResT: An Efficient Transformer for Visual Recognition

State Key Laboratory for Novel Software Technology(现代软件工程国家重点实验室);Nanjing University(南京大学)

Qinglong Zhang, Yubin Yang

摘要:

本文提出了一种高效的多尺度视觉Transformer,称为RestT,能够作为一个通用的骨干图像识别。与现有的Transformer方法不同,该方法使用标准的Transformer块来处理具有固定分辨率的原始图像,我们的RestT具有以下几个优点:(1)建立了一个存储效率高的多头自注意,它通过一个简单的深度卷积来压缩内存,并在保持多头多样性的同时将交互投影到注意力-头维上;(2)位置编码被构造为空间注意力编码,具有更大的灵活性,可以处理任意大小的输入图像,无需插值或微调;(3)代替在每个阶段开始时的直接标记化,我们将补丁嵌入设计为在2D整形的令牌映射上具有步幅的重叠卷积操作的堆栈。我们在图像分类和下游任务上全面验证了ResT。实验结果表明,建议的RestT可以超过最近的国家的最先进的骨干由一个大的利润,展示了潜力的RestT作为强大的骨干。代码和模型将在https://github.com/wofmanaf/ResT上公开提供。

英文摘要:

This paper presents an efficient multi-scale vision Transformer, called ResT, that capably served as a general-purpose backbone for image recognition. Unlike existing Transformer methods, which employ standard Transformer blocks to tackle raw images with a fixed resolution, our ResT have several advantages: (1) A memory-efficient multi-head self-attention is built, which compresses the memory by a simple depth-wise convolution, and projects the interaction across the attention-heads dimension while keeping the diversity ability of multi-heads; (2) Position encoding is constructed as spatial attention, which is more flexible and can tackle with input images of arbitrary size without interpolation or fine-tune; (3) Instead of the straightforward tokenization at the beginning of each stage, we design the patch embedding as a stack of overlapping convolution operation with stride on the 2D-reshaped token map. We comprehensively validate ResT on image classification and downstream tasks. Experimental results show that the proposed ResT can outperform the recently state-of-the-art backbones by a large margin, demonstrating the potential of ResT as strong backbones. The code and models will be made publicly available at https://github.com/wofmanaf/ResT.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑