voxel51/fiftyone

[FR] Upgrade quickstart dataset format

Open

#1755 aperta il 20 mag 2022

Vedi su GitHub
 (4 commenti) (0 reazioni) (1 assegnatario)Python (400 fork)batch import
enhancementgood first issue

Metriche repository

Star
 (4021 star)
Metriche merge PR
 (Merge medio 3g 11h) (161 PR mergiate in 30 g)

Descrizione

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.

Guida contributor