Common Objects in COntext(COCO)分为训练集(train),验证集(val)和测试集(test)
标注分3类,都以json格式保存
- object instances(目标实例)
- object keypoints(目标关键点)
- image captions(看图说话)
key的解释:
每个标注分类公共的key
“info”:{
“description”:描述,
“url”:“http://mscoco.org”,
“version”:版本
“year”:年份
“contributor”:贡献的人
“date_created”:创建时间
}
“images”:{
“license”:3,
“file_name”:图片的名称,
“coco_url”:网页url,
“height”:高度
“width”:宽度
“date_captured”:创建时间
“flickr_url”:
“id”:
},
“licenses”:{
“url”:连接
“id”:1,
“name”:名称
},
Object Instance类型的标注格式
整体的格式,‘info’,‘licenses’,'images’这三者通用,已经讲过.images的数量就是图片的数量,annotations的数量就是boundingbox的数量,categories是总分类数
{
"info": info,
"licenses": [license],
"images": [image],
"annotations": [annotation],
"categories": [category]
}
annotations
annotation{
"id": int,
"image_id": int,
"category_id": int,
"segmentation": RLE or [polygon],
"area": float,
"bbox": [x,y,width,height],
"iscrowd": 0 or 1,
}
segmentation:单个对象(isrowd=0)使用polygons,多个对象(isrowd=1)使用RLE
单个对象(iscrowd=0)可能需要多个polygon比如对象被遮挡的部分
area:标注区域的面积
bbox:左上角坐标,高和宽
categories
{
"id": int,
"name": str,
"supercategory": str,
}
id是对应了类别
name是类别的名字
Object Keypoint类型的标注格式
这个主要是对人进行识别,包含了人的姿势
整体
{
"info": info,
"licenses": [license],
"images": [image],
"annotations": [annotation],
"categories": [category]
}
annotations
包含了Object Instance中annotation结构体的所有字段,再加上2个额外的字段。
categories字段
keypoints是一个长度为k的数组,包含了每个关键点的名字
skeleton定义了各个关键点之间的连接性
Image Caption
没有categories字段
{
"info": info,
"licenses": [license],
"images": [image],
"annotations": [annotation]
}
annotation
annotation{
"id": int,
"image_id": int,
"caption": str
}