class documentation

Base class for importing datasets in Open Images V6 format.

See fiftyone.types.OpenImagesDataset for format details.

Parameters
dataset_dirthe dataset directory
label_typesa label type or list of label types to load. The supported values are ("detections", "classifications", "relationships", "segmentations"). By default, all supported label types for version are loaded
classesa string or list of strings specifying required classes to load. If provided, only samples containing at least one instance of a specified class will be loaded
attrsa string or list of strings specifying required relationship attributes to load. Only applicable when label_types includes "relationships". If provided, only samples containing at least one instance of a specified attribute will be loaded
image_ids

an optional list of specific image IDs to load. Can be provided in any of the following formats:

  • a list of <image-id> strings
  • a list of <split>/<image-id> strings
  • the path to a text (newline-separated), JSON, or CSV file containing the list of image IDs to load in either of the first two formats
include_idwhether to load the Open Images ID for each sample along with the labels
only_matchingwhether to only load labels that match the classes or attrs requirements that you provide (True), or to load all labels for samples that match the requirements (False)
load_hierarchywhether to load the classes hierarchy and add it to the dataset's info dictionary
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. If label_types, classes, and/or attrs are also specified, first priority will be given to samples that contain all of the specified label types, classes, and/or attributes, followed by samples that contain at least one of the specified labels types or classes. The actual number of samples loaded may be less than this maximum value if the dataset does not contain sufficient samples matching your requirements. By default, all matching samples are loaded
Method __init__ Undocumented
Instance Variable version Undocumented

Inherited from OpenImagesDatasetImporter:

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 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.
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.
Instance Variable _attrs_map Undocumented
Instance Variable _classes_map Undocumented
Instance Variable _cls_data Undocumented
Instance Variable _det_data Undocumented
Instance Variable _images_map Undocumented
Instance Variable _info Undocumented
Instance Variable _iter_uuids Undocumented
Instance Variable _pnt_data Undocumented
Instance Variable _point_classes_map Undocumented
Instance Variable _rel_data Undocumented
Instance Variable _seg_data Undocumented
Instance Variable _uuids Undocumented
Property _has_scalar_labels Undocumented

Inherited from DatasetImporter (via OpenImagesDatasetImporter, LabeledImageDatasetImporter):

Method __enter__ Undocumented
Method __exit__ Undocumented
Method close Performs any necessary actions after the last sample has been imported.
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, label_types=None, classes=None, attrs=None, image_ids=None, include_id=True, only_matching=False, load_hierarchy=True, shuffle=False, seed=None, max_samples=None): (source)

Undocumented