class documentation

class TFImageClassificationExampleGenerator(TFExampleGenerator): (source)

Constructor: TFImageClassificationExampleGenerator(force_rgb)

View In Hierarchy

Class for generating tf.train.Example protos for samples in TF image classification format.

See :ref:`this page <TFImageClassificationDataset-export>` for format details.

Parameters
force_rgbwhether to force convert all images to RGB
Method make_tf_example Makes a tf.train.Example for the given data.

Inherited from TFExampleGenerator:

Method __init__ Undocumented
Method _parse_image_or_path Undocumented
def make_tf_example(self, image_or_path, classification, filename=None): (source) ΒΆ

Makes a tf.train.Example for the given data.

Parameters
image_or_pathan image or the path to the image on disk
classificationa fiftyone.core.labels.Classification instance, or None
filename:Nonea filename for the image. Required when image_or_path is an image, in which case the extension of this filename determines the encoding used. If image_or_path is the path to an image, this is optional; by default, the basename of image_path is used
Returns
a tf.train.Example