Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
Input image to query
Comma seperated names of the objects to be detected in the image
Confidence level for object detection
Default: 0.25
Draw and visualize bounding boxes on the image
Default: true
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run adirik/grounding-dino using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "adirik/grounding-dino:efd10a8ddc57ea28773327e881ce95e20cc1d734c589f7dd01d2036921ed78aa", { input: { image: "https://replicate.delivery/pbxt/JlgUyeh3hBWO2SArXLtWqHVfDRSHuokfF1qkLW2Q6uHjLGXS/Two-Dogs-With-Cat.jpg", query: "a cat, a dog", box_threshold: 0.25, text_threshold: 0.2, show_visualisation: true } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "adirik/grounding-dino:efd10a8ddc57ea28773327e881ce95e20cc1d734c589f7dd01d2036921ed78aa", input={ "image": "https://replicate.delivery/pbxt/JlgUyeh3hBWO2SArXLtWqHVfDRSHuokfF1qkLW2Q6uHjLGXS/Two-Dogs-With-Cat.jpg", "query": "a cat, a dog", "box_threshold": 0.25, "text_threshold": 0.2, "show_visualisation": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "adirik/grounding-dino:efd10a8ddc57ea28773327e881ce95e20cc1d734c589f7dd01d2036921ed78aa", "input": { "image": "https://replicate.delivery/pbxt/JlgUyeh3hBWO2SArXLtWqHVfDRSHuokfF1qkLW2Q6uHjLGXS/Two-Dogs-With-Cat.jpg", "query": "a cat, a dog", "box_threshold": 0.25, "text_threshold": 0.2, "show_visualisation": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
detections
result_image
{ "completed_at": "2023-10-26T18:19:46.585648Z", "created_at": "2023-10-26T18:19:44.913468Z", "data_removed": false, "error": null, "id": "24j3axzc4tmw2gpcgudgd6j7ru", "input": { "image": "https://replicate.delivery/pbxt/JlgUyeh3hBWO2SArXLtWqHVfDRSHuokfF1qkLW2Q6uHjLGXS/Two-Dogs-With-Cat.jpg", "query": "a cat, a dog", "box_threshold": 0.25, "text_threshold": 0.2, "show_visualisation": true }, "logs": null, "metrics": { "predict_time": 1.694972, "total_time": 1.67218 }, "output": { "detections": [ { "bbox": [ 449, 363, 748, 624 ], "label": "a cat", "confidence": 0.5377296805381775 }, { "bbox": [ 116, 200, 427, 644 ], "label": "a dog", "confidence": 0.4842470586299896 }, { "bbox": [ 829, 236, 1113, 617 ], "label": "a dog", "confidence": 0.523659348487854 } ], "result_image": "https://pbxt.replicate.delivery/7LQRzArMui5fG6Ar0XZTQp2OPajq59y4PisLexznL6IBfLkjA/result.png" }, "started_at": "2023-10-26T18:19:44.890676Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/24j3axzc4tmw2gpcgudgd6j7ru", "cancel": "https://api.replicate.com/v1/predictions/24j3axzc4tmw2gpcgudgd6j7ru/cancel" }, "version": "efd10a8ddc57ea28773327e881ce95e20cc1d734c589f7dd01d2036921ed78aa" }
Choose a file from your machine
Hint: you can also drag files onto the input