onnx-community / grounding-dino-tiny-ONNX

huggingface.co
Total runs: 6.1K
24-hour runs: 0
7-day runs: 4.6K
30-day runs: 5.1K
Model's Last Updated: January 06 2025
zero-shot-object-detection

Introduction of grounding-dino-tiny-ONNX

Model Details of grounding-dino-tiny-ONNX

https://huggingface.co/IDEA-Research/grounding-dino-tiny with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Zero-shot object detection with onnx-community/grounding-dino-tiny-ONNX using the pipeline API.

import { pipeline } from "@huggingface/transformers";

const detector = await pipeline("zero-shot-object-detection", "onnx-community/grounding-dino-tiny-ONNX");

const url = "http://images.cocodataset.org/val2017/000000039769.jpg";
const candidate_labels = ["a cat."];
const output = await detector(url, candidate_labels, {
  threshold: 0.3,
});
See example output
[
  { score: 0.45316222310066223, label: "a cat", box: { xmin: 343, ymin: 23, xmax: 637, ymax: 372 } },
  { score: 0.36190420389175415, label: "a cat", box: { xmin: 12, ymin: 52, xmax: 317, ymax: 472 } },
]

Example: Zero-shot object detection with onnx-community/grounding-dino-tiny-ONNX using the AutoModel API.

import { AutoModelForZeroShotObjectDetection, AutoProcessor, load_image } from "@huggingface/transformers";

// Load model and processor
const model_id = "onnx-community/grounding-dino-tiny-ONNX";
const processor = await AutoProcessor.from_pretrained(model_id);
const model = await AutoModelForZeroShotObjectDetection.from_pretrained(model_id, { dtype: "fp32" });

// Prepare image and text inputs
const image = await load_image("http://images.cocodataset.org/val2017/000000039769.jpg");
const text = "a cat."; // NB: text query needs to be lowercased + end with a dot

// Preprocess image and text
const inputs = await processor(image, text);

// Run model
const outputs = await model(inputs);

// Post-process outputs
const results = processor.post_process_grounded_object_detection(
  outputs,
  inputs.input_ids,
  {
    box_threshold: 0.3,
    text_threshold: 0.3,
    target_sizes: [image.size.reverse()],
  },
);
console.log(results);
See example output
[
  {
    scores: [ 0.45316222310066223, 0.36190420389175415 ],
    boxes: [
      [ 343.7238121032715, 23.02229404449463, 637.0737648010254, 372.6510000228882 ],
      [ 12.311229705810547, 52.27128982543945, 317.4389839172363, 472.60459899902344 ]
    ],
    labels: [ 'a cat', 'a cat' ]
  }
]

Runs of onnx-community grounding-dino-tiny-ONNX on huggingface.co

6.1K
Total runs
0
24-hour runs
1.3K
3-day runs
4.6K
7-day runs
5.1K
30-day runs

More Information About grounding-dino-tiny-ONNX huggingface.co Model

More grounding-dino-tiny-ONNX license Visit here:

https://choosealicense.com/licenses/apache-2.0

grounding-dino-tiny-ONNX huggingface.co

grounding-dino-tiny-ONNX huggingface.co is an AI model on huggingface.co that provides grounding-dino-tiny-ONNX's model effect (), which can be used instantly with this onnx-community grounding-dino-tiny-ONNX model. huggingface.co supports a free trial of the grounding-dino-tiny-ONNX model, and also provides paid use of the grounding-dino-tiny-ONNX. Support call grounding-dino-tiny-ONNX model through api, including Node.js, Python, http.

grounding-dino-tiny-ONNX huggingface.co Url

https://huggingface.co/onnx-community/grounding-dino-tiny-ONNX

onnx-community grounding-dino-tiny-ONNX online free

grounding-dino-tiny-ONNX huggingface.co is an online trial and call api platform, which integrates grounding-dino-tiny-ONNX's modeling effects, including api services, and provides a free online trial of grounding-dino-tiny-ONNX, you can try grounding-dino-tiny-ONNX online for free by clicking the link below.

onnx-community grounding-dino-tiny-ONNX online free url in huggingface.co:

https://huggingface.co/onnx-community/grounding-dino-tiny-ONNX

grounding-dino-tiny-ONNX install

grounding-dino-tiny-ONNX is an open source model from GitHub that offers a free installation service, and any user can find grounding-dino-tiny-ONNX on GitHub to install. At the same time, huggingface.co provides the effect of grounding-dino-tiny-ONNX install, users can directly use grounding-dino-tiny-ONNX installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

grounding-dino-tiny-ONNX install url in huggingface.co:

https://huggingface.co/onnx-community/grounding-dino-tiny-ONNX

Url of grounding-dino-tiny-ONNX

grounding-dino-tiny-ONNX huggingface.co Url

Provider of grounding-dino-tiny-ONNX huggingface.co

onnx-community
ORGANIZATIONS

Other API from onnx-community