voxel51/fiftyone

[FR] Upgrade quickstart dataset format

Open

#1.755 geöffnet am 20. Mai 2022

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Python (400 Forks)batch import
enhancementgood first issue

Repository-Metriken

Stars
 (4.021 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 3T 11h) (161 gemergte PRs in 30 T)

Beschreibung

The quickstart zoo dataset uses the deprecated attributes dict to store object attributes:

import fiftyone as fo
import fiftyone.zoo as foz

dataset = foz.load_zoo_dataset("quickstart")

print(dataset.first()["ground_truth"].detections[0])
<Detection: {
    'id': '5f452471ef00e6374aac53c8',
    'attributes': BaseDict({
        'area': <NumericAttribute: {'value': 73790.37944999996}>,
        'iscrowd': <NumericAttribute: {'value': 0.0}>,
    }),
    'tags': BaseList([]),
    'label': 'bird',
    'bounding_box': BaseList([
        0.21084375,
        0.0034375,
        0.46190625,
        0.9442083333333334,
    ]),
    'mask': None,
    'confidence': None,
    'index': None,
}>

Per the docs, the attributes field will be removed, and dynamic attributes should be used instead:

<Detection: {
    'id': '5f452471ef00e6374aac53c8',
    'tags': BaseList([]),
    'label': 'bird',
    'bounding_box': BaseList([
        0.21084375,
        0.0034375,
        0.46190625,
        0.9442083333333334,
    ]),
    'mask': None,
    'confidence': None,
    'index': None,
    'area': 73790.37944999996,
    'iscrowd': 0.0,
}>

We should upgrade the quickstart dataset to use dynamic attributes, per our recommendation.

Contributor Guide