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.
翻译:我们推出一个自我监督的图像代表模型 BeiT, 代表图像变换器的双向编码器。 在自然语言处理区开发的 BERT 后, 我们提出一个隐藏图像模型任务, 用于预导图像变换器。 具体地说, 每张图像在预培训前有两个视图, 即图像补丁( 如 16x16 像素) 和视觉标志( 离散符号) 。 我们首先将原始图像“ 化为” 视觉标记。 然后我们随机遮盖一些图像补丁, 并将其输入主干变器。 在自然语言处理区开发 BERT 后, 我们提议对预培训前的图像变换器进行隐形图像模拟任务。 在预培训前的诱变器中, 我们直接微调下游任务的模式参数。 图像分类和语义分解的实验结果显示, 我们的模型通过以前的培训前的模型取得了竞争性结果。 例如, 基础的BeiT 在图像网- -1 中实现了83. 2% 顶端- 1 准确性 。 此外,, 将 高级的 Betra- train- train- train- train- train- trem- train- train- train- trade- trade- s