LAST-ViT DINO ViT-B/16 (Self-Supervised)

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).

Model Details

  • Architecture: ViT-B/16 (Vision Transformer Base, patch size 16×16)
  • Training scenario: Self-supervised (DINO)
  • Hidden size: 768
  • Num layers: 12
  • Num attention heads: 12
  • Image size: 224×224

Usage

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)

References

Downloads last month
11
Safetensors
Model size
85.8M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support