class LabeledVideoDatasetImporter(DatasetImporter): (source)
Known subclasses: fiftyone.utils.cvat.CVATVideoDatasetImporter
, fiftyone.utils.data.importers.FiftyOneTemporalDetectionDatasetImporter
, fiftyone.utils.data.importers.FiftyOneVideoLabelsDatasetImporter
, fiftyone.utils.data.importers.VideoClassificationDirectoryTreeImporter
, fiftyone.utils.data.ingestors.LabeledVideoDatasetIngestor
, fiftyone.utils.openlabel.OpenLABELVideoDatasetImporter
Constructor: LabeledVideoDatasetImporter(dataset_dir, shuffle, seed, max_samples)
Interface for importing datasets of labeled video samples.
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 | the dataset directory. This may be optional for some importers |
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 | __next__ |
Returns information about the next sample in the dataset. |
Property | frame |
The fiftyone.core.labels.Label class(es) returned by this importer within the frame labels that it produces. |
Property | has |
Whether this importer produces fiftyone.core.metadata.VideoMetadata instances for each video. |
Property | label |
The fiftyone.core.labels.Label class(es) returned by this importer within the sample-level labels that it produces. |
Inherited from DatasetImporter
:
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | __init__ |
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 | setup |
Performs any necessary setup before importing the first sample in the dataset. |
Property | has |
Whether this importer produces a dataset info dictionary. |
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. |
fiftyone.utils.cvat.CVATVideoDatasetImporter
, fiftyone.utils.data.importers.FiftyOneTemporalDetectionDatasetImporter
, fiftyone.utils.data.importers.FiftyOneVideoLabelsDatasetImporter
, fiftyone.utils.data.importers.VideoClassificationDirectoryTreeImporter
, fiftyone.utils.data.ingestors.LabeledVideoDatasetIngestor
, fiftyone.utils.openlabel.OpenLABELVideoDatasetImporter
Returns information about the next sample in the dataset.
Returns | |
an(video_path, video_metadata, labels, frames)tuple, where |
|
Raises | |
StopIteration | if there are no more samples to import |
fiftyone.utils.cvat.CVATVideoDatasetImporter
, fiftyone.utils.data.importers.FiftyOneTemporalDetectionDatasetImporter
, fiftyone.utils.data.importers.FiftyOneVideoLabelsDatasetImporter
, fiftyone.utils.data.importers.VideoClassificationDirectoryTreeImporter
, fiftyone.utils.data.ingestors.LabeledVideoDatasetIngestor
The fiftyone.core.labels.Label
class(es) returned by this
importer within the frame labels that it produces.
This can be any of the following:
- a
fiftyone.core.labels.Label
class. In this case, the importer is guaranteed to return frame labels of this type - a list or tuple of
fiftyone.core.labels.Label
classes. In this case, the importer can produce a single frame label field of any of these types - a dict mapping keys to
fiftyone.core.labels.Label
classes. In this case, the importer will return frame label dictionaries with keys and value-types specified by this dictionary. Not all keys need be present in each frame - None. In this case, the importer makes no guarantees about the frame labels that it may return
fiftyone.utils.cvat.CVATVideoDatasetImporter
, fiftyone.utils.data.importers.FiftyOneTemporalDetectionDatasetImporter
, fiftyone.utils.data.importers.FiftyOneVideoLabelsDatasetImporter
, fiftyone.utils.data.importers.VideoClassificationDirectoryTreeImporter
, fiftyone.utils.data.ingestors.LabeledVideoDatasetIngestor
, fiftyone.utils.openlabel.OpenLABELVideoDatasetImporter
Whether this importer produces
fiftyone.core.metadata.VideoMetadata
instances for each video.
fiftyone.utils.cvat.CVATVideoDatasetImporter
, fiftyone.utils.data.importers.FiftyOneTemporalDetectionDatasetImporter
, fiftyone.utils.data.importers.FiftyOneVideoLabelsDatasetImporter
, fiftyone.utils.data.importers.VideoClassificationDirectoryTreeImporter
, fiftyone.utils.data.ingestors.LabeledVideoDatasetIngestor
, fiftyone.utils.openlabel.OpenLABELVideoDatasetImporter
The fiftyone.core.labels.Label
class(es) returned by this
importer within the sample-level labels that it produces.
This can be any of the following:
- a
fiftyone.core.labels.Label
class. In this case, the importer is guaranteed to return sample-level labels of this type - a list or tuple of
fiftyone.core.labels.Label
classes. In this case, the importer can produce a single sample-level label field of any of these types - a dict mapping keys to
fiftyone.core.labels.Label
classes. In this case, the importer will return sample-level label dictionaries with keys and value-types specified by this dictionary. Not all keys need be present in the imported labels - None. In this case, the importer makes no guarantees about the sample-level labels that it may return