ultralytics-detect-json

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

One image, one instance; normalize=False. Corners and contours use original-image pixels. Image identity and dimensions come from separate context.

Example

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

[
  {
    "box": {
      "x1": 10,
      "x2": 50,
      "y1": 20,
      "y2": 60
    },
    "class": 0,
    "confidence": 0.8,
    "name": "insect"
  }
]

Convert to a standard format

Use Converter.convert with source="ultralytics-detect-json" 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.

General conversion example and required context

Inspect the intermediate representation for this example

This developer example prints ISIR, the internal representation used between adapters. Run from the repository checkout; no model download is needed.

python3 examples/formats/to_isir.py ultralytics-detect-json

How to interpret it

Scope: One image per call; top-level array of instances. No image path, dimensions or class-name lookup table in the JSON.

Coordinates: Default: original-image pixel corner coordinates. normalize=True divides x by image width and y by height, including segmentation coordinates.

Tracking: track_id is omitted for ordinary predictions; present for tracking results.

Empty: No detections produces an empty array.

Source definitions