whatisgithub

What is dinov2?

facebookresearch/dinov2 — explained in plain English

Analysis updated 2026-06-24

12,835Jupyter NotebookAudience · researcherComplexity · 3/5Setup · moderate

In one sentence

DINOv2 is Meta's self-supervised image AI trained on 142 million unlabeled images, producing general-purpose visual features usable for classification, object detection, depth estimation, and segmentation without retraining.

Mindmap

mindmap
  root((DINOv2))
    What it does
      Self-supervised learning
      General image features
      No labels required
    Model sizes
      21M parameters small
      1.1B parameters large
      Domain variants
    Downstream tasks
      Image classification
      Object detection
      Depth estimation
      Segmentation
    Usage
      PyTorch loading
      Jupyter notebooks
      Pretrained weights
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Load a pretrained DINOv2 model and extract image features in a few lines of Python to power a downstream image classifier.

USE CASE 2

Use the included depth estimation notebook to add monocular depth sensing to a computer vision pipeline.

USE CASE 3

Apply DINOv2 features to medical or microscopy imaging using the XRay-DINO or Cell-DINO domain-specific variants.

USE CASE 4

Fine-tune a small linear classifier on top of frozen DINOv2 features without retraining the full billion-parameter model.

What is it built with?

PythonPyTorchJupyter Notebook

How does it compare?

facebookresearch/dinov2chenyuntc/pytorch-bookkubernetes/community
Stars12,83512,83712,860
LanguageJupyter NotebookJupyter NotebookJupyter Notebook
Setup difficultymoderatemoderateeasy
Complexity3/53/51/5
Audienceresearcherresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Larger model variants require substantial GPU memory, the 1.1B model will not fit on most consumer graphics cards.

So what is it?

DINOv2 is a computer vision AI model from Meta AI Research that learns to understand images without any labels or human annotations. Most image recognition systems require large amounts of labeled training data, where humans tag each photo. DINOv2 was trained on 142 million images using a self-supervised approach, meaning it learned by finding patterns in the images themselves rather than from labels. The result is a model that produces rich, general-purpose image features. These features describe what is in a photo in a compact numerical form that other, simpler systems can then use for tasks like classifying images, detecting objects, estimating depth, or identifying things in video. Because the features are general, they transfer well to new tasks without needing to retrain the whole model from scratch. Four model sizes are available, ranging from 21 million parameters up to 1.1 billion. Larger models are more capable but require more computing resources. All models can be loaded in a few lines of Python code using PyTorch. The repository also includes specialized variants for biological microscopy imaging (Cell-DINO) and medical X-ray analysis (XRay-DINO), each trained on domain-specific image data. This repository contains the pretrained model weights and the Python code to load and use them. It also includes Jupyter notebooks demonstrating specific tasks such as depth estimation and image segmentation. A follow-on project called DINOv3 has since been released by the same team, continuing this line of research. The full README is longer than what was shown.

Copy-paste prompts

Prompt 1
Using DINOv2 from facebookresearch, write Python code to load the ViT-B14 model and extract embeddings for a folder of JPG images, then save them as a NumPy array.
Prompt 2
I want to use DINOv2 for image similarity search. Help me write code that computes cosine similarity between DINOv2 embeddings of two images and returns a score from 0 to 1.
Prompt 3
Using the DINOv2 depth estimation notebook as a starting point, how do I run monocular depth estimation on my own images and save the depth map as a grayscale PNG?
Prompt 4
How do I attach a simple linear classifier on top of frozen DINOv2 ViT-S features to classify my own 10-category image dataset without touching the backbone weights?

Frequently asked questions

What is dinov2?

DINOv2 is Meta's self-supervised image AI trained on 142 million unlabeled images, producing general-purpose visual features usable for classification, object detection, depth estimation, and segmentation without retraining.

What language is dinov2 written in?

Mainly Jupyter Notebook. The stack also includes Python, PyTorch, Jupyter Notebook.

How hard is dinov2 to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is dinov2 for?

Mainly researcher.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.