class FiftyOneTemporalDetectionDatasetExporter(LabeledVideoDatasetExporter, ExportPathsMixin): (source)
Constructor: FiftyOneTemporalDetectionDatasetExporter(export_dir, data_path, labels_path, export_media, ...)
Exporter that writes a temporal video detection dataset to disk in a simple JSON format.
See :ref:`this page <FiftyOneTemporalDetectionDataset-export>` for format details.
Each input video is directly copied to its destination, maintaining the original filename, unless a name conflict would occur, in which case an index of the form "-%d" % count is appended to the base filename.
Parameters | |
export | the directory to write the export. This has no effect if data_path and labels_path are absolute paths |
data | an optional parameter that enables explicit control over the location of the exported media. Can be any of the following:
If None, the default value of this parameter will be chosen based on the value of the export_media parameter |
labels | an optional parameter that enables explicit control over the location of the exported labels. Can be any of the following:
If None, the labels will be exported into export_dir using the default filename |
export | controls how to export the raw media. The supported values are:
If None, the default value of this parameter will be chosen based on the value of the data_path parameter |
rel | an optional relative directory to strip from each input
filepath to generate a unique identifier for each video. When
exporting media, this identifier is joined with data_path to
generate an output path for each exported video. This argument
allows for populating nested subdirectories that match the shape of
the input paths. The path is converted to an absolute path (if
necessary) via fiftyone.core.storage.normalize_path |
abs | whether to store absolute paths to the videos in the exported labels |
use | whether to export the support of each temporal detection in seconds rather than frame numbers |
classes | the list of possible class labels |
include | whether to include detection confidences in the export. The supported values are:
|
include | whether to include dynamic attributes of the detections in the export. Supported values are:
|
pretty | whether to render the JSON in human readable format with newlines and indentations |
Method | __init__ |
Undocumented |
Method | close |
Performs any necessary actions after the last sample has been exported. |
Method | export |
Exports the given sample to the dataset. |
Method | setup |
Performs any necessary setup before exporting the first sample in the dataset. |
Instance Variable | abs |
Undocumented |
Instance Variable | classes |
Undocumented |
Instance Variable | data |
Undocumented |
Instance Variable | export |
Undocumented |
Instance Variable | include |
Undocumented |
Instance Variable | include |
Undocumented |
Instance Variable | labels |
Undocumented |
Instance Variable | pretty |
Undocumented |
Instance Variable | rel |
Undocumented |
Instance Variable | use |
Undocumented |
Property | frame |
The fiftyone.core.labels.Label class(es) that can be exported by this exporter at the frame-level. |
Property | label |
The fiftyone.core.labels.Label class(es) that can be exported at the sample-level. |
Property | requires |
Whether this exporter requires fiftyone.core.metadata.VideoMetadata instances for each sample being exported. |
Method | _parse |
Undocumented |
Instance Variable | _labels |
Undocumented |
Instance Variable | _labels |
Undocumented |
Instance Variable | _media |
Undocumented |
Inherited from DatasetExporter
(via LabeledVideoDatasetExporter
):
Method | __enter__ |
Undocumented |
Method | __exit__ |
Undocumented |
Method | log |
Logs any relevant information about the fiftyone.core.collections.SampleCollection whose samples will be exported. |
Inherited from ExportPathsMixin
(via LabeledVideoDatasetExporter
, DatasetExporter
):
Static Method | _parse |
Helper function that computes default values for the data_path and export_media parameters supported by many exporters. |
Static Method | _parse |
Helper function that computes default values for the labels_path parameter supported by many exporters. |
Undocumented
Performs any necessary actions after the last sample has been exported.
This method is called when the exporter's context manager interface is
exited, DatasetExporter.__exit__
.
Parameters | |
*args | the arguments to DatasetExporter.__exit__ |
Exports the given sample to the dataset.
Parameters | |
video | the path to a video on disk |
temporal | Undocumented |
_ | Undocumented |
metadata:None | a fiftyone.core.metadata.VideoMetadata
instance for the sample. Only required when
requires_video_metadata is True |
label | an instance of label_cls , or a dictionary mapping
field names to fiftyone.core.labels.Label instances,
or None if the sample has no sample-level labels |
frames | a dictionary mapping frame numbers to dictionaries that map
field names to fiftyone.core.labels.Label instances,
or None if the sample has no frame-level labels |
Performs any necessary setup before exporting the first sample in the dataset.
This method is called when the exporter's context manager interface is
entered, DatasetExporter.__enter__
.
The fiftyone.core.labels.Label
class(es) that can be
exported by this exporter at the frame-level.
This can be any of the following:
- a
fiftyone.core.labels.Label
class. In this case, the exporter directly exports frame labels of this type - a list or tuple of
fiftyone.core.labels.Label
classes. In this case, the exporter can export a single frame label field of any of these types - a dict mapping keys to
fiftyone.core.labels.Label
classes. In this case, the exporter can export multiple frame label fields with value-types specified by this dictionary. Not all keys need be present in the exported frame labels - None. In this case, the exporter makes no guarantees about the frame labels that it can export
The fiftyone.core.labels.Label
class(es) that can be
exported at the sample-level.
This can be any of the following:
- a
fiftyone.core.labels.Label
class. In this case, the exporter directly exports sample-level labels of this type - a list or tuple of
fiftyone.core.labels.Label
classes. In this case, the exporter can export 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 exporter can export multiple label fields with value-types specified by this dictionary. Not all keys need be present in the exported sample-level labels - None. In this case, the exporter makes no guarantees about the sample-level labels that it can export
Whether this exporter requires
fiftyone.core.metadata.VideoMetadata
instances for each sample
being exported.