class documentation

Class for importing AcitivityNet dataset splits downloaded via download_activitynet_split.

Parameters
dataset_dirthe dataset directory
data_path

an optional parameter that enables explicit control over the location of the media. Can be any of the following:

  • a folder name like "data" or "data"/ specifying a subfolder of dataset_dir where the media files reside
  • an absolute directory path where the media files reside. In this case, the dataset_dir has no effect on the location of the data
  • a filename like "data.json" specifying the filename of the JSON data manifest file in dataset_dir
  • an absolute filepath specifying the location of the JSON data manifest. In this case, dataset_dir has no effect on the location of the data

If None, this parameter will default to whichever of data/ or data.json exists in the dataset directory

labels_path

an optional parameter that enables explicit control over the location of the labels. Can be any of the following:

  • a filename like "labels.json" specifying the location of the labels in dataset_dir
  • an absolute filepath to the labels. In this case, dataset_dir has no effect on the location of the labels

If None, the parameter will default to labels.json

classesa string or list of strings specifying required classes to load. If provided, only samples containing at least one instance of a specified class will be loaded
max_durationonly videos with a duration in seconds that is less than or equal to the max_duration will be loaded. By default, all videos are loaded
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 get_dataset_info Returns the dataset info for the dataset.
Method setup Performs any necessary setup before importing the first sample in the dataset.
Instance Variable classes Undocumented
Instance Variable data_path Undocumented
Instance Variable max_duration Undocumented
Property has_dataset_info Whether this importer produces a dataset info dictionary.
Instance Variable _classes Undocumented
Instance Variable _has_labels Undocumented
Instance Variable _labels_map Undocumented
Instance Variable _num_samples Undocumented
Instance Variable _sample_parser Undocumented
Instance Variable _taxonomy Undocumented
Instance Variable _uuids Undocumented
Instance Variable _video_paths_map Undocumented

Inherited from FiftyOneTemporalDetectionDatasetImporter:

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.
Instance Variable include_all_data Undocumented
Property frame_labels_cls The fiftyone.core.labels.Label class(es) returned by this importer within the frame labels that it produces.
Property has_video_metadata Whether this importer produces fiftyone.core.metadata.VideoMetadata instances for each video.
Property label_cls The fiftyone.core.labels.Label class(es) returned by this importer within the sample-level labels that it produces.
Static Method _get_classes Undocumented
Static Method _get_num_samples Undocumented
Instance Variable _iter_uuids Undocumented

Inherited from DatasetImporter (via FiftyOneTemporalDetectionDatasetImporter, LabeledVideoDatasetImporter):

Method __enter__ Undocumented
Method __exit__ Undocumented
Method close Performs any necessary actions after the last sample has been imported.
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.

Inherited from ImportPathsMixin (via FiftyOneTemporalDetectionDatasetImporter, LabeledVideoDatasetImporter, DatasetImporter):

Static Method _load_data_map Helper function that parses either a data directory or a data manifest file into a UUID -> filepath map.
Static Method _parse_data_path Helper function that computes default values for the data_path parameter supported by many importers.
Static Method _parse_labels_path Helper function that computes default values for the labels_path parameter supported by many importers.
def __init__(self, dataset_dir=None, data_path=None, labels_path=None, classes=None, max_duration=None, compute_metadata=False, shuffle=False, seed=None, max_samples=None): (source)
def get_dataset_info(self): (source)

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
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__.

Undocumented

max_duration: None = (source)

Undocumented

@property
has_dataset_info = (source)

Whether this importer produces a dataset info dictionary.

_has_labels = (source)

Undocumented

_taxonomy = (source)

Undocumented