当从CVAT输出coco注解json时,我发现有一个属性调用'iscrowd',但我似乎不能弄清楚如何在CVAT上调整或注解它以将值更改为1,在对象确实拥挤的情况下。有没有人能抛开一些光芒?
{
"annotations": [
{
"bbox": [
762.703125,
176.583984375,
425.27301025390625,
413.6938171386719
],
"id": 1,
"area": 175932.81493799202,
"iscrowd": 0,
"segmentation": [
[
762.703125,
176.583984375,
1187.9761352539062,
176.583984375,
1187.9761352539062,
590.2778015136719,
762.703125,
590.2778015136719
]
],
"category_id": 1,
"image_id": 0
}
],
"licenses": [
{
"name": "",
"id": 0,
"url": ""
}
],
"info": {
"version": "",
"description": "",
"date_created": "",
"contributor": "",
"year": "",
"url": ""
},
"images": [
{
"file_name": "10.jpg",
"id": 0,
"license": 0,
"flickr_url": "",
"height": 864,
"coco_url": "",
"date_captured": 0,
"width": 1536
}
],
"categories": [
{
"name": "test",
"supercategory": "",
"id": 1
}
]
}另一方面,当向标签添加属性(简单的复选框属性)时,它似乎不能正确地在COCO json中输出。我做错了什么吗?
发布于 2021-08-27 15:24:31
在FiftyOne (一个开源数据集探索工具)和CVAT (它提供了一个灵活的API来上传和定义如何注释新的和现有的标签)之间进行比较可能是值得的。This post几乎遍历了您正在寻找的工作流程。
您可以通过load COCO formatted datasets进入FiftyOne:
import fiftyone as fo
dataset = fo.Dataset.from_dir(
dataset_dir="/path/to/dataset",
dataset_type=fo.types.COCODetectionDataset,
label_field="ground_truth",
)Send the dataset (或其中的一个子集)到CVAT进行注释:
dataset.annotate("annot_run_1", label_field="ground_truth", backend="cvat")它会自动将注释上传到CVAT,包括格式化标签上的所有属性(如iscrowd),以便您在CVAT中进行编辑。此集成的应用编程接口还允许您对它们进行specify new attributes以及如何对其进行注释。

当您完成注释后,可以使用COCO格式进行load it back into FiftyOne和write it back to disk。
# Load from CVAT
dataset.load_annotations("annot_run_1")
# Write back to disk
dataset.export(
export_dir="/path/to/label.json",
dataset_type=fo.types.COCODetectionDataset,
label_field="ground_truth",
)https://stackoverflow.com/questions/67799910
复制相似问题