class documentation

Importer for FiftyOne datasets stored on disk in serialized JSON format.

See :ref:`this page <FiftyOneDataset-import>` for format details.

Parameters
dataset_dirthe dataset directory
rel_dira relative directory to prepend to the filepath of each sample if the filepath is not absolute. This path is converted to an absolute path (if necessary) via fiftyone.core.storage.normalize_path
import_saved_viewswhether to include saved views in the import. Only applicable when importing full datasets
import_runswhether to include annotation/brain/evaluation runs in the import. Only applicable when importing full datasets
import_workspaceswhether to include saved workspaces in the import. Only applicable when importing full datasets
orderedwhether to preserve document order when importing
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 __init__ Undocumented
Method import_samples Imports the samples into the given dataset.
Method setup Performs any necessary setup before importing the first sample in the dataset.
Instance Variable import_runs Undocumented
Instance Variable import_saved_views Undocumented
Instance Variable import_workspaces Undocumented
Instance Variable ordered Undocumented
Instance Variable rel_dir Undocumented
Static Method _get_classes Undocumented
Static Method _get_num_samples Undocumented
Method _import_samples Undocumented
Method _is_legacy_format_data Undocumented
Method _to_legacy_importer Undocumented
Instance Variable _anno_dir Undocumented
Instance Variable _brain_dir Undocumented
Instance Variable _data_dir Undocumented
Instance Variable _eval_dir Undocumented
Instance Variable _fields_dir Undocumented
Instance Variable _frames_path Undocumented
Instance Variable _has_frames Undocumented
Instance Variable _media_fields Undocumented
Instance Variable _metadata_path Undocumented
Instance Variable _runs_dir Undocumented
Instance Variable _samples_path Undocumented

Inherited from BatchDatasetImporter:

Method __next__ Returns information about the next sample in the dataset.
Property has_dataset_info Whether this importer produces a dataset info dictionary.

Inherited from DatasetImporter (via BatchDatasetImporter):

Method __enter__ Undocumented
Method __exit__ Undocumented
Method __iter__ Undocumented
Method __len__ The total number of samples that will be imported.
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, rel_dir=None, import_saved_views=True, import_runs=True, import_workspaces=True, ordered=True, shuffle=False, seed=None, max_samples=None): (source)
def import_samples(self, dataset, tags=None, progress=None): (source)

Imports the samples into the given dataset.

Parameters
dataseta fiftyone.core.dataset.Dataset
tags:Nonean optional list of tags to attach to each sample
progress:Nonewhether to render a progress bar (True/False), use the default value fiftyone.config.show_progress_bars (None), or a progress callback function to invoke instead
Returns
a list of IDs of the samples that were added to the dataset
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__.

import_runs: True = (source)

Undocumented

import_saved_views: True = (source)

Undocumented

import_workspaces: True = (source)

Undocumented

Undocumented

Undocumented

@staticmethod
def _get_classes(dataset_dir): (source)

Undocumented

@staticmethod
def _get_num_samples(dataset_dir): (source)

Undocumented

def _import_samples(self, dataset, dataset_dict, tags=None, progress=None): (source)

Undocumented

def _is_legacy_format_data(self): (source)

Undocumented

def _to_legacy_importer(self): (source)

Undocumented

_anno_dir = (source)

Undocumented

_brain_dir = (source)

Undocumented

_data_dir = (source)

Undocumented

_eval_dir = (source)

Undocumented

_fields_dir = (source)

Undocumented

_frames_path = (source)

Undocumented

_has_frames: bool = (source)

Undocumented

_media_fields = (source)

Undocumented

_metadata_path = (source)

Undocumented

_runs_dir = (source)

Undocumented

_samples_path = (source)

Undocumented