Image Classification
Transformers
TensorBoard
Safetensors
vit
Generated from Trainer
Eval Results (legacy)
Instructions to use Schram03/fruits-classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Schram03/fruits-classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="Schram03/fruits-classification") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, AutoModelForImageClassification processor = AutoImageProcessor.from_pretrained("Schram03/fruits-classification") model = AutoModelForImageClassification.from_pretrained("Schram03/fruits-classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download config.json from Schram03/fruits-classification: direct link, hf CLI and curl.
- Browser
- Download file 1.98 kB
-
https://huggingface.co/Schram03/fruits-classification/resolve/main/config.json
- Command line
-
hf download hf://Schram03/fruits-classification/config.json
-
curl -L -o config.json https://huggingface.co/Schram03/fruits-classification/resolve/main/config.json
1.98 kB
| { | |
| "architectures": [ | |
| "ViTForImageClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.0, | |
| "encoder_stride": 16, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.0, | |
| "hidden_size": 768, | |
| "id2label": { | |
| "0": "Apple", | |
| "1": "Apricot", | |
| "2": "Avocado", | |
| "3": "Banana", | |
| "4": "Blackberrie", | |
| "5": "Blueberry", | |
| "6": "Cactus fruit", | |
| "7": "Cherry", | |
| "8": "Clementine", | |
| "9": "Cocos", | |
| "10": "Grape", | |
| "11": "Grapefruit", | |
| "12": "Guava", | |
| "13": "Kaki", | |
| "14": "Kiwi", | |
| "15": "Lemon", | |
| "16": "Limes", | |
| "17": "Lychee", | |
| "18": "Mandarine", | |
| "19": "Mango", | |
| "20": "Maracuja", | |
| "21": "Nectarine", | |
| "22": "Orange", | |
| "23": "Papaya", | |
| "24": "Passion Fruit", | |
| "25": "Peach", | |
| "26": "Pear", | |
| "27": "Pineapple", | |
| "28": "Plum", | |
| "29": "Pomegranate", | |
| "30": "Quince", | |
| "31": "Strawberry", | |
| "32": "Watermelon" | |
| }, | |
| "image_size": 224, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 3072, | |
| "label2id": { | |
| "LABEL_0": 0, | |
| "LABEL_1": 1, | |
| "LABEL_10": 10, | |
| "LABEL_11": 11, | |
| "LABEL_12": 12, | |
| "LABEL_13": 13, | |
| "LABEL_14": 14, | |
| "LABEL_15": 15, | |
| "LABEL_16": 16, | |
| "LABEL_17": 17, | |
| "LABEL_18": 18, | |
| "LABEL_19": 19, | |
| "LABEL_2": 2, | |
| "LABEL_20": 20, | |
| "LABEL_21": 21, | |
| "LABEL_22": 22, | |
| "LABEL_23": 23, | |
| "LABEL_24": 24, | |
| "LABEL_25": 25, | |
| "LABEL_26": 26, | |
| "LABEL_27": 27, | |
| "LABEL_28": 28, | |
| "LABEL_29": 29, | |
| "LABEL_3": 3, | |
| "LABEL_30": 30, | |
| "LABEL_31": 31, | |
| "LABEL_32": 32, | |
| "LABEL_4": 4, | |
| "LABEL_5": 5, | |
| "LABEL_6": 6, | |
| "LABEL_7": 7, | |
| "LABEL_8": 8, | |
| "LABEL_9": 9 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "model_type": "vit", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "patch_size": 16, | |
| "pooler_act": "tanh", | |
| "pooler_output_size": 768, | |
| "problem_type": "single_label_classification", | |
| "qkv_bias": true, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.52.3" | |
| } | |