class TFObjectDetectionDatasetExporter(TFRecordsDatasetExporter): (source)
Constructor: TFObjectDetectionDatasetExporter(export_dir, tf_records_path, num_shards, image_format, ...)
Exporter that writes an object detection dataset to disk as TFRecords in the TF Object Detection API format.
See :ref:`this page <TFObjectDetectionDataset-export>` for format details.
Parameters | |
export | the directory to write the export. Can be omitted if tf_records_path is provided |
tf | an optional parameter that enables explicit control over the location of the TF records. Can be any of the following:
If None, the parameter will default to tf.records |
num | an optional number of shards to split the records into (using a round robin strategy). If specified, -%%05d-of-%%05d is appended to the records path |
image | the image format to use when writing in-memory images to disk. By default, fiftyone.config.default_image_ext is used |
force | whether to force convert all images to RGB |
classes | the list of possible class labels |
Method | __init__ |
Undocumented |
Instance Variable | classes |
Undocumented |
Property | label |
The fiftyone.core.labels.Label class(es) exported by this exporter. |
Method | _make |
Returns a TFExampleGenerator instance that will generate tf.train.Example protos for this exporter. |
Inherited from TFRecordsDatasetExporter
:
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. |
Property | requires |
Whether this exporter requires fiftyone.core.metadata.ImageMetadata instances for each sample being exported. |
Instance Variable | _example |
Undocumented |
Instance Variable | _filename |
Undocumented |
Instance Variable | _tf |
Undocumented |
Inherited from DatasetExporter
(via TFRecordsDatasetExporter
, LabeledImageDatasetExporter
):
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 TFRecordsDatasetExporter
, LabeledImageDatasetExporter
, 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
The fiftyone.core.labels.Label
class(es) exported by this
exporter.
This can be any of the following:
- a
fiftyone.core.labels.Label
class. In this case, the exporter directly exports labels of this type - a list or tuple of
fiftyone.core.labels.Label
classes. In this case, the exporter can export a single label field of any of these types - a dict mapping keys to
fiftyone.core.labels.Label
classes. In this case, the exporter can handle label dictionaries with value-types specified by this dictionary. Not all keys need be present in the exported label dicts - None. In this case, the exporter makes no guarantees about the labels that it can export