class documentation

Importer for a directory of videos stored on disk.

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

Parameters
dataset_dirthe dataset directory
recursivewhether to recursively traverse subdirectories
compute_metadatawhether to produce fiftyone.core.metadata.VideoMetadata instances for each video 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 __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 setup Performs any necessary setup before importing the first sample in the dataset.
Instance Variable compute_metadata Undocumented
Instance Variable recursive Undocumented
Property has_dataset_info Whether this importer produces a dataset info dictionary.
Property has_video_metadata Whether this importer produces fiftyone.core.metadata.VideoMetadata instances for each video.
Static Method _get_num_samples Undocumented
Instance Variable _filepaths Undocumented
Instance Variable _iter_filepaths Undocumented
Instance Variable _num_samples Undocumented

Inherited from DatasetImporter (via UnlabeledVideoDatasetImporter):

Method __enter__ Undocumented
Method __exit__ Undocumented
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, recursive=True, compute_metadata=False, shuffle=False, seed=None, max_samples=None): (source)
def __len__(self): (source)

The total number of samples that will be imported.

Raises
TypeErrorif the total number is not known
def __next__(self): (source)

Returns information about the next sample in the dataset.

Returns
an(video_path, video_metadata)
tuple
, where
Raises
StopIterationif there are no more samples to import
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__.

compute_metadata: False = (source)

Undocumented

recursive: True = (source)

Undocumented

@property
has_dataset_info = (source)

Whether this importer produces a dataset info dictionary.

@staticmethod
def _get_num_samples(dataset_dir): (source)

Undocumented

_filepaths = (source)

Undocumented

_iter_filepaths = (source)

Undocumented

_num_samples = (source)

Undocumented