class documentation

Base class for sample parsers that ingest tf.train.Example protos containing labeled images.

Parameters
force_rgbwhether to force convert all images to RGB
Method __init__ Undocumented
Method clear_sample Clears the current sample.
Method get_image Returns the image from the current sample.
Method get_label Returns the label for the current sample.
Instance Variable force_rgb Undocumented
Method _parse_features Undocumented
Method _parse_image Undocumented
Method _parse_label Undocumented
Constant _FEATURES Undocumented
Instance Variable _channels Undocumented
Instance Variable _current_features_cache Undocumented
Property _current_features Undocumented

Inherited from LabeledImageSampleParser:

Method get_image_metadata Returns the image metadata for the current sample.
Method get_image_path Returns the image path for the current sample.
Property has_image_metadata Whether this parser produces fiftyone.core.metadata.ImageMetadata instances for samples that it parses.
Property has_image_path Whether this parser produces paths to images on disk for samples that it parses.
Property label_cls The fiftyone.core.labels.Label class(es) returned by this parser.

Inherited from SampleParser (via LabeledImageSampleParser):

Method with_sample Sets the current sample so that subsequent calls to methods of this parser will return information from the given sample.
Property current_sample The current sample.
Instance Variable _current_sample Undocumented
def __init__(self, force_rgb=False): (source)
def clear_sample(self): (source)

Clears the current sample.

Also clears any cached sample information stored by the parser.

def get_image(self): (source)

Returns the image from the current sample.

Returns
a numpy image
def get_label(self): (source)

Returns the label for the current sample.

Returns
a fiftyone.core.labels.Label instance, or a dictionary mapping field names to fiftyone.core.labels.Label instances, or None if the sample is unlabeled
def _parse_features(self, sample): (source)

Undocumented

_channels = (source)

Undocumented

_current_features_cache = (source)

Undocumented

@property
_current_features = (source)

Undocumented