class LegacyFiftyOneDatasetImporter(GenericSampleDatasetImporter): (source)
Constructor: LegacyFiftyOneDatasetImporter(dataset_dir, rel_dir, import_saved_views, import_runs, ...)
Legacy importer for FiftyOne datasets stored on disk in a serialized JSON format.
Warning
The fiftyone.types.FiftyOneDataset
format was upgraded in
fiftyone==0.8 and this importer is now deprecated.
However, to maintain backwards compatibility,
FiftyOneDatasetImporter
will check for instances of datasets
of this type at runtime and defer to this class to load them.
Parameters | |
dataset | the dataset directory |
rel | a relative directory to prepend to each filepath if it
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 |
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 | __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 |
Returns the dataset info for the dataset. |
Method | get |
Returns a dictionary describing the field schema of the samples loaded by this importer. |
Method | import |
Undocumented |
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 | rel |
Undocumented |
Property | has |
Whether this importer produces a dataset info dictionary. |
Property | has |
Whether this importer produces a sample field schema. |
Static Method | _get |
Undocumented |
Static Method | _get |
Undocumented |
Method | _import |
Undocumented |
Instance Variable | _anno |
Undocumented |
Instance Variable | _brain |
Undocumented |
Instance Variable | _eval |
Undocumented |
Instance Variable | _fields |
Undocumented |
Instance Variable | _frame |
Undocumented |
Instance Variable | _iter |
Undocumented |
Instance Variable | _media |
Undocumented |
Instance Variable | _media |
Undocumented |
Instance Variable | _metadata |
Undocumented |
Instance Variable | _num |
Undocumented |
Instance Variable | _rel |
Undocumented |
Instance Variable | _runs |
Undocumented |
Instance Variable | _samples |
Undocumented |
Inherited from DatasetImporter
(via GenericSampleDatasetImporter
):
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | close |
Performs any necessary actions after the last sample has been imported. |
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. |
Undocumented
Returns information about the next sample in the dataset.
Returns | |
a fiftyone.core.sample.Sample instance | |
Raises | |
StopIteration | if there are no more samples to import |
Returns the dataset info for the dataset.
By convention, this method should be called after all samples in the dataset have been imported.
Returns | |
a dict of dataset info |
Returns a dictionary describing the field schema of the samples loaded by this importer.
Returns | |
a dict mapping field names to fiftyone.core.fields.Field
instances or str(field) representations of them |
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__
.