Instructions to use microsoft/beit-large-patch16-224-pt22k-ft22k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/beit-large-patch16-224-pt22k-ft22k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="microsoft/beit-large-patch16-224-pt22k-ft22k") 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("microsoft/beit-large-patch16-224-pt22k-ft22k") model = AutoModelForImageClassification.from_pretrained("microsoft/beit-large-patch16-224-pt22k-ft22k") - Notebooks
- Google Colab
- Kaggle
Imagenet_21k Labels
#2
by MosJel - opened
In the code written in https://huggingface.co/microsoft/beit-large-patch16-224-pt22k-ft22k,
model.config.id2label there are 2 lines extra in the file. Line 9206 and line 15028. Better to omit these two lines in order to file becomes 21841 classes, otherwise it will give wrong answer after class id 9205 .