Image Classification
Transformers
PyTorch
TensorFlow
Safetensors
data2vec-vision
image-feature-extraction
vision
Instructions to use facebook/data2vec-vision-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/data2vec-vision-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-classification", model="facebook/data2vec-vision-large") pipe("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png")# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("facebook/data2vec-vision-large") model = AutoModel.from_pretrained("facebook/data2vec-vision-large") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "Data2VecVisionModel" | |
| ], | |
| "attention_probs_dropout_prob": 0.0, | |
| "auxiliary_channels": 256, | |
| "auxiliary_concat_input": false, | |
| "auxiliary_loss_weight": 0.4, | |
| "auxiliary_num_convs": 1, | |
| "drop_path_rate": 0.1, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.0, | |
| "hidden_size": 1024, | |
| "image_size": 224, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4096, | |
| "layer_norm_eps": 1e-12, | |
| "layer_scale_init_value": 0.1, | |
| "model_type": "data2vec-vision", | |
| "num_attention_heads": 16, | |
| "num_channels": 3, | |
| "num_hidden_layers": 24, | |
| "out_indices": [ | |
| 3, | |
| 5, | |
| 7, | |
| 11 | |
| ], | |
| "patch_size": 16, | |
| "pool_scales": [ | |
| 1, | |
| 2, | |
| 3, | |
| 6 | |
| ], | |
| "semantic_loss_ignore_index": 255, | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.19.0.dev0", | |
| "use_absolute_position_embeddings": false, | |
| "use_auxiliary_head": true, | |
| "use_mask_token": false, | |
| "use_mean_pooling": false, | |
| "use_relative_position_bias": false, | |
| "use_shared_relative_position_bias": true, | |
| "vocab_size": 8192 | |
| } | |