class documentation

Interface for importing datasets that contain arbitrary grouped fiftyone.core.sample.Sample instances.

Typically, dataset importers should implement the parameters documented on this class, although this is not mandatory.

See :ref:`this page <writing-a-custom-dataset-importer>` for information about implementing/using dataset importers.

Parameters
dataset_dirthe dataset directory. This may be optional for some importers
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 import. By default, all samples are imported
Method __len__ The total number of samples that will be imported across all group slices.
Method __next__ Returns information about the next group in the dataset.
Property group_field The name of the group field to populate on each sample.

Inherited from GenericSampleDatasetImporter:

Method get_sample_field_schema Returns a dictionary describing the field schema of the samples loaded by this importer.
Property has_sample_field_schema Whether this importer produces a sample field schema.

Inherited from DatasetImporter (via GenericSampleDatasetImporter):

Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Method __iter__ 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 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.
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 __len__(self): (source)

The total number of samples that will be imported across all group slices.

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

Returns information about the next group in the dataset.

Returns
a dict mapping slice names to fiftyone.core.sample.Sample instances
Raises
StopIterationif there are no more samples to import
@property
group_field = (source)

The name of the group field to populate on each sample.