DINOv2: Self-supervised visual feature learning
PyTorch vision transformers pretrained on 142M unlabeled images.
Learn more about DINOv2
import torch\nmodel = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14')\nembedding = model(torch.randn(1, 3, 224, 224))
Large-scale unsupervised pretraining
Models are trained on 142 million unlabeled images without annotations or manual labels, producing features that generalize across domains without fine-tuning requirements.
Multiple model scales with registers
Provides four model sizes (ViT-S/14, ViT-B/14, ViT-L/14, ViT-g/14) with optional register token variants that improve feature quality and stability in transformer layers.
Patch-level feature extraction
Generates both image-level and per-patch visual features that enable pixel-level tasks like segmentation and depth estimation alongside image classification.
import torch
from PIL import Image
from torchvision import transforms
model = torch.hub.load('facebookresearch/dinov2', 'dinov2_vits14')
transform = transforms.Compose([transforms.Resize(224), transforms.ToTensor()])
image = Image.open('photo.jpg')
input_tensor = transform(image).unsqueeze(0)
features = model(input_tensor)See how people are using DINOv2
Top in AI & ML
Related Repositories
Discover similar tools and frameworks used by developers
Qwen
Alibaba Cloud's pretrained LLMs supporting Chinese/English with up to 32K context length.
Stable Diffusion
CLIP-conditioned latent diffusion model for text-to-image synthesis.
Goose
LLM-powered agent automating local software engineering workflows.
tiktoken
Fast BPE tokenizer for OpenAI language models.
Continue
Multi-LLM coding agent with interactive and automated modes.
Related Reading
Guides and comparisons from the Greptile content library
The 7 Best AI Coding Tools for Complex Codebases
The best AI coding tools for complex codebases, ranked on accuracy, suggestion quality, and full-codebase context. See which ones you can actually trust.
Guide to Self-Hosted AI Code Review for GitLab and GitHub Enterprise [2026]
How self-hosted AI code review works on GitLab Self-Managed and GitHub Enterprise Server, how it compares to SaaS review tools, what to look for in a self-hosted tool, and what a self-hosted rollout actually takes.
Choosing the Right Code Review Tool: Better Alternatives to Graphite AI
A breakdown of the best alternatives to Graphite for code reviews. Compare AI tools like Trag, open-source solutions like Gerrit, and database-focused platforms like Visual Expert.
What Is Code Review? (And How to Keep It From Becoming the Bottleneck)
What code review is, how traditional, automated, and AI code review differ, and why review is now the bottleneck as AI writes more code. Plus how to pick a code review tool that catches real bugs.