Image Classification
Transformers
Safetensors
English
metaclip_2
text-generation-inference
open-scene
Instructions to use prithivMLmods/MetaCLIP-2-Open-Scene with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/MetaCLIP-2-Open-Scene with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="prithivMLmods/MetaCLIP-2-Open-Scene") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoProcessor, AutoModelForImageClassification processor = AutoProcessor.from_pretrained("prithivMLmods/MetaCLIP-2-Open-Scene") model = AutoModelForImageClassification.from_pretrained("prithivMLmods/MetaCLIP-2-Open-Scene", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "MetaClip2ForImageClassification" | |
| ], | |
| "dtype": "float32", | |
| "id2label": { | |
| "0": "buildings", | |
| "1": "forest", | |
| "2": "glacier", | |
| "3": "mountain", | |
| "4": "sea", | |
| "5": "street" | |
| }, | |
| "initializer_factor": 1.0, | |
| "label2id": { | |
| "buildings": 0, | |
| "forest": 1, | |
| "glacier": 2, | |
| "mountain": 3, | |
| "sea": 4, | |
| "street": 5 | |
| }, | |
| "logit_scale_init_value": 2.6592, | |
| "model_type": "metaclip_2", | |
| "problem_type": "single_label_classification", | |
| "projection_dim": 384, | |
| "text_config": { | |
| "attention_dropout": 0.0, | |
| "dtype": "float32", | |
| "eos_token_id": 2, | |
| "hidden_act": "gelu", | |
| "hidden_size": 384, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1536, | |
| "layer_norm_eps": 1e-05, | |
| "max_position_embeddings": 77, | |
| "model_type": "metaclip_2_text_model", | |
| "num_attention_heads": 6, | |
| "num_hidden_layers": 12, | |
| "projection_dim": 384, | |
| "vocab_size": 901629 | |
| }, | |
| "transformers_version": "4.57.1", | |
| "vision_config": { | |
| "attention_dropout": 0.0, | |
| "dtype": "float32", | |
| "hidden_act": "gelu", | |
| "hidden_size": 384, | |
| "image_size": 224, | |
| "initializer_factor": 1.0, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 1536, | |
| "layer_norm_eps": 1e-05, | |
| "model_type": "metaclip_2_vision_model", | |
| "num_attention_heads": 6, | |
| "num_channels": 3, | |
| "num_hidden_layers": 12, | |
| "patch_size": 16, | |
| "projection_dim": 384 | |
| } | |
| } | |