hello.fiftyone.utils module

hello.fiftyone.utils.find_duplicate_images(filepaths, leave_one_out=False)[source]
hello.fiftyone.utils.find_duplicate_labels(dataset, label_field, iou_thresh=0.999, method='simple', iscrowd=None, classwise=False)[source]

Returns IDs of duplicate labels in the given field of the dataset, as defined as labels with an IoU greater than a chosen threshold with another label in the field.

>>> dup_ids = find_duplicates()
>>> dataset.untag_labels("duplicate")
>>> dataset.select_labels(ids=dup_ids).tag_labels("duplicate")
>>> print(dataset.count_label_tags())
>>> dataset.delete_labels(tags="duplicate")
>>> # dataset.delete_labels(ids=dup_ids)  <- best
Parameters:
  • dataset – a fiftyone.core.dataset.Dataset

  • label_field – a label field of type fiftyone.core.labels.Detections or fiftyone.core.labels.Polylines

  • iou_thresh (0.999) – the IoU threshold to use to determine whether labels are duplicates

  • method ("simple") – supported values are ("simple", "greedy")

  • iscrowd (None) – an optional name of a boolean attribute

  • classwise (False) – different label values as always non-overlapping

hello.fiftyone.utils.gen_mask_remap(dataset_mask_targets, label_mask_targets, ignore_index=255)[source]
hello.fiftyone.utils.load_coco_predictions(labels_path, remove_prefix=False)[source]
hello.fiftyone.utils.load_predictions(labels_path, classes=None, mode='text', remove_prefix=False)[source]
hello.fiftyone.utils.load_segmentation_masks(labels_path, remap=None, mode='png')[source]
hello.fiftyone.utils.load_text_predictions(labels_path)[source]
hello.fiftyone.utils.load_yolo_predictions(labels_path, classes)[source]
hello.fiftyone.utils.read_mask(mask_path, remap=None)[source]