class ActivityNetDatasetImporter(foud.FiftyOneTemporalDetectionDatasetImporter): (source)
Constructor: ActivityNetDatasetImporter(dataset_dir, data_path, labels_path, classes, ...)
Class for importing AcitivityNet dataset splits downloaded via
download_activitynet_split
.
Parameters | |
dataset | the dataset directory |
data | an optional parameter that enables explicit control over the location of the media. Can be any of the following:
If None, this parameter will default to whichever of data/ or data.json exists in the dataset directory |
labels | an optional parameter that enables explicit control over the location of the labels. Can be any of the following:
If None, the parameter will default to labels.json |
classes | a 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 | only 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 | whether to produce
fiftyone.core.metadata.VideoMetadata instances for each
video 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 | get |
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 |
Undocumented |
Instance Variable | max |
Undocumented |
Property | has |
Whether this importer produces a dataset info dictionary. |
Instance Variable | _classes |
Undocumented |
Instance Variable | _has |
Undocumented |
Instance Variable | _labels |
Undocumented |
Instance Variable | _num |
Undocumented |
Instance Variable | _sample |
Undocumented |
Instance Variable | _taxonomy |
Undocumented |
Instance Variable | _uuids |
Undocumented |
Instance Variable | _video |
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 |
Undocumented |
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. |
Static Method | _get |
Undocumented |
Static Method | _get |
Undocumented |
Instance Variable | _iter |
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 |
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 |
Helper function that parses either a data directory or a data manifest file into a UUID -> filepath map. |
Static Method | _parse |
Helper function that computes default values for the data_path parameter supported by many importers. |
Static Method | _parse |
Helper function that computes default values for the labels_path parameter supported by many importers. |
Undocumented
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 |
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__
.