--- pipeline_tag: feature-extraction tags: - eidora - eidora-model-zoo - onnx - onnxruntime - embeddings - image - modality:image - clip base_model: openai/clip-vit-base-patch32 --- # CLIP ViT-B/32 Image Medium CLIP ViT-B/32 learns visual features in a representation space shared with text. This package exposes its normalized 512-dimensional image encoder only. ## Training Data and Checkpoint Provenance - **Architecture:** CLIP Vision Transformer Base with 32-pixel patches (ViT-B/32). - **Original checkpoint:** [openai/clip-vit-base-patch32](https://huggingface.co/openai/clip-vit-base-patch32). - **Pinned revision:** `b97b0100e55e367c057773c2a614676470b0d575`. - **Training data:** Publicly available image-caption data collected from the internet; the exact training dataset was not released. - **Training method:** Contrastive image–text pretraining; the exact upstream image–caption dataset was not released. - **Source:** CLIP ViT-B/32 (original author attribution retained). CLIP alignment relies on both encoders originating from the same upstream checkpoint and revision. ## Model Overview - **Model:** CLIP ViT-B/32 Image Medium - **EIDORA identifier:** `eidora/image-clip-vit-b32-medium` - **Modality:** Image - **Embedding dimensions:** 512 - **Embedding normalization:** L2-normalized - **Similarity measure:** Cosine similarity - **Package schema:** Version 3 - **Model version:** `0.1.0` ## EIDORA Use and Supported Modalities **Supported modality:** Images only. Researchers can use this package to: - Embed images for semantic collection discovery. - Compare image vectors with vectors from the corresponding CLIP Text model. - Contrast language-aligned features with visual-only CNN and DINO representations. Available EIDORA variants of the same checkpoint: - **Image:** [CLIP Image](https://huggingface.co/EIDORA/CLIP_ViTB32_Image) — image inputs only. - **Text:** [CLIP Text](https://huggingface.co/EIDORA/CLIP_ViTB32_Text) — text inputs only. - **Multimodal:** [CLIP Multimodal](https://huggingface.co/EIDORA/CLIP_ViTB32_Multimodal) — image and text inputs combined by EIDORA. The image-only repository does not accept a text input. ## Input and Preprocessing EIDORA prepares the image before inference: 1. Convert to RGB. 2. Resize the shorter side to 224 pixels, then take a center crop of **224 × 224**. 3. Use **bicubic** interpolation. Use **truncate** dimension rounding. 4. Rescale by `0.00392156862745098` and normalize each RGB channel. 5. Arrange the tensor in `NCHW` layout and pass `float32` `pixel_values` with shape `[batch, 3, 224, 224]`. **Mean:** `[0.48145466, 0.4578275, 0.40821073]` **Standard deviation:** `[0.26862954, 0.26130258, 0.27577711]` Normalization is performed by EIDORA and should not be applied a second time. The defaults in `config.yaml` determine the documented embedding behavior; alternate settings may change the vectors. ## Output Embeddings The ONNX output is `float32` with shape `['batch', 512]`. Each vector has **512 dimensions**, is **L2-normalized**, and is intended for **cosine similarity** comparisons. EIDORA uses the CLIP visual pooled projection and applies L2 normalization. The packaged graph expects images that EIDORA has already normalized. ## Runtime and Compatibility The package uses `model.onnx` and schema-v3 runtime declarations for image preparation and embedding output. It declares **`CPUExecutionProvider`**. Actual execution availability depends on the installed ONNX Runtime and EIDORA Desktop environment. `config.yaml` is authoritative for graph inputs, preprocessing, provider and embedding dimensions. ## Limitations - The checkpoint is trained on internet-derived image–text pairs and may encode biases. - Image–text correspondence scores are not statements of factual accuracy or identity. - This package does not accept text; use the sibling Text or Multimodal model as appropriate. Results should be evaluated against the intended research data and questions. ## Research Context and References ### Main paper **Learning Transferable Visual Models From Natural Language Supervision** Paper: https://arxiv.org/abs/2103.00020 The publication describes the upstream learning method and original model. The embeddings returned by EIDORA additionally depend on the specific preprocessing and output adaptation documented here. ### Primary citation (BibTeX) ```bibtex @inproceedings{radford2021learning, title={Learning Transferable Visual Models From Natural Language Supervision}, author={Radford, Alec and Kim, Jong Wook and Hallacy, Chris and Ramesh, Aditya and Goh, Gabriel and Agarwal, Sandhini and Sastry, Girish and Askell, Amanda and Mishkin, Pamela and Clark, Jack and Krueger, Gretchen and Sutskever, Ilya}, booktitle={ICML}, year={2021} } ``` ## License and Attribution The OpenAI CLIP source repository publishes MIT-licensed software. The linked upstream checkpoint information does not establish an independent weight license, so the MIT code license is not presented as one. EIDORA attributes the original checkpoint and research to OpenAI. No separate upstream checkpoint `LICENSE` file was supplied in the captured EIDORA repository; that absence should not be interpreted as permission or prohibition. ## Package Information - **Model repository:** `EIDORA/CLIP_ViTB32_Image` - **Package version:** `0.1.0` - **Package schema:** `3` - **EIDORA configuration:** `config.yaml` - **ONNX graph(s):** `model.onnx` - **Supported modality:** Image - **License identifier:** `other` - **Declared provider:** CPUExecutionProvider The configuration defines the authoritative model-facing runtime contract. Other packaged assets, where present, do not introduce additional inference modalities.