【记录COCO数据集格式】实例分割的annotations.json的内部格式+如何加载和保存json文件

  • 在此记录一下实例分割coco的annotations.json的格式
''
annotations.json,整体是一个字典:
{
"info": {"description": null,
         "url": null, 
         "version": null, 
         "year": 2023, 
         "contributor": null, 
         "date_created": "2023-05-27 10:34:38.709025"},
"licenses": [{"url": null, "id": 0, "name": null}],
"images": [{"license": 0,
            "url": null,
            "file_name": "....jpg",
            "height": 800, "width": 800,
            "date_captured": null, "id": 0},
            {...},
            ...,
            {...}]
"type": "instances",
"annotations": [{"id": 0, "image_id": 0, "category_id": 1,
                 "segmentation": [[polygon]], "area": 57142.0, 
                 "bbox": [246.0, 165.0, 310.0, 239.0]([x,y,width,height],即左上角的坐标+宽高), "iscrowd": 0},
                {"id": 1, "image_id": 0, "category_id": 1, 
                 "segmentation": [[polygon]], "area": 59602.0, 
                 "bbox": [248.0, 164.0, 311.0, 238.0], "iscrowd": 0},
                {...},
                ...,
                {...}],
"categories": [{"supercategory": null, "id": 0, "name": "_background_"},
			   {"supercategory": null, "id": 1, "name": "cell"}] 
}
''
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值