Downloads · 30 days
5
6% of all-time downloads
BiliSakura/last-vit-clip-vitb16
last-vit-clip-vitb16 is a image feature extraction model from BiliSakura. Use it for the image feature extraction task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
Vision encoder from OpenCLIP ViT-B/16 with LAST-ViT pooling. Converted to HuggingFace Transformers format from the LAST-ViT openaib16 checkpoint.
Downloads · 30 days
5
6% of all-time downloads
All-time downloads
85
Public
Parameters
85.8M
343 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors343 MB · 100%
From the Hugging Face model README
Vision encoder from OpenCLIP ViT-B/16 with LAST-ViT pooling. Converted to HuggingFace Transformers format from the LAST-ViT openai_b_16 checkpoint.
This is the vision encoder only (no text encoder). Use for image embedding extraction or as a backbone for vision tasks.
from transformers import ViTModel, ViTImageProcessor
from PIL import Image
model = ViTModel.from_pretrained("BiliSakura/last-vit-clip-vitb16")
processor = ViTImageProcessor.from_pretrained("BiliSakura/last-vit-clip-vitb16")
image = Image.open("your_image.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
# Image embeddings (CLS token)
embeddings = outputs.last_hidden_state[:, 0, :] # (batch, 768)