to_fiftyone#

Dataset.to_fiftyone(dataset_name: str | None = None, annotations_name: str = 'groundtruth', allow_keypoints: bool = False, record_fo_ids: bool = False, existing: Literal['update', 'erase', 'error'] = 'error') fo.Dataset[source]#

Convert the dataset into a fiftyone dataset, that can then be inspected with Fiftyone’s webapp. The resulting dataset will have the sample field with the name specified in the argument annotations_name.

Parameters:
  • dataset_name – Name of the fiftyone dataset to add the samples to. If the dataset does not exist, it will be created. If set to None, will be the folder name of self.dataset_folder. Defaults to None.

  • annotations_name – Name of the sample field for the annotations. If the dataset already exists, the sample field will be created if it does not exist, and it will be merged if it already exists.

  • allow_keypoints – if set to True, will convert bounding boxes of size 0 to be keypoints instead of detection objects.

  • record_fo_ids – whether to record the fiftyone ids of samples and annotations. If set to True, will create fo_id column in self.images and fo_id and is_keypoint column in self.annotations to be able to reindex them in the created fiftyone dataset

  • existing

    What to do in case there is already a fiftyone dataset with the same name.

    • ”error”: will raise an error.

    • ”erase”: will erase the existing dataset before uploading this one

    • ”update”: will try to update the dataset by fusing together samples with the same “relative_path”

    Defaults to “error”.

Returns:

Fiftyone one dataset that can then be used to launch the webapp with fiftyone.launch_app(evaluator.to_fiftyone("dataset"))

Return type:

fiftyone.core.dataset.Dataset