← all repositories
facebookresearch/dinov2

Self-supervised vision features that actually transfer

Meta's DINOv2 trains vision transformers on 142 million unlabeled images, then hands you pretrained backbones that work out of the box with a linear layer.

13k stars Jupyter Notebook Computer VisionML Frameworks
dinov2
Velocity · 7d
+11
★ / day
Trend
steady
star history

What it does DINOv2 is a self-supervised training recipe and collection of pretrained vision transformers from Meta FAIR. The models learn visual features from 142 million images without a single label, then ship with lightweight heads for classification, depth estimation, and segmentation. You load them via PyTorch Hub in one line and treat them as frozen feature extractors.

The interesting bit The “registers” variant is the quiet fix to a real ViT pathology: vision transformers tend to accumulate junk information in certain tokens. DINOv2 adds register tokens that absorb this noise, improving feature quality without changing the architecture you actually use. The repo has since sprouted domain-specific forks—XRay-DINO, Cell-DINO, Channel-Adaptive DINO—suggesting the method generalizes beyond natural images.

Key highlights

  • Eight pretrained checkpoints from 21M to 1.1B parameters, all downloadable as .pth files or via torch.hub
  • Linear probes hit 79–87% on ImageNet without fine-tuning the backbone
  • One-line loading: torch.hub.load('facebookresearch/dinov2', 'dinov2_vitl14')
  • Pretrained heads for NYUd/KITTI depth estimation and ImageNet classification (1-layer and 4-layer options)
  • Active successor: DINOv3 is now the recommended path for new work

Caveats

  • XRay-DINO requires a form submission and manual email link; no direct download
  • Model weights carry a FAIR Noncommercial Research License, not permissive open source
  • The README notes DINOv3 supersedes this effort as of August 2025

Verdict Grab this if you need strong visual features without curating a dataset or training budget. Skip if you’re starting fresh—DINOv3 is where the maintainers are spending their time now.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.