class documentation

A polygon in CVAT image format.

Parameters
labelthe polygon label string
pointsa list of (x, y) pixel coordinates defining the vertices of the polygon
occludedwhether the polygon is occluded
attributesa list of CVATAttribute instances
Class Method from_polygon_dict Creates a CVATImagePolygon from a <polygon> tag of a CVAT image annotation XML file.
Class Method from_polyline Creates a CVATImagePolygon from a fiftyone.core.labels.Polyline.
Method __init__ Undocumented
Method to_polyline Returns a fiftyone.core.labels.Polyline representation of the polygon.
Instance Variable label Undocumented

Inherited from CVATImageAnno:

Static Method _parse_anno_dict Undocumented
Static Method _parse_attributes Undocumented
Method _to_attributes Undocumented

Inherited from HasCVATPoints (via CVATImageAnno):

Instance Variable points a list of (x, y) pixel coordinates defining points
Property points_str Undocumented
Static Method _parse_cvat_points_str Undocumented
Static Method _to_abs_points Undocumented
Static Method _to_cvat_points_str Undocumented
Static Method _to_rel_points Undocumented
@classmethod
def from_polygon_dict(cls, d): (source)

Creates a CVATImagePolygon from a <polygon> tag of a CVAT image annotation XML file.

Parameters
da dict representation of a <polygon> tag
Returns
a CVATImagePolygon
@classmethod
def from_polyline(cls, polyline, metadata): (source)

Creates a CVATImagePolygon from a fiftyone.core.labels.Polyline.

If the fiftyone.core.labels.Polyline is composed of multiple shapes, one CVATImagePolygon per shape will be generated.

Parameters
polylinea fiftyone.core.labels.Polyline
metadataa fiftyone.core.metadata.ImageMetadata for the image
Returns
a list of CVATImagePolygon instances
def __init__(self, label, points, occluded=None, attributes=None): (source)
def to_polyline(self, frame_size): (source)

Returns a fiftyone.core.labels.Polyline representation of the polygon.

Parameters
frame_sizethe (width, height) of the image
Returns
a fiftyone.core.labels.Polyline

Undocumented