File size: 5,402 Bytes
688eb35 eaca75a 688eb35 aa28949 688eb35 eaca75a 688eb35 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | ---
library_name: onnx
pipeline_tag: feature-extraction
tags:
- eidora
- eidora-model-zoo
- onnx
- onnxruntime
- embeddings
- image
license: apache-2.0
base_model: google/vit-base-patch16-224
---
# ViT Base Patch16-224 — Image Embeddings
**Images · Supervised vision transformer · Visual comparison**
This Vision Transformer learns image representations through supervised classification. EIDORA returns its final-layer CLS representation instead of class scores.
- **Useful for:** Exploring visual similarities and comparing supervised transformer features with DINO or CNN models.
- **Example data:** Collection photographs, object images and digitized illustrations.
- **Main limitation:** ImageNet categories may not capture specialist cultural or historical distinctions. The model does not locate objects or produce class predictions.
- **Input size:** Each image is prepared at 224 × 224 pixels.
## Prepare your data
- **Provide image files.** Use JPEG (`.jpg`, `.jpeg`), PNG, BMP, GIF, TIFF (`.tif`, `.tiff`), or WebP, with one image for each item you want to compare. Add the files, a folder, or a ZIP archive as a Media Source, then select that source when running the model. Convert PDF pages or other unsupported document formats to individual images beforehand.
- **Select the frame or page.** EIDORA reads only the first frame of an animated image and the first page of a multipage image, including GIF and TIFF files. Export other frames or pages as separate image files when they should be represented.
- **Let EIDORA prepare the images.** EIDORA applies stored image orientation, converts to RGB, and places transparent pixels over a black background with the published defaults. It rescales and normalizes pixel values before creating the ONNX input; no manual resizing or normalization is required.
- **Check the model crop or resize.** The default stretches the image to 224 × 224 pixels, which changes the proportions of non-square images. Check the proportions of the prepared image when interpreting similarities.
- **Check image quality.** Borders, backgrounds, damage, and reproduction quality may affect similarities. Crop individual details beforehand when those details should be separate items.
Inspect the original images to assess what apparent similarities mean. Groups in a projection do not automatically establish a shared subject, authorship, date, or provenance.
## Technical details
| Property | Value |
| --- | --- |
| Modality | Image |
| Embedding | One 768-dimensional vector per image |
| Architecture | Vision Transformer Base; 12 layers, 12 attention heads, 16-pixel patches |
| Input size | 224 × 224 pixels |
| Preparation | Stretch to 224 × 224; bilinear interpolation; NCHW |
| Pixel normalization | Rescale by 1/255; mean `[0.5, 0.5, 0.5]`; standard deviation `[0.5, 0.5, 0.5]` |
| Pooling | Final-layer CLS token |
| Normalization and comparison | L2 normalization; cosine similarity |
| Input tensors | `pixel_values`; float32, `[1, 3, 224, 224]` |
| Output tensor | `embedding`; float32, `[1, 768]` |
| Runtime format | ONNX, opset 17 |
| Package version | 1.1.0 |
| Minimum EIDORA version | 0.3.0 |
| Model graph / package size | Approximately 343 MB / 343 MB |
| Declared execution providers | CUDA, CPU, CoreML |
| Adjustable preparation controls | Resize mode, Interpolation, Crop position, Short-edge size, Transparency background; original defaults preserved. |
Declared providers depend on the installed runtime, operating system, and hardware; this list does not establish that each provider has been tested.
## Source and citation
- **Upstream checkpoint:** [`google/vit-base-patch16-224`](https://huggingface.co/google/vit-base-patch16-224).
- **Pinned revision:** `3f49326eb077187dfe1c2a2bb15fbd74e6ab91e3`.
**Training data:** The [pinned upstream checkpoint card](https://huggingface.co/google/vit-base-patch16-224/blob/3f49326eb077187dfe1c2a2bb15fbd74e6ab91e3/README.md#training-data) identifies supervised pretraining on ImageNet-21K followed by fine-tuning on ImageNet-1K at 224 × 224 pixels. The [original paper](https://arxiv.org/abs/2010.11929) describes the Vision Transformer architecture. The pinned README confirms both training stages; it does not supply a complete image manifest.
The upstream card credits the original Google researchers and Ross Wightman for the earlier weight conversion. EIDORA removes the classification head, extracts the 768-dimensional final CLS token and L2-normalizes it. No additional training is declared.
**License:** Apache-2.0 is listed in the pinned upstream repository and the supplied package specification. Retain attribution and applicable notices.
- **Reference:** [An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale](https://arxiv.org/abs/2010.11929)
**BibTeX:**
```bibtex
@inproceedings{dosovitskiy2021image,
title={An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale},
author={Dosovitskiy, Alexey and Beyer, Lucas and Kolesnikov, Alexander and Weissenborn, Dirk and Zhai, Xiaohua and Unterthiner, Thomas and Dehghani, Mostafa and Minderer, Matthias and Heigold, Georg and Gelly, Sylvain and Uszkoreit, Jakob and Houlsby, Neil},
booktitle={ICLR},
year={2021}
}
```
Package settings are recorded in [config.yaml](config.yaml). See the [EIDORA website](https://www.eidora.org/) for application guidance.
|