BEiT: BERT Pre-Training of Image Transformers
Paper • 2106.08254 • Published • 2
How to use nielsr/beit-base-patch16-224 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("image-classification", model="nielsr/beit-base-patch16-224")
pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png") # Load model directly
from transformers import AutoImageProcessor, AutoModelForImageClassification
processor = AutoImageProcessor.from_pretrained("nielsr/beit-base-patch16-224")
model = AutoModelForImageClassification.from_pretrained("nielsr/beit-base-patch16-224")BEiT (BERT pre-training of Image Transformers) model pre-trained in a self-supervised way on ImageNet-22k (14 million images, 21,841 classes) at resolution 224x224, and also fine-tuned on the same dataset at the same resolution. It was introduced in the paper BEiT: BERT Pre-Training of Image Transformers by Hangbo Bao, Li Dong and Furu Wei and first released in this repository.
Disclaimer: The team releasing BEiT did not write a model card for this model so this model card has been written by the Hugging Face team.