File size: 922 Bytes
ee1dfc7
c0ab1a1
 
 
 
 
 
 
 
ee1dfc7
f5d6e2c
ee1dfc7
 
c0ab1a1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
title: DINOv2 Vision Demo
emoji: 🦕
colorFrom: green
colorTo: blue
sdk: gradio
sdk_version: "6.9.0"
python_version: "3.11"
app_file: app.py
pinned: false
license: apache-2.0
---

# DINOv2 Vision Demo

A lightweight demo of Meta's **DINOv2** self-supervised vision transformer, running entirely on CPU.

## Features

- **Image Classification** — Classify images against ImageNet-1k using `dinov2-small-imagenet1k-1-layer`.
- **Feature Visualization** — PCA projection of DINOv2 patch tokens rendered as an RGB map, revealing how the model perceives structure and semantics.
- **Image Similarity** — Compare two images via cosine similarity of their CLS token embeddings.

## Models

| Task | Model | Size |
|---|---|---|
| Classification | `facebook/dinov2-small-imagenet1k-1-layer` | ~86 MB |
| Features & Similarity | `facebook/dinov2-small` | ~86 MB |

All inference is performed on CPU — no GPU required.