HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

BEiT: BERT Pre-Training of Image Transformers

Hangbo Bao Li Dong Songhao Piao Furu Wei

BEiT: BERT Pre-Training of Image Transformers

Abstract

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.

Benchmarks

BenchmarkMethodologyMetrics
document-image-classification-on-rvl-cdipBEiT-B
Accuracy: 91.09%
Parameters: 87M
document-layout-analysis-on-publaynet-valBEiT-B
Figure: 0.957
List: 0.924
Overall: 0.931
Table: 0.973
Text: 0.934
Title: 0.866
image-classification-on-imagenetBEiT-L (ViT; ImageNet-22K pretrain)
Number of params: 331M
Top 1 Accuracy: 88.60%
image-classification-on-imagenetBEiT-L (ViT; ImageNet 1k pretrain)
Number of params: 86M
Top 1 Accuracy: 86.3%
image-classification-on-omnibenchmarkBeiT
Average Top-1 Accuracy: 30.1
self-supervised-image-classification-on-1BEiT-L (ViT)
Number of Params: 307M
Top 1 Accuracy: 86.3%
self-supervised-image-classification-on-1BEiT-B (ViT)
Number of Params: 86M
Top 1 Accuracy: 84.6%
semantic-segmentation-on-ade20kBEiT-L (ViT+UperNet)
Validation mIoU: 57.0
semantic-segmentation-on-ade20k-valBEiT-L (ViT+UperNet, ImageNet-22k pretrain)
mIoU: 57.0

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp