CoolFace
Modelpublic

SpatialHub/dinov2-onnx

sourceHugging Faceapache-2.0updated 4d agoView on Hugging Face
0likes
Model Card

DINOv2 ONNX Weights

This repository contains the ONNX-optimized weights for DINOv2, a foundation model used for extracting global visual feature representations and embeddings from images.

By converting the original PyTorch model weights into the ONNX format, these files allow you to run fast feature-extraction inference on both CPU and GPU without needing to install the heavy PyTorch framework.

Available Files

  • —`dinov2_vits14.onnx`: ViT-Small backbone (384-dim embeddings), optimized for high throughput and minimal memory usage.
  • —`dinov2_vitb14.onnx`: ViT-Base backbone (768-dim embeddings), balanced descriptor capacity and speed.
  • —`dinov2_vitl14.onnx`: ViT-Large backbone (1024-dim embeddings), standard high-quality representation model.
  • —`dinov2_vitg14.onnx` & `dinov2_vitg14.onnx.data`: ViT-Giant backbone (1536-dim embeddings), maximum representation capacity model.

How to Use

The easiest way to load and use these files is through the [spatialhub](https://github.com/spatialhub-ai/spatialhub) Python library.

Original Citation

If you use these models in academic work, please cite the original authors:

bibtex
@article{oquab2023dinov2,
  title={DINOv2: Learning Robust Visual Features without Supervision},
  author={Oquab, Maxime and Darcet, Timoth{\'e}e and Moutakanni, Theo and Vo, Huy and Szafraniec, Marc and Khalidov, Vasil and Fernandez, Pierre and Haziza, Daniel and Massa, Francisco and El-Nouby, Alaaeldin and others},
  journal={arXiv preprint arXiv:2304.07193},
  year={2023}
}