class documentation
class FiftyOneDatasetImporter(BatchDatasetImporter): (source)
Constructor: FiftyOneDatasetImporter(dataset_dir, rel_dir, import_saved_views, import_runs, ...)
Importer for FiftyOne datasets stored on disk in serialized JSON format.
See :ref:`this page <FiftyOneDataset-import>` for format details.
Parameters | |
dataset | the dataset directory |
rel | a 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 | whether to include saved views in the import. Only applicable when importing full datasets |
import | whether to include annotation/brain/evaluation runs in the import. Only applicable when importing full datasets |
import | whether to include saved workspaces in the import. Only applicable when importing full datasets |
ordered | whether to preserve document order when importing |
shuffle | whether to randomly shuffle the order in which the samples are imported |
seed | a random seed to use when shuffling |
max | a maximum number of samples to import. By default, all samples are imported |
Method | __init__ |
Undocumented |
Method | import |
Imports the samples into the given dataset. |
Method | setup |
Performs any necessary setup before importing the first sample in the dataset. |
Instance Variable | import |
Undocumented |
Instance Variable | import |
Undocumented |
Instance Variable | import |
Undocumented |
Instance Variable | ordered |
Undocumented |
Instance Variable | rel |
Undocumented |
Static Method | _get |
Undocumented |
Static Method | _get |
Undocumented |
Method | _import |
Undocumented |
Method | _is |
Undocumented |
Method | _to |
Undocumented |
Instance Variable | _anno |
Undocumented |
Instance Variable | _brain |
Undocumented |
Instance Variable | _data |
Undocumented |
Instance Variable | _eval |
Undocumented |
Instance Variable | _fields |
Undocumented |
Instance Variable | _frames |
Undocumented |
Instance Variable | _has |
Undocumented |
Instance Variable | _media |
Undocumented |
Instance Variable | _metadata |
Undocumented |
Instance Variable | _runs |
Undocumented |
Instance Variable | _samples |
Undocumented |
Inherited from BatchDatasetImporter
:
Method | __next__ |
Returns information about the next sample in the dataset. |
Property | has |
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 |
Returns the dataset info for the dataset. |
Method | _preprocess |
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)
¶
Undocumented
Imports the samples into the given dataset.
Parameters | |
dataset | a fiftyone.core.dataset.Dataset |
tags:None | an optional list of tags to attach to each sample |
progress:None | whether 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 |
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__
.