«
class documentation

Interface for SampleParser instances that parse unlabeled image samples.

Instances of this class must return images in numpy format.

The general recipe for using UnlabeledImageSampleParser instances is as follows:

sample_parser = UnlabeledImageSampleParser(...)

for sample in samples:
    sample_parser.with_sample(sample)
    img = sample_parser.get_image()
    if sample_parser.has_image_path:
        image_path = sample_parser.get_image_path()

    if sample_parser.has_image_metadata:
        image_metadata = sample_parser.get_image_metadata()
Method get_image Returns the image from the current sample.
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.

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_image(self): (source)

Returns the image from the current sample.

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

Returns the image metadata for the current sample.

Returns
a fiftyone.core.metadata.ImageMetadata instance
def get_image_path(self): (source)

Returns the image path for the current sample.

Returns
the path to the image on disk
@property
has_image_path = (source)

Whether this parser produces paths to images on disk for samples that it parses.