class documentation
class CVATImagePolygon(CVATImageAnno, HasCVATPoints): (source)
Constructor: CVATImagePolygon(label, points, occluded, attributes)
A polygon in CVAT image format.
Parameters | |
label | the polygon label string |
points | a list of (x, y) pixel coordinates defining the vertices of the polygon |
occluded | whether the polygon is occluded |
attributes | a list of CVATAttribute instances |
Class Method | from |
Creates a CVATImagePolygon from a <polygon> tag of a CVAT image annotation XML file. |
Class Method | from |
Creates a CVATImagePolygon from a fiftyone.core.labels.Polyline . |
Method | __init__ |
Undocumented |
Method | to |
Returns a fiftyone.core.labels.Polyline representation of the polygon. |
Instance Variable | label |
Undocumented |
Inherited from CVATImageAnno
:
Static Method | _parse |
Undocumented |
Static Method | _parse |
Undocumented |
Method | _to |
Undocumented |
Inherited from HasCVATPoints
(via CVATImageAnno
):
Instance Variable | points |
a list of (x, y) pixel coordinates defining points |
Property | points |
Undocumented |
Static Method | _parse |
Undocumented |
Static Method | _to |
Undocumented |
Static Method | _to |
Undocumented |
Static Method | _to |
Undocumented |
Creates a CVATImagePolygon
from a <polygon> tag of a
CVAT image annotation XML file.
Parameters | |
d | a dict representation of a <polygon> tag |
Returns | |
a CVATImagePolygon |
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 | |
polyline | a fiftyone.core.labels.Polyline |
metadata | a fiftyone.core.metadata.ImageMetadata for the
image |
Returns | |
a list of CVATImagePolygon instances |
Returns a fiftyone.core.labels.Polyline
representation of
the polygon.
Parameters | |
frame | the (width, height) of the image |
Returns | |
a fiftyone.core.labels.Polyline |