Instructions to use BiliSakura/last-vit-dino-vitb16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BiliSakura/last-vit-dino-vitb16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-feature-extraction", model="BiliSakura/last-vit-dino-vitb16")# Load model directly from transformers import AutoImageProcessor, AutoModel processor = AutoImageProcessor.from_pretrained("BiliSakura/last-vit-dino-vitb16") model = AutoModel.from_pretrained("BiliSakura/last-vit-dino-vitb16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
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
- Repository: ChengShiest/LAST-ViT
- DINO training: facebookresearch/dino
- Original weights: dino0080.pth
- Downloads last month
- 11
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support