class documentation

A shape returned by the CVAT API.

Parameters
label_dictthe dictionary containing the label information loaded from the CVAT API
class_mapa dictionary mapping label IDs to class strings
attr_id_mapa dictionary mapping attribute IDs attribute names for every label
server_id_mapa dictionary mapping server IDs to FiftyOne label IDs
metadataa dictionary containing the width and height of the frame
indexthe tracking index of the shape
immutable_attrsimmutable attributes inherited by this shape from its track
occluded_attrsa dictionary mapping class names to the corresponding attribute linked to the CVAT occlusion widget, if any
group_id_attrsa dictionary mapping class names to the corresponding attribute linked to the CVAT group id, if any
group_idan optional group id value for this shape when it cannot be parsed from the label dict
Class Method polyline_to_detection Converts a fiftyone.core.labels.Polyline to a fiftyone.core.labels.Detection with a segmentation mask.
Class Method polylines_to_segmentation Converts a fiftyone.core.labels.Polylines to a fiftyone.core.labels.Segmentation.
Method __init__ Undocumented
Method to_detection Converts this shape to a fiftyone.core.labels.Detection.
Method to_instance Converts this shape to a fiftyone.core.labels.Detection with instance mask.
Method to_keypoint Converts this shape to a fiftyone.core.labels.Keypoint.
Method to_polyline Converts this shape to a fiftyone.core.labels.Polyline.
Method to_polylines Converts this shape to a fiftyone.core.labels.Polylines.
Instance Variable frame_size Undocumented
Instance Variable index Undocumented
Instance Variable points Undocumented
Method _parse_named_attribute Undocumented
Method _to_pairs_of_points Undocumented

Inherited from CVATLabel:

Instance Variable attributes Undocumented
Instance Variable fo_attributes Undocumented
Instance Variable id Undocumented
Instance Variable label Undocumented
Method _set_attributes Undocumented
Method _set_id Undocumented
@classmethod
def polyline_to_detection(cls, polyline, frame_size): (source)

Converts a fiftyone.core.labels.Polyline to a fiftyone.core.labels.Detection with a segmentation mask.

Parameters
polylinea fiftyone.core.labels.Polyline
frame_sizethe (width, height) of the frame
Returns
a fiftyone.core.labels.Detection
@classmethod
def polylines_to_segmentation(cls, polylines, frame_size, mask_targets): (source)

Converts a fiftyone.core.labels.Polylines to a fiftyone.core.labels.Segmentation.

Parameters
polylinesa fiftyone.core.labels.Polylines
frame_sizethe (width, height) of the frame
mask_targetsa dict mapping integer pixel values to label strings
Returns
a fiftyone.core.labels.Segmentation
def __init__(self, label_dict, class_map, attr_id_map, server_id_map, metadata, index=None, immutable_attrs=None, occluded_attrs=None, group_id_attrs=None, group_id=None): (source)
def to_detection(self): (source)
def to_instance(self): (source)

Converts this shape to a fiftyone.core.labels.Detection with instance mask.

Returns
a fiftyone.core.labels.Detection
def to_keypoint(self): (source)
def to_polyline(self, closed=False, filled=False): (source)
def to_polylines(self, closed=False, filled=False): (source)
frame_size = (source)

Undocumented

Undocumented

Undocumented

def _parse_named_attribute(self, label_dict, attr_key, attrs, default=None): (source)

Undocumented

def _to_pairs_of_points(self, points): (source)

Undocumented