For the complete documentation index, see llms.txt. This page is also available as Markdown.

Dino v3

Run DINOv3 classification models trained on Roboflow via the Serverless Cloud API

Use Meta's DINOv3 self-supervised vision model for classification through the Serverless Cloud API. DINOv3 produces strong general-purpose visual features that can be adapted to your dataset by training a linear probe classifier on Roboflow.

Code sample

1

Get your API Key

Create a Roboflow account, find your key on the Roboflow API settings page and make it available to your shell:

export ROBOFLOW_API_KEY="your-key-here"
2

Install the dependencies

Install the Inference SDK:

pip install -U inference-sdk supervision
3

Run the model

Call your trained DINOv3 classifier by its {workspace}/{model-slug} ID (see Versions, Trainings, and Models).

import os
import supervision as sv
from inference_sdk import InferenceHTTPClient

image = sv.load_image_from_url("https://media.roboflow.com/notebooks/examples/dog.jpeg")

client = InferenceHTTPClient(
    api_url="https://serverless.roboflow.com",
    api_key=os.environ["ROBOFLOW_API_KEY"],
)
# No pretrained aliases: train your own model and replace "your-project/1" with your model ID.
results = client.infer(image, model_id="your-project/1")
print(results)

Set api_url to match your deployment target:

  • https://serverless.roboflow.com for the Serverless Cloud API.

  • http://localhost:9001 for a local Inference server.

  • Your Dedicated Deployment URL for a private endpoint.

For self-hosted deployment and additional details, see the Inference documentation.

Last updated

Was this helpful?