BEiT:图像 Transformer 的 BERT 预训练

BEiT: BERT Pre-Training of Image Transformers

韦福如 Furu Wei · Microsoft · 2021-06-15 · arXiv:2106.08254 ↗ · 被引 3728

打开互动全文版(逐段中英对照 + 图/公式 + 论文问答)→

摘要 · Abstract

我们提出了一种自监督视觉表示模型 BEiT,即来自图像 Transformer 的双向编码器表示。借鉴自然语言处理领域的 BERT,我们提出了一种掩码图像建模任务来预训练视觉 Transformer。具体来说,每张图像在预训练中有两种视图:图像块(如 16x16 像素)和视觉标记(即离散标记)。我们首先将原始图像“标记化”为视觉标记,然后随机掩码一些图像块并将其输入骨干 Transformer。预训练目标是根据被破坏的图像块恢复原始视觉标记。预训练 BEiT 后,我们通过在预训练编码器上附加任务层直接在下游任务上微调模型参数。在图像分类和语义分割上的实验结果表明,我们的模型取得了与先前预训练方法相竞争的结果。例如,基础大小的 BEiT 在 ImageNet-1K 上达到 83.2%的 top-1 准确率,显著优于相同设置下从头训练的 DeiT(81.8%)。此外,大型 BEiT 仅使用 ImageNet-1K 就达到 86.3%,甚至超过了在 ImageNet-22K 上进行监督预训练的 ViT-L(85.2%)。代码和预训练模型可在 https://aka.ms/beit 获取。

We introduce a self-supervised vision representation model BEiT, which stands for Bidirectional Encoder representation from Image Transformers. Following BERT developed in the natural language processing area, we propose a masked image modeling task to pretrain vision Transformers. Specifically, each image has two views in our pre-training, i.e, image patches (such as 16x16 pixels), and visual tokens (i.e., discrete tokens). We first "tokenize" the original image into visual tokens. Then we randomly mask some image patches and fed them into the backbone Transformer. The pre-training objective is to recover the original visual tokens based on the corrupted image patches. After pre-training BEiT, we directly fine-tune the model parameters on downstream tasks by appending task layers upon the pretrained encoder. Experimental results on image classification and semantic segmentation show that our model achieves competitive results with previous pre-training methods. For example, base-size BEiT achieves 83.2% top-1 accuracy on ImageNet-1K, significantly outperforming from-scratch DeiT training (81.8%) with the same setup. Moreover, large-size BEiT obtains 86.3% only using ImageNet-1K, even outperforming ViT-L with supervised pre-training on ImageNet-22K (85.2%). The code and pretrained models are available at https://aka.ms/beit.

核心贡献 · Key contributions

局限 · Limitations

论文章节 · Sections(共 16)

阅读逐段中英对照全文 →