简体   繁体   中英

COCO dataset in fiftyone labelling problem

Hi guys i am downloading specific part of coco with fiftyone, only "detections" label type. But when i upload the data and label folder to cloud dataset transforming to segmentation polygon labelling what can i do for that?

When exporting a dataset in COCO format , the "detections" are written into the JSON file in the COCO format:

    "annotations": [
        {
            "id": 1,
            "image_id": 1,
            "category_id": 2,
            "bbox": [260, 177, 231, 199],
            "score": 0.95,
            "area": 45969,
            "iscrowd": 0
        },
        ...
    ]

You could convert your detections to segmentations in FiftyOne like this:

import fiftyone.utils.labels as foul

detections_field = "detections"
segmentations_field = "segmentations"

foul.objects_to_segmentations(
    dataset,
    detections_field,
    segmentations_field,
)

FiftyOne does not automatically convert detections to a segmentation polygon format when exporting. To what cloud provider are you uploading the dataset? It is likely on that end that the data is being converted.

It would be helpful if you could provide a script to replicate what you are seeing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM