hello.fiftyone.annotate module

hello.fiftyone.annotate.from_cvat(dataset_name, anno_keys, cleanup=False, url='http://localhost:8080', username='hejian', password='LFIcvat123')[source]
hello.fiftyone.annotate.to_cvat(anno_key, samples, label_field='ground_truth', label_type='instances', url='http://localhost:8080', username='hejian', password='LFIcvat123', task_size=1000, segment_size=200, task_assignee='hejian', job_assignees=['hejian'])[source]

Exports the samples to the given annotation backend.

mask_targets is a dict mapping pixel values to semantic label strings. Only applicable when annotating semantic segmentations. the default is samples.default_mask_targets.

Parameters:
  • anno_key – must be valid variable names, used for project name

  • samples – a fiftyone.core.collections.SampleCollection

  • label_field ("ground_truth") – a string indicating a new or existing label field to annotate

  • label_type ("instances") –

    a string indicating the type of labels to annotate. The possible values are:

    • "classification": a single classification stored in fiftyone.core.labels.Classification fields

    • "classifications": multilabel classifications stored in fiftyone.core.labels.Classifications fields

    • "detections": object detections stored in fiftyone.core.labels.Detections fields

    • "instances": instance segmentations stored in fiftyone.core.labels.Detections fields with their mask attributes populated

    • "polylines": polylines stored in fiftyone.core.labels.Polylines fields with their filled attributes set to False

    • "polygons": polygons stored in fiftyone.core.labels.Polylines fields with their filled attributes set to True

    • "keypoints": keypoints stored in fiftyone.core.labels.Keypoints fields

    • "segmentation": semantic segmentations stored in fiftyone.core.labels.Segmentation fields

    • "scalar": scalar labels stored in fiftyone.core.fields.IntField, fiftyone.core.fields.FloatField, fiftyone.core.fields.StringField, or fiftyone.core.fields.BooleanField fields

  • url (str, optional) – defaults to “http://localhost:8080

  • username (str, optional) – defaults to “hejian”

  • password (str, optional) – defaults to “LFIcvat123”

  • task_size (int, optional) – defaults to 1000

  • segment_size (int, optional) – defaults to 200

  • task_assignee (str, optional) – defaults to “hejian”

  • job_assignees (list, optional) – defaults to ["hejian"]