加载中…
加载中…
The image encoder and visual projection of openai/clip-vit-base-patch32, saved on its own in half precision (176 MB instead of 605 MB). Weights are unchanged apart from the precision; image-to-image cosine similarities match the original within ~0.0003.
Used by SnapBuy AI to rank shopping listings by visual similarity in a size-limited serverless function.
from transformers import CLIPVisionModelWithProjection, CLIPImageProcessor
model = CLIPVisionModelWithProjection.from_pretrained(
"kunalkanaujiya/clip-vit-base-patch32-vision"
).float()
processor = CLIPImageProcessor.from_pretrained("kunalkanaujiya/clip-vit-base-patch32-vision")
embeddings = model(**processor(images=image, return_tensors="pt")).image_embeds
Original model by OpenAI, released under the MIT license. See the original model card for intended uses and limitations.