Update README.md
Browse filesModel Overview:
The Vision Transformer (ViT) is a transformer encoder model designed for image recognition tasks. It was pretrained on a large dataset of 14 million images and 21,843 classes known as ImageNet-21k, and fine-tuned on ImageNet 2012, which consists of 1 million images across 1,000 classes.
How It Works:
Input Representation: Images are split into fixed-size patches (16x16 pixels) and linearly embedded. A special [CLS] token is added at the beginning of the sequence to indicate the image's classification.
Transformer Encoder: The model uses a transformer encoder architecture, similar to BERT for text, to process the image patches. Absolute position embeddings are added to encode spatial information before inputting the sequence into transformer layers.
Classification: After processing through the transformer layers, the output from the [CLS] token is used for image classification. This token's final hidden state represents the entire image's features.
Intended Uses:
Image Classification: ViT can be directly used for image classification tasks. By adding a linear layer on top of the [CLS] token, the model can classify images into one of the 1,000 ImageNet classes.
Limitations:
Resolution Dependency: While the model was fine-tuned on ImageNet at 224x224 resolution, better performance is achieved with higher resolutions such as 384x384. Larger models generally yield better results but require more computational resources.
Training Details:
Preprocessing: Images are resized to 224x224 pixels and normalized across RGB channels.
Training: Pretraining was conducted on TPUv3 hardware with a batch size of 4096 and learning rate warmup. Gradient clipping was applied during training to enhance stability.
Evaluation Results:
Performance: Detailed evaluation results on various benchmarks can be found in tables from the original paper. Fine-tuning the model on higher resolutions typically improves classification accuracy.
|
@@ -11,4 +11,8 @@ tags:
|
|
| 11 |
- vision transformer
|
| 12 |
- tensorflow
|
| 13 |
- vision
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
---
|
|
|
|
| 11 |
- vision transformer
|
| 12 |
- tensorflow
|
| 13 |
- vision
|
| 14 |
+
metrics:
|
| 15 |
+
- bleu
|
| 16 |
+
library_name: transformers
|
| 17 |
+
pipeline_tag: image-classification
|
| 18 |
---
|