Visual detection models localize an object of interest in an image by returning a box that bounds that object, as well as the type of that object, also referred to as the class. A detector can detect multiple images of different classes per image. For each detection, a detector outputs a confidence score that is independent of any other detections.

The output object in Hive detection APIs lists each detected object, including:

  • The geometric description of the detected bounding box.
  • The predicted class for the detection.
  • For some model’s, the confidence score for the detection.

Hive's detector models include the logo detection model and common object detection model.

{
  "output": [
    {
      "time": 0,
      "bounding_poly": [
        {
          "vertices": [
            {
              "x": 257.5439780950546,
              "y": 155.76384043693542
            },
            {
              "x": 288.42563331127167,
              "y": 155.76384043693542
            },
            {
              "x": 288.42563331127167,
              "y": 197.2337465286255
            },
            {
              "x": 257.5439780950546,
              "y": 197.2337465286255
            }
          ],
          "dimensions": {
            "top": 155.76384043693542,
            "bottom": 197.2337465286255,
            "left": 257.5439780950546,
            "right": 288.42563331127167
          },
          "classes": [
            {
              "class": "orange",
              "score": 0.586775541305542,
              "label": "orange"
            }
          ],
          "meta": {
            "score": 0.586775541305542,
            "type": "coco"
          }
        }
      ]
    }
  ]
}

Name

Description

time

Timestamp in seconds of the frame extracted from original media. Always 0 for images.

bounding_poly

List containing all detections.

vertices

Four coordinates representing the detected bounding box. Starts at the top-left of the box and lists remaining vertices in clockwise order.

dimensions

Four sides representing the detected bounding box.

top: y-dimension of the top side.
bottom: y-dimension of the bottom side.
right: x-dimension of the right side.
left: x-dimension of the left side.

classes: class

Predicted class

classes: score

Confidence score for the detection.

Note that vertices and dimensions are expressed in the standard image processing coordinate system: