class CVATVideoDatasetImporter(foud.LabeledVideoDatasetImporter, foud.ImportPathsMixin): (source)
Constructor: CVATVideoDatasetImporter(dataset_dir, data_path, labels_path, include_all_data, ...)
Importer for CVAT video datasets stored on disk.
See :ref:`this page <CVATVideoDataset-import>` for format details.
Parameters | |
dataset | the dataset directory. If omitted, data_path and/or labels_path must be provided |
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/ |
include | whether to generate samples for all videos in the data directory (True) rather than only creating samples for videos with label entries (False) |
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 | setup |
Performs any necessary setup before importing the first sample in the dataset. |
Instance Variable | data |
Undocumented |
Instance Variable | include |
Undocumented |
Instance Variable | labels |
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 a dataset info dictionary. |
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. |
Instance Variable | _cvat |
Undocumented |
Instance Variable | _info |
Undocumented |
Instance Variable | _iter |
Undocumented |
Instance Variable | _labels |
Undocumented |
Instance Variable | _num |
Undocumented |
Instance Variable | _uuids |
Undocumented |
Instance Variable | _video |
Undocumented |
Inherited from DatasetImporter
(via 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 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 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 |
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__
.
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
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