class documentation
class VOCAnnotation(object): (source)
Constructor: VOCAnnotation(path, folder, filename, segmented, ...)
Class representing a VOC annotations file.
Parameters | |
path | the path to the image |
folder | the name of the folder containing the image |
filename | the image filename |
segmented | whether the objects are segmented |
metadata | a fiftyone.core.metadata.ImageMetadata
instance |
objects | a list of VOCObject instances |
Class Method | from |
Creates a VOCAnnotation instance from a JSON dict representation. |
Class Method | from |
Creates a VOCAnnotation instance for the given labeled image data. |
Class Method | from |
Creates a VOCAnnotation instance from an XML annotations file. |
Method | __init__ |
Undocumented |
Method | to |
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 |
Creates a VOCAnnotation
instance from a JSON dict
representation.
Parameters | |
d | a JSON dict |
Returns | |
a VOCAnnotation |
@classmethod
def from_labeled_image(cls, metadata, detections, path=None, filename=None, extra_attrs=True): (source) ¶
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 | |
metadata | a fiftyone.core.metadata.ImageMetadata instance
for the image |
detections | a fiftyone.core.labels.Detections |
path:None | the absolute path to the image |
filename:None | the filename of the image |
extraTrue | whether to include extra object attributes. Supported values are:
|
Returns | |
a VOCAnnotation |
Creates a VOCAnnotation
instance from an XML annotations
file.
Parameters | |
xml | the 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
Returns a fiftyone.core.labels.Detections
representation of
the objects in the annotation.
Parameters | |
extraTrue | whether to load extra annotation attributes onto the imported labels. Supported values are:
|
Returns | |
a fiftyone.core.labels.Detections |