hello.fiftyone.utils module¶
- 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.Datasetlabel_field – a label field of type
fiftyone.core.labels.Detectionsorfiftyone.core.labels.Polylinesiou_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]¶