grounding-dino-hf-results

All format examples · Machine-readable schema · Convert outputs to COCO

One-image batch, with tensors displayed as lists. With target_sizes=[(100,200)], corners are pixels; without target_sizes they are normalized. Labels are decoded prompt phrases.

Example

Illustrative values, not predictions from a model. Unless stated otherwise, the image is 200 pixels wide and 100 pixels high.

Readable projection: arrays and objects below illustrate the contents. The author returns Python objects/tensors or files, rather than this JSON document.

[
  {
    "boxes": [
      [10, 20, 50, 60]
    ],
    "labels": ["insect"],
    "scores": [0.8]
  }
]

Convert to a standard format

Use Converter.convert with source="grounding-dino-hf-results" and target="coco". Your application supplies the predictions and any required image context or producer settings. The adapter validates whether the output contains the information the target needs.

This importer accepts multiple images: set cardinality="collection".

General conversion example and required context

How to interpret it

Scope: Version-specific Hugging Face workflow matching the author model card box_threshold/text_threshold example. Later Transformers releases may change keys and signatures. Excludes raw model logits and the separate original GroundingDINO repository API.

Coordinates: boxes is N x 4 in [x1,y1,x2,y2] order. With target_sizes=[(height,width)] as in the model card, coordinates are original-image pixels; without target_sizes they are normalized. No clipping is done in this postprocessor.

Confidence: scores is the maximum sigmoid token-alignment score per retained query, strictly greater than box_threshold. labels contains decoded prompt phrases selected using text_threshold, not numeric category IDs.

Representation: Structure describes the tensor-to-list projection for schema validation, not a JSON exporter supplied by the model.

Evidence

Source inspection at the pinned revisions; no full inference observation claimed.

Source definitions