Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

Run DINOv2 vision models in pure C++ on ggml. No Python, no PyTorch, no system dependencies at runtime.

<p align="center"><img src="assets/pca-demo.gif" width="600" alt="Video frames next to their DINOv2 patch PCA feature maps"></p>

[![Release](https://img.shields.io/github/v/release/espetro/dinov2.cpp)](https://github.com/espetro/dinov2.cpp/releases)
[![CI](https://github.com/espetro/dinov2.cpp/actions/workflows/build.yml/badge.svg)](https://github.com/espetro/dinov2.cpp/actions/workflows/build.yml)
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
Expand Down
Binary file added assets/pca-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions assets/server-demo.cast
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{"version":2,"width":100,"height":30,"timestamp":1790118102,"idle_time_limit":2.0,"command":"bash /tmp/dinov2-media/server-demo.sh","title":"dinov2-server demo","env":{"SHELL":"/bin/zsh"}}
[0.020782, "o", "$ ./build-server/bin/dinov2-server -m models/dinov2-small/model.gguf --port 18080 &\r\n"]
[2.195679, "o", "$ curl -s localhost:18080/health\r\n"]
[3.138932, "o", "{\"status\":\"ok\"}"]
[3.13923, "o", "\r\n"]
[4.153014, "o", "$ curl -s localhost:18080/v1/models | jq\r\n"]
[5.077826, "o", "\u001b[1;39m{\u001b[0m\r\n \u001b[1;34m\"model\"\u001b[0m\u001b[1;39m:\u001b[0m \u001b[0;32m\"models/dinov2-small/model.gguf\"\u001b[0m\u001b[1;39m,\u001b[0m\r\n \u001b[1;34m\"version\"\u001b[0m\u001b[1;39m:\u001b[0m \u001b[0;32m\"0.4.0\"\u001b[0m\u001b[1;39m,\u001b[0m\r\n \u001b[1;34m\"hidden_size\"\u001b[0m\u001b[1;39m:\u001b[0m \u001b[0;39m384\u001b[0m\u001b[1;39m,\u001b[0m\r\n \u001b[1;34m\"patch_size\"\u001b[0m\u001b[1;39m:\u001b[0m \u001b[0;39m14\u001b[0m\u001b[1;39m,\u001b[0m\r\n \u001b[1;34m\"n_register_tokens\"\u001b[0m\u001b[1;39m:\u001b[0m \u001b[0;39m0\u001b[0m\u001b[1;39m,\u001b[0m\r\n \u001b[1;34m\"has_classifier\"\u001b[0m\u001b[1;39m:\u001b[0m \u001b[0;39mtrue\u001b[0m\u001b[1;39m,\u001b[0m\r\n \u001b[1;34m\"n_classes\"\u001b[0m\u001b[1;39m:\u001b[0m \u001b[0;39m1000\u001b[0m\r\n\u001b[1;39m}\u001b[0m\r\n"]
[6.087245, "o", "$ curl -s -F image=@assets/tench.jpg localhost:18080/v1/embeddings | jq '.cls | length'\r\n"]
[7.299248, "o", "\u001b[0;39m384\u001b[0m\r\n"]
[8.308766, "o", "$ kill %1 # stop the server\r\n"]
[9.827313, "x", "0"]
Binary file added assets/server-demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions tools/server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ best-effort**: `DINOV2_BUILD_SERVER` is OFF by default, it is not shipped in
release archives, and it is not covered by the tier-1 stability contract
([docs/tiers.md](../../docs/tiers.md)).

## Demo

<p align="center"><img src="../../assets/server-demo.gif" width="700" alt="dinov2-server: startup, /health, /v1/models, and a /v1/embeddings upload"></p>

Recorded with asciinema: [assets/server-demo.cast](../../assets/server-demo.cast)
(replay with `asciinema play assets/server-demo.cast`).

## Build

```bash
Expand Down
Loading