[论文解读] Pyramid Vision Transformer: A Versatile Backbone for Dense Prediction without Convolutions
本文提出 Pyramid Vision Transformer (PVT),一种无卷积的 Transformer 骨干网络,具有多尺度特征金字塔和空间缩减注意力,能够在高分辨率密集预测任务中实现有竞争力的表现,覆盖检测、分割与分类任务。
Although using convolutional neural networks (CNNs) as backbones achieves great successes in computer vision, this work investigates a simple backbone network useful for many dense prediction tasks without convolutions. Unlike the recently-proposed Transformer model (e.g., ViT) that is specially designed for image classification, we propose Pyramid Vision Transformer~(PVT), which overcomes the difficulties of porting Transformer to various dense prediction tasks. PVT has several merits compared to prior arts. (1) Different from ViT that typically has low-resolution outputs and high computational and memory cost, PVT can be not only trained on dense partitions of the image to achieve high output resolution, which is important for dense predictions but also using a progressive shrinking pyramid to reduce computations of large feature maps. (2) PVT inherits the advantages from both CNN and Transformer, making it a unified backbone in various vision tasks without convolutions by simply replacing CNN backbones. (3) We validate PVT by conducting extensive experiments, showing that it boosts the performance of many downstream tasks, e.g., object detection, semantic, and instance segmentation. For example, with a comparable number of parameters, RetinaNet+PVT achieves 40.4 AP on the COCO dataset, surpassing RetinNet+ResNet50 (36.3 AP) by 4.1 absolute AP. We hope PVT could serve as an alternative and useful backbone for pixel-level predictions and facilitate future researches. Code is available at https://github.com/whai362/PVT.
研究动机与目标
- 开发适用于密集预测任务(检测、分割)且不使用卷积的纯 Transformer 骨干网络。
- 引入基于金字塔的特征层次结构以提供多尺度的高分辨率表示。
- 通过空间缩减注意力(SRA)降低高分辨率注意力的计算与内存成本。
- 证明 PVT 作为现成骨干网络在目标检测、实例/语义分割和图像分类中的有效性。
提出的方法
- 将输入表示为细粒度补丁(4x4),并构建四阶段金字塔以生成多尺度特征图(F1..F4)。
- 在每个阶段使用补丁嵌入以逐步降低特征图分辨率(4x、8x、16x、32x 步幅)。
- 用空间缩减注意力(SRA)替代标准多头注意力,通过在注意力前减少 K 和 V 来降低计算和显存。
- 在每一阶段共享一个 Transformer 编码器,具有特定的 L_i、E_i、N_i、R_i 配置,以在精度与效率之间取得平衡。
- 通过将 PVT 与 DETR 集成实现无卷积端到端的检测流程,并对分割/检测任务使用标准头来实现。
![(a) CNNs: VGG [ 54 ] , ResNet [ 22 ] , etc .](https://ar5iv.labs.arxiv.org/html/2102.12122/assets/x1.png)
实验结果
研究问题
- RQ1一个具有金字塔多尺度结构的纯 Transformer 骨干是否可以替代 CNN 骨干用于密集预测任务?
- RQ2如何重新设计注意力机制以高效处理高分辨率特征图?
- RQ3在密集预测基准上使用金字塔 Transformer 相对于 CNN 或 ViT 的精度与效率权衡如何?
主要发现
- PVT 的变体在相同参数量下于 COCO 目标检测(RetinaNet)上超越了部分 CNN 骨干(如 PVT-Small 40.4 AP 对比 ResNet50 36.3 AP)。
- PVT-Large 在 COCO 上取得 42.6 AP,参数量比 ResNeXt101-64x4d 少 30%。
- 在实例分割中,PVT-Tiny/Small/Medium 在 COCO 的 APm 上超过了 ResNet-18/50/101 基线,且 FLOPs 相当。
- ADE20K 上的语义分割显示 PVT 骨干比 CNN 骨干获得更高的 mIoU,PVT-Large 在多尺度测试下达到 42.1 mIoU 和 44.8。
- 纯 Transformer DETR 流水线结合 PVT(PVT+DETR)在 COCO val2017 上达到 34.7 AP,优于基于 ResNet50 的 DETR。
- 在 ImageNet 分类任务中,PVT 模型与 ViT/DeiT 及传统 CNN 的性能具有一定竞争力,但在密集预测任务上的增益更明显。
![(b) Vision Transformer [ 13 ]](https://ar5iv.labs.arxiv.org/html/2102.12122/assets/x2.png)
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。