coco数据集是一个json格式的文件,由info、images、annotations、categories、licenses五部分组成。
licenses、info两部分在训练时基本用不到,置空就好
"licenses": [],
"info": {},
images为图片信息的数组,每张图片为一个json对象
"images": [{
"height": 2000,
"width": 2000,
"id": 2,
"file_name": "0015111_h3_w6.png",
"object_count": 76
},
{...},
...
]
annotations为图片中标注信息的数组,每个标注为一个json对象。
{
"image_id": 7,
"id": 1201,
"bbox": [
622.4736554731883,
694.9063573054165,
160.41168200000004,
100.26595825635263
],
"area": 16083.831011243317,
"rec": [
48,
57,
77,
59,
65,
68,
65,
76,
71,
75,
135,
135,
135,
135,
135,
135,
135,
135,
135,
135,
135,
135,
135
],
"iscrowd": 0,
"bezier_pts": [
542.2678144731882,
715.3712161563689,
590.8652584488111,
688.0499888777866,
641.4250169753009,
664.1276780064421,
693.7271644731883,
644.7733781772401,
702.6794964731882,
672.6808486635871,
651.3975767098083,
694.1994164161065,
601.2892435659596,
718.4815382165596,
552.4318154731883,
745.0393364335928
],
"illegible": false,
"truncated": false,
"category_id": 1
},
最后的categories为类别标注
"categories": [
{
"supercategory": "beverage",
"id": 1,
"keypoints": ["mean", "xmin", "x2", "x3", "xmax", "ymin", "y2", "y3", "ymax", "cross"],
"name": "text"
}
]