Instructions to use prithivMLmods/IMAGENETTE with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/IMAGENETTE with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="prithivMLmods/IMAGENETTE") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("prithivMLmods/IMAGENETTE") model = AutoModelForImageClassification.from_pretrained("prithivMLmods/IMAGENETTE", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download checkpoint-296/config.json from prithivMLmods/IMAGENETTE: direct link, hf CLI and curl.
- Browser
- Download file 1.49 kB
-
https://huggingface.co/prithivMLmods/IMAGENETTE/resolve/main/checkpoint-296/config.json
- Command line
-
hf download hf://prithivMLmods/IMAGENETTE/checkpoint-296/config.json
-
curl -L -o config.json https://huggingface.co/prithivMLmods/IMAGENETTE/resolve/main/checkpoint-296/config.json
1.49 kB
| { | |
| "architectures": [ | |
| "SiglipForImageClassification" | |
| ], | |
| "id2label": { | |
| "0": "tench", | |
| "1": "english springer", | |
| "2": "cassette player", | |
| "3": "chain saw", | |
| "4": "church", | |
| "5": "French horn", | |
| "6": "garbage truck", | |
| "7": "gas pump", | |
| "8": "golf ball", | |
| "9": "parachute" | |
| }, | |
| "initializer_factor": 1.0, | |
| "label2id": { | |
| "French horn": 5, | |
| "cassette player": 2, | |
| "chain saw": 3, | |
| "church": 4, | |
| "english springer": 1, | |
| "garbage truck": 6, | |
| "gas pump": 7, | |
| "golf ball": 8, | |
| "parachute": 9, | |
| "tench": 0 | |
| }, | |
| "model_type": "siglip", | |
| "problem_type": "single_label_classification", | |
| "text_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 768, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-06, | |
| "max_position_embeddings": 64, | |
| "model_type": "siglip_text_model", | |
| "num_attention_heads": 12, | |
| "num_hidden_layers": 12, | |
| "projection_size": 768, | |
| "torch_dtype": "float32", | |
| "vocab_size": 256000 | |
| }, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.50.0", | |
| "vision_config": { | |
| "attention_dropout": 0.0, | |
| "hidden_act": "gelu_pytorch_tanh", | |
| "hidden_size": 768, | |
| "image_size": 224, | |
| "intermediate_size": 3072, | |
| "layer_norm_eps": 1e-06, | |
| "model_type": "siglip_vision_model", | |
| "num_attention_heads": 12, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "patch_size": 16, | |
| "torch_dtype": "float32" | |
| } | |
| } | |