For the complete documentation index, see llms.txt. This page is also available as Markdown.

Objects

Things found at a place in the frame, with their box, identity and nested results

An object is something a model found at a place in the frame: a person, a car, a face, a word on a sign. Detectors return objects, and so does every component that finds things inside them. They are listed in objects, on the prediction for things found in the whole frame, and on an object for things found within it.

An object

{
  "classLabel": "person",
  "confidence": 0.9775,
  "x": 503.281,
  "y": 251.718,
  "width": 166.562,
  "height": 464.765,
  "orientation": 0
}

At its simplest, an object answers three questions: what (classLabel), how sure (confidence) and where (x, y, width, height). Everything else is added by the components of the Pop.

Fields

From the general to the specific:

Key
Type
Meaning

classLabel

string

What the object is

confidence

number

How certain the detector is, from 0 to 1

category

string

The group it belongs to, such as the categoryName of the component that found it. See Fields every result shares

x, y, width, height

number

The axis-aligned box, in source pixels. See Spatial Attributes

orientation

number

The object's direction, in radians; 0 when the ability reports none. See Orientation and outline

outline

array of points

The box turned to the object's orientation

trackId

integer

The object's identity across frames, when a tracking component follows it. See Tracks

objects

array of objects

Objects found within this one

classes

array

Labels for this object. See Classes and Texts

texts

array

Text read within this object. See Texts

keyPoints

array

Landmarks on this object. See Key Points

meshes

array

3D surfaces on this object. See Meshes

contours, mask

The object's exact shape. See Masks, Contours and Depth

raw

array

Tensor output for this object, such as an embedding. See Raw Output

details

array

Structured answers about this object. See Details

Only classLabel, confidence and the box are always there. The rest appears when the Pop produces it.

Objects within objects

A Pop that crops each detection and runs another model on the crop puts that model's results inside the object it was cropped from. Detecting people, then faces on each person, gives a person holding a face:

The nesting is the answer to "whose face is this?": the face belongs to the person it is listed under. Two people with a face each give two persons with one face each, never a flat list of two people and two faces to match up afterwards.

Nested objects are positioned in the full frame, like their parent, so they can be drawn on the original image without any offset. See Nested results use the same frame.

A crop that finds nothing leaves its parent without objects. A person whose face was not found is a person without a nested face, not a person with an empty list.

Example: cut out every object

The box is all you need to cut an object out of the original image. This saves one image per person found:

The coordinates are decimals; round them to whole pixels before cropping.

Next steps

Last updated