class documentation

class UnlabeledMediaSampleParser(SampleParser): (source)

Known subclasses: fiftyone.utils.data.parsers.MediaSampleParser

View In Hierarchy

Interface for SampleParser instances that parse unlabeled media samples.

The general recipe for using UnlabeledMediaSampleParser instances is as follows:

sample_parser = UnlabeledMediaSampleParser(...)

for sample in samples:
    sample_parser.with_sample(sample)
    filepath = sample_parser.get_media_path()
    metadata = sample_parser.get_metadata()
Method get_media_path Returns the media path for the current sample.
Method get_metadata Returns the metadata for the current sample.
Property has_metadata Whether this parser produces fiftyone.core.metadata.Metadata instances for samples that it parses.

Inherited from SampleParser:

Method __init__ Undocumented
Method clear_sample Clears the current sample.
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 get_media_path(self): (source)

Returns the media path for the current sample.

Returns
the path to the media on disk
def get_metadata(self): (source)

Returns the metadata for the current sample.

Returns
a fiftyone.core.metadata.Metadata instance
@property
has_metadata = (source)

Whether this parser produces fiftyone.core.metadata.Metadata instances for samples that it parses.