Image Classification
Transformers
Safetensors
English
custom_vit_nano
vit
nano
patch16
img224
custom_code
Instructions to use kd13/vit-nano-patch16-224 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kd13/vit-nano-patch16-224 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="kd13/vit-nano-patch16-224", trust_remote_code=True) pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoModelForImageClassification model = AutoModelForImageClassification.from_pretrained("kd13/vit-nano-patch16-224", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update preprocessor_config.json
Browse files- preprocessor_config.json +12 -1
preprocessor_config.json
CHANGED
|
@@ -1 +1,12 @@
|
|
| 1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor_type": "ViTImageProcessor",
|
| 3 |
+
"do_resize": true,
|
| 4 |
+
"size": {"shortest_edge": 256},
|
| 5 |
+
"do_center_crop": true,
|
| 6 |
+
"crop_size": {"height": 224, "width": 224},
|
| 7 |
+
"do_rescale": true,
|
| 8 |
+
"rescale_factor": 0.00392156862745098,
|
| 9 |
+
"do_normalize": true,
|
| 10 |
+
"image_mean": [0.5, 0.5, 0.5],
|
| 11 |
+
"image_std": [0.5, 0.5, 0.5]
|
| 12 |
+
}
|