«
class documentation

Class for importing datasets written by download_places_dataset_split`.

Parameters
dataset_dirthe dataset directory
shufflewhether to randomly shuffle the order in which the samples are imported
seeda random seed to use when shuffling
max_samplesa maximum number of samples to load. By default, all samples are imported
Method __init__ Undocumented
Method __iter__ Undocumented
Method __len__ The total number of samples that will be imported.
Method __next__ Returns information about the next sample in the dataset.
Method setup Performs any necessary setup before importing the first sample in the dataset.
Property has_dataset_info Whether this importer produces a dataset info dictionary.
Property has_image_metadata Whether this importer produces fiftyone.core.metadata.ImageMetadata instances for each image.
Property label_cls The fiftyone.core.labels.Label class(es) returned by this importer.
Static Method _get_num_samples Undocumented
Instance Variable _images_map Undocumented
Instance Variable _iter_uuids Undocumented
Instance Variable _labels_map Undocumented
Instance Variable _uuids Undocumented

Inherited from DatasetImporter (via LabeledImageDatasetImporter):

Method __enter__ Undocumented
Method __exit__ Undocumented
Method close Performs any necessary actions after the last sample has been imported.
Method get_dataset_info Returns the dataset info for the dataset.
Method _preprocess_list Internal utility that preprocesses the given list---which is presumed to be a list defining the samples that should be imported---by applying the values of the shuffle, seed, and max_samples parameters of the importer.
def __init__(self, dataset_dir, shuffle=False, seed=None, max_samples=None): (source)
def __len__(self): (source)

The total number of samples that will be imported.

Raises
TypeErrorif the total number is not known
def __next__(self): (source)

Returns information about the next sample in the dataset.

Returns
an(image_path, image_metadata, label)
tuple
, where
Raises
StopIterationif there are no more samples to import
def setup(self): (source)

Performs any necessary setup before importing the first sample in the dataset.

This method is called when the importer's context manager interface is entered, DatasetImporter.__enter__.

@property
has_dataset_info = (source)

Whether this importer produces a dataset info dictionary.

The fiftyone.core.labels.Label class(es) returned by this importer.

This can be any of the following:

  • a fiftyone.core.labels.Label class. In this case, the importer is guaranteed to return labels of this type
  • a list or tuple of fiftyone.core.labels.Label classes. In this case, the importer can produce a single label field of any of these types
  • a dict mapping keys to fiftyone.core.labels.Label classes. In this case, the importer will return label dictionaries with keys and value-types specified by this dictionary. Not all keys need be present in the imported labels
  • None. In this case, the importer makes no guarantees about the labels that it may return
@staticmethod
def _get_num_samples(dataset_dir): (source)

Undocumented

_images_map = (source)

Undocumented

_iter_uuids = (source)

Undocumented

_labels_map = (source)

Undocumented

Undocumented