Disclaimer: The team releasing MAE did not write a model card for this model so this model card has been written by the Hugging Face team.
Model description
The Vision Transformer (ViT) is a transformer encoder model (BERT-like). Images are presented to the model as a sequence of fixed-size patches.
During pre-training, one randomly masks out a high portion (75%) of the image patches. First, the encoder is used to encode the visual patches. Next, a learnable (shared) mask token is added at the positions of the masked patches. The decoder takes the encoded visual patches and mask tokens as input and reconstructs raw pixel values for the masked positions.
By pre-training the model, it learns an inner representation of images that can then be used to extract features useful for downstream tasks: if you have a dataset of labeled images for instance, you can train a standard classifier by placing a linear layer on top of the pre-trained encoder.
Intended uses & limitations
You can use the raw model for image classification. See the
model hub
to look for
fine-tuned versions on a task that interests you.
How to use
Here is how to use this model:
from transformers import AutoImageProcessor, ViTMAEForPreTraining
from PIL import Image
import requests
url = 'http://images.cocodataset.org/val2017/000000039769.jpg'
image = Image.open(requests.get(url, stream=True).raw)
processor = AutoImageProcessor.from_pretrained('facebook/vit-mae-base')
model = ViTMAEForPreTraining.from_pretrained('facebook/vit-mae-base')
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
loss = outputs.loss
mask = outputs.mask
ids_restore = outputs.ids_restore
BibTeX entry and citation info
@article{DBLP:journals/corr/abs-2111-06377,
author = {Kaiming He and
Xinlei Chen and
Saining Xie and
Yanghao Li and
Piotr Doll{\'{a}}r and
Ross B. Girshick},
title = {Masked Autoencoders Are Scalable Vision Learners},
journal = {CoRR},
volume = {abs/2111.06377},
year = {2021},
url = {https://arxiv.org/abs/2111.06377},
eprinttype = {arXiv},
eprint = {2111.06377},
timestamp = {Tue, 16 Nov 2021 12:12:31 +0100},
biburl = {https://dblp.org/rec/journals/corr/abs-2111-06377.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
Runs of facebook vit-mae-base on huggingface.co
48.7K
Total runs
0
24-hour runs
199
3-day runs
-1.1K
7-day runs
5.4K
30-day runs
More Information About vit-mae-base huggingface.co Model
vit-mae-base huggingface.co is an AI model on huggingface.co that provides vit-mae-base's model effect (), which can be used instantly with this facebook vit-mae-base model. huggingface.co supports a free trial of the vit-mae-base model, and also provides paid use of the vit-mae-base. Support call vit-mae-base model through api, including Node.js, Python, http.
vit-mae-base huggingface.co is an online trial and call api platform, which integrates vit-mae-base's modeling effects, including api services, and provides a free online trial of vit-mae-base, you can try vit-mae-base online for free by clicking the link below.
facebook vit-mae-base online free url in huggingface.co:
vit-mae-base is an open source model from GitHub that offers a free installation service, and any user can find vit-mae-base on GitHub to install. At the same time, huggingface.co provides the effect of vit-mae-base install, users can directly use vit-mae-base installed effect in huggingface.co for debugging and trial. It also supports api for free installation.