voxel51/fiftyone

[FR] Upgrade quickstart dataset format

Open

#1,755 opened on 2022年5月20日

GitHub で見る
 (4 comments) (0 reactions) (1 assignee)Python (400 forks)batch import
enhancementgood first issue

Repository metrics

Stars
 (4,021 stars)
PR merge metrics
 (平均マージ 3d 11h) (30d で 161 merged PRs)

説明

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.

コントリビューターガイド