class documentation

Class representing a VOC annotations file.

Parameters
paththe path to the image
folderthe name of the folder containing the image
filenamethe image filename
segmentedwhether the objects are segmented
metadataa fiftyone.core.metadata.ImageMetadata instance
objectsa list of VOCObject instances
Class Method from_dict Creates a VOCAnnotation instance from a JSON dict representation.
Class Method from_labeled_image Creates a VOCAnnotation instance for the given labeled image data.
Class Method from_xml Creates a VOCAnnotation instance from an XML annotations file.
Method __init__ Undocumented
Method to_detections Returns a fiftyone.core.labels.Detections representation of the objects in the annotation.
Instance Variable filename Undocumented
Instance Variable folder Undocumented
Instance Variable metadata Undocumented
Instance Variable objects Undocumented
Instance Variable path Undocumented
Instance Variable segmented Undocumented
@classmethod
def from_dict(cls, d): (source)

Creates a VOCAnnotation instance from a JSON dict representation.

Parameters
da JSON dict
Returns
a VOCAnnotation
@classmethod
def from_labeled_image(cls, metadata, detections, path=None, filename=None, extra_attrs=True): (source)

Creates a VOCAnnotation instance for the given labeled image data.

Parameters
metadataa fiftyone.core.metadata.ImageMetadata instance for the image
detectionsa fiftyone.core.labels.Detections
path:Nonethe absolute path to the image
filename:Nonethe filename of the image
extra_attrs:True

whether to include extra object attributes. Supported values are:

  • True: include all extra attributes found
  • False: do not include extra attributes
  • a name or list of names of specific attributes to include
Returns
a VOCAnnotation
@classmethod
def from_xml(cls, xml_path): (source)

Creates a VOCAnnotation instance from an XML annotations file.

Parameters
xml_paththe path to the XML file
Returns
a VOCAnnotation
def __init__(self, path=None, folder=None, filename=None, segmented=None, metadata=None, objects=None): (source)

Undocumented

def to_detections(self, extra_attrs=True): (source)

Returns a fiftyone.core.labels.Detections representation of the objects in the annotation.

Parameters
extra_attrs:True

whether to load extra annotation attributes onto the imported labels. Supported values are:

  • True: load all extra attributes found
  • False: do not load extra attributes
  • a name or list of names of specific attributes to load
Returns
a fiftyone.core.labels.Detections
filename: None = (source)

Undocumented

Undocumented

metadata: None = (source)

Undocumented

Undocumented

Undocumented

segmented: None = (source)

Undocumented