diff --git a/README.md b/README.md index b8de8b1..cc7ace9 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Run DINOv2 vision models in pure C++ on ggml. No Python, no PyTorch, no system dependencies at runtime. +

Video frames next to their DINOv2 patch PCA feature maps

+ [![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) diff --git a/assets/pca-demo.gif b/assets/pca-demo.gif new file mode 100644 index 0000000..8eefeda Binary files /dev/null and b/assets/pca-demo.gif differ diff --git a/assets/server-demo.cast b/assets/server-demo.cast new file mode 100644 index 0000000..6acd4df --- /dev/null +++ b/assets/server-demo.cast @@ -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"] diff --git a/assets/server-demo.gif b/assets/server-demo.gif new file mode 100644 index 0000000..63d964c Binary files /dev/null and b/assets/server-demo.gif differ diff --git a/tools/server/README.md b/tools/server/README.md index fdf6106..745e796 100644 --- a/tools/server/README.md +++ b/tools/server/README.md @@ -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 + +

dinov2-server: startup, /health, /v1/models, and a /v1/embeddings upload

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