Instructions to use optimum/vit-base-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use optimum/vit-base-patch16-224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="optimum/vit-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("optimum/vit-base-patch16-224") model = AutoModelForImageClassification.from_pretrained("optimum/vit-base-patch16-224") - Notebooks
- Google Colab
- Kaggle
Specify the head of the model in the model card
Browse files
README.md
CHANGED
|
@@ -17,7 +17,7 @@ widget:
|
|
| 17 |
|
| 18 |
# ONNX convert of ViT (base-sized model)
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
# Vision Transformer (base-sized model)
|
| 23 |
|
|
|
|
| 17 |
|
| 18 |
# ONNX convert of ViT (base-sized model)
|
| 19 |
|
| 20 |
+
Conversion of [ViT-base](https://huggingface.co/google/vit-base-patch16-224), which has a classification head to perform **image classification**.
|
| 21 |
|
| 22 |
# Vision Transformer (base-sized model)
|
| 23 |
|