Polygon

class scenebox.models.annotation.Polygon(label=None, uid=None, confidence=None, attributes=None, coordinates=None, category_id=None)

Holds the coordinates and metadata of a single Polygon.

Several Polygons can be compiled together to form a PolygonAnnotation.

Variables:
  • coordinates – An ordered list of each coordinate inside the polygon. Each coordinate must be provided in the form (x, y). Every x, y value must be positive. Connections are assumed between consecutive coordinates.

  • label – Name of the region encapsulated by the polygon.

  • category_id – Label category ID.

  • confidence – Labelling confidence. Must be between 0 and 1.

  • attributes – Additional polygon metadata.