Transformer recently has presented encouraging progress in computer vision. In this work, we present new baselines by improving the original Pyramid Vision Transformer (PVT v1) by adding three designs, including (1) linear complexity attention layer, (2) overlapping patch embedding, and (3) convolutional feed-forward network. With these modifications, PVT v2 reduces the computational complexity of PVT v1 to linear and achieves significant improvements on fundamental vision tasks such as classification, detection, and segmentation. Notably, the proposed PVT v2 achieves comparable or better performances than recent works such as Swin Transformer. We hope this work will facilitate state-of-the-art Transformer researches in computer vision. Code is available at https://github.com/whai362/PVT.
核心贡献 · Key contributions
提出使用平均池化的线性空间缩减注意力层,将复杂度降至线性。 Proposes linear spatial reduction attention (SRA) layer with average pooling, reducing complexity to linear.
引入重叠补丁嵌入以建模图像的局部连续性。 Introduces overlapping patch embedding to model local continuity of images.
添加带零填充的卷积前馈网络以捕获局部连续性并移除固定位置编码。 Adds convolutional feed-forward network with zero-padding to capture local continuity and remove fixed position encoding.
在 ImageNet 分类、COCO 检测和 ADE20K 分割上取得最先进结果。 Achieves state-of-the-art results on ImageNet classification, COCO detection, and ADE20K segmentation.
提供一系列不同规模的模型(B0-B5),性能优于 Swin Transformer 和 Twins。 Provides a family of models (B0-B5) with varying sizes, outperforming Swin Transformer and Twins.
局限 · Limitations
评估仅限于图像分类、目标检测和语义分割任务。 Evaluation limited to image classification, object detection, and semantic segmentation tasks.
在超出测试尺度的极高分辨率输入任务上性能可能下降。 Performance may degrade on tasks requiring very high-resolution inputs beyond tested scales.
消融研究仅在 PVT v2-B2 变体上进行;其他规模可能表现出不同的权衡。 Ablation studies only on PVT v2-B2 variant; other sizes may show different trade-offs.
未探索与其他先进架构(如基于 MLP 的主干网络)的集成。 Does not explore integration with other advanced architectures like MLP-based backbones.
论文章节 · Sections(共 14)
摘要Abstract
1 引言1 Introduction
2 相关工作2 Related Work
3.1 PVT v1 的局限性3.1 Limitations in PVT v1
3.2 线性空间缩减注意力3.2 Linear Spatial Reduction Attention