class documentation

A polygon in CVAT video format.

Parameters
framethe 0-based frame number
labelthe polygon label string
pointsa list of (x, y) pixel coordinates defining the vertices of the polygon
outsidewhether the polygon is outside (invisible)
occludedwhether the polygon is occluded
keyframewhether the frame is a keyframe
attributesa list of CVATAttribute instances
Class Method from_polygon_dict Creates a CVATVideoPolygon from a <polygon> tag of a CVAT video annotation XML file.
Class Method from_polyline Creates a CVATVideoPolygon from a fiftyone.core.labels.Polyline.
Method __init__ Undocumented
Method to_polyline Returns a fiftyone.core.labels.Polyline representation of the polygon.
Instance Variable frame Undocumented
Instance Variable label Undocumented

Inherited from CVATVideoAnno:

Static Method _parse_anno_dict Undocumented
Static Method _parse_attributes Undocumented
Method _to_attributes Undocumented

Inherited from HasCVATPoints (via CVATVideoAnno):

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, label, d): (source)

Creates a CVATVideoPolygon from a <polygon> tag of a CVAT video annotation XML file.

Parameters
labelthe object label
da dict representation of a <polygon> tag
Returns
a CVATVideoPolygon
@classmethod
def from_polyline(cls, frame_number, polyline, frame_size): (source)

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

Parameters
frame_numberthe frame number
polylinea fiftyone.core.labels.Polyline
frame_sizethe (width, height) of the video frames
Returns
a CVATVideoPolygon
def __init__(self, frame, label, points, outside=None, occluded=None, keyframe=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 video frames
Returns
a fiftyone.core.labels.Polyline

Undocumented

Undocumented