Downloads · 30 days
8
12% of all-time downloads
BiliSakura/last-vit-dino-vitb16
last-vit-dino-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 Transformer backbone with LAST-ViT pooling, pre-trained with DINO (self-supervised). Converted to HuggingFace Transformers format from the LAST-ViT dino0080 checkpoint.
Downloads · 30 days
8
12% of all-time downloads
All-time downloads
68
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 Transformer backbone with LAST-ViT pooling, pre-trained with DINO (self-supervised). Converted to HuggingFace Transformers format from the LAST-ViT dino0080 checkpoint.
Use this model as a feature extractor for downstream vision tasks (classification heads, detection, segmentation).
from transformers import ViTModel, ViTImageProcessor
from PIL import Image
model = ViTModel.from_pretrained("BiliSakura/last-vit-dino-vitb16")
processor = ViTImageProcessor.from_pretrained("BiliSakura/last-vit-dino-vitb16")
image = Image.open("your_image.jpg").convert("RGB")
inputs = processor(images=image, return_tensors="pt")
outputs = model(**inputs)
# Pooled output (CLS token)
pooled = outputs.last_hidden_state[:, 0, :] # (batch, 768)
# Or all patch tokens
patch_tokens = outputs.last_hidden_state[:, 1:, :] # (batch, 196, 768)